function display($path) { $this->assign('current_locale', WEBIM_CURRENT_LOCALE, false); $this->assign('available_locales', Resources::GetAvailableLocales(), false); $this->assign('webim_root', WEBIM_ROOT, false); $this->assign('whois_url', WEBIM_WHOIS_LINK, false); $this->assign('browser_charset', BROWSER_CHARSET, false); // $this->assign('resources', Resources::GetCurrentSet(), false); TODO do we really need this? $this->assign('product_and_version', Settings::GetProductAndVersion()); $this->assign('product_url', Settings::GetProductURL()); $this->assign('version', WEBIM_VERSION); $op = SilentGetOperator(); if (isset($op)) { $this->Assign('operator_name', $op['fullname']); } Browser::SendHtmlHeaders(); parent::display($path); }
} header("Location: " . WEBIM_ROOT . "/operator/settings.php"); exit; } else { foreach ($fields as $f) { $TML->assign($f, $params[$f]); } // $TML->assign('logo', get_mandatory_param('logo')); $TML->assign('answers_value', $params[$answersKey]); } } else { // not submitted $TML->assign('answers_value', Settings::Get($answersKey)); $TML->assign(Settings::getInstance()->GetAll()); } $TML->assign('answers_key', $answersKey); $TML->assign('availableLocales', Resources::GetAvailableLocales()); $TML->assign('errors', $errors); $TML->display('settings.tpl'); require_once dirname(__FILE__) . '/inc/admin_epilog.php'; function notEmpty($string) { return !empty($string); } function remove_empty_strings($strings) { $strings = str_replace("\r", "", $strings); $strarray = explode("\n", $strings); $strarray = array_filter($strarray, "notEmpty"); return implode("\n", $strarray); }
static function IsLocaleAvailable($locale) { $res = in_array($locale, Resources::GetAvailableLocales()); return $res; }