From: stevetruckstuff Date: Mon, 9 Oct 2006 16:23:06 +0000 (+0000) Subject: Make sure icon variables are setup on the login page. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=01fd1d1a63a0a2f88354a34c345598db392cfea3;p=squirrelmail.git Make sure icon variables are setup on the login page. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11881 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/include/init.php b/include/init.php index fb0cc536..95169534 100644 --- a/include/init.php +++ b/include/init.php @@ -142,12 +142,10 @@ require(SM_PATH . 'config/config_default.php'); $ldap_server = array(); $plugins = array(); $fontsets = array(); -$theme = array(); -$theme[0]['PATH'] = SM_PATH . 'themes/default_theme.php'; -$theme[0]['NAME'] = 'Default'; $aTemplateSet = array(); $aTemplateSet[0]['ID'] = 'default'; $aTemplateSet[0]['NAME'] = 'Default'; + /* load site configuration */ require(SM_PATH . 'config/config.php'); /* load local configuration overrides */ @@ -355,6 +353,17 @@ switch ($sInitLocation) { $sTemplateID = Template::get_default_template_set(); Template::cache_template_file_hierarchy(TRUE); + /** + * Make sure icon variables are setup for the login page. + */ + $icon_theme = $icon_themes[$icon_theme_def]['PATH']; + /* + * NOTE: The $icon_theme_path var should contain the path to the icon + * theme to use. If the admin has disabled icons, or the user has + * set the icon theme to "None," no icons will be used. + */ + $icon_theme_path = (!$use_icons || $icon_theme=='none') ? NULL : ($icon_theme == 'template' ? SM_PATH . Template::calculate_template_images_directory($sTemplateID) : $icon_theme); + /** * cleanup old cookies with a cookie path the same as the standard php.ini * cookie path. All previous SquirrelMail version used the standard php.ini