/** * Return the help data (ajax) * @param array $request the request * @return text the help text (usually html) */ public function getHelp($request) { require_once R3_LIB_DIR . 'eco_help.php'; $body = R3Help::getHelpPartFromSection($request['section'], $request['id'], R3Locale::getLanguageCode()); return array('data' => $body !== null ? $body : ''); }
/** * Return the help data (ajax) * @param array $request the request * @return text the help text (usually html) */ public function getHelp($request) { global $smarty; require_once R3_LIB_DIR . 'eco_help.php'; $smarty->assign('ELECTRICITY_KWH_FACTOR', R3Locale::convert2PHP($this->auth->getConfigValue('GENERAL', 'ELECTRICITY_KWH_FACTOR', 1))); $body = R3Help::getHelpPartFromSection($request['section'], $request['id'], R3Locale::getLanguageCode()); return array('data' => $body !== null ? $body : ''); }
/** * Return the help data (ajax) * @param array $request the request * @return text the help text (usually html) */ public function getHelp($request) { require_once R3_LIB_DIR . 'eco_help.php'; $body = R3Help::getHelpPartFromSection($request['section'], $request['id'], R3Locale::getLanguageCode()); // Help can be cacheable $ttl = 1 * 24 * 60 * 60; header('Expires: ' . gmdate('D, d M Y H:i:s', time() + $ttl) . ' GMT'); header('Cache-Control: max-age=' . $ttl); header("Pragma: public", true); return array('data' => $body !== null ? $body : ''); }