diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index f593b33a..cdc47df6 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -958,7 +958,11 @@ function serendipity_smarty_init($vars = array()) { } if (!isset($serendipity['smarty_vars']['head_link_stylesheet'])) { - $serendipity['smarty_vars']['head_link_stylesheet'] = serendipity_rewriteURL('serendipity.css'); + if (IN_serendipity_admin === true) { + $serendipity['smarty_vars']['head_link_stylesheet'] = serendipity_rewriteURL('serendipity_admin.css'); + } else { + $serendipity['smarty_vars']['head_link_stylesheet'] = serendipity_rewriteURL('serendipity.css'); + } // When templates are switched, append a specific version string to make sure the browser does not cache the CSS if (strstr($serendipity['smarty_vars']['head_link_stylesheet'], '?')) { diff --git a/serendipity_admin.php b/serendipity_admin.php index 6fd42e13..abf56c8d 100644 --- a/serendipity_admin.php +++ b/serendipity_admin.php @@ -14,24 +14,7 @@ if (IS_installed === false) { require(S9Y_INCLUDE_PATH . 'include/functions_permalinks.inc.php'); require(S9Y_INCLUDE_PATH . 'include/functions_installer.inc.php'); require(S9Y_INCLUDE_PATH . 'include/functions_config.inc.php'); - $css_file = 'serendipity.css.php?serendipity[css_mode]=serendipity_admin.css&v=' . time(); } else { - $css_file = serendipity_rewriteURL('serendipity_admin.css'); - - // This is a bit of an ugly hack, but when switching templates, the HTML head is already emitted, - // so we need a way to actually enforce switching/updating the CSS. So we need to do it at - // this place. - if ($serendipity['GET']['adminAction'] == 'install' && $serendipity['GET']['adminModule'] == 'templates') { - $serendipity['last_template_change'] = time(); - } - - // When templates are switched, append a specific version string to make sure the browser does not cache the CSS - if (strstr($css_file, '?')) { - $css_file .= '&v=' . $serendipity['last_template_change']; - } else { - $css_file .= '?v=' . $serendipity['last_template_change']; - } - if (defined('IS_up2date') && IS_up2date === true) { serendipity_plugin_api::hook_event('backend_configure', $serendipity); } @@ -63,8 +46,6 @@ if (isset($serendipity['GET']['no_smarty']) || isset($serendipity['no_smarty'])) $_SESSION['no_smarty'] = true; } -$admin_css_file = serendipity_getTemplateFile('admin/pluginmanager.css'); - if (defined('IS_up2date') && IS_up2date === true && IS_installed === true) { $admin_installed = true; } else { @@ -271,7 +252,7 @@ if (!$use_installer && $is_logged_in) { } if (!$use_installer) { - $poll_admin_vars = array('css_file', 'admin_css_file', 'main_content', 'no_banner', 'no_sidebar', 'no_footer', 'post_action', 'is_logged_in', 'admin_installed', 'self_info', 'use_installer', 'title'); + $poll_admin_vars = array('main_content', 'no_banner', 'no_sidebar', 'no_footer', 'post_action', 'is_logged_in', 'admin_installed', 'self_info', 'use_installer', 'title'); $admin_vars = array(); foreach($poll_admin_vars AS $poll_admin_var) { $admin_vars[$poll_admin_var] =& $$poll_admin_var; diff --git a/templates/2k11/admin/index.tpl b/templates/2k11/admin/index.tpl index fa42e3cc..d8358281 100644 --- a/templates/2k11/admin/index.tpl +++ b/templates/2k11/admin/index.tpl @@ -5,7 +5,7 @@ {if $admin_vars.title}{$admin_vars.title} | {/if}{$CONST.SERENDIPITY_ADMIN_SUITE} - + {if $admin_vars.admin_installed}{serendipity_hookPlugin hook="backend_header" hookAll="true"}{/if} diff --git a/templates/2k11/admin/installer.inc.tpl b/templates/2k11/admin/installer.inc.tpl index c9fb8409..e4c72d96 100644 --- a/templates/2k11/admin/installer.inc.tpl +++ b/templates/2k11/admin/installer.inc.tpl @@ -5,7 +5,7 @@ {$CONST.SERENDIPITY_ADMIN_SUITE} - + {serendipity_hookPlugin hook="backend_header" hookAll="true"}