plugins/SpecialAdmin.php
changeset 953 323c4cd1aa37
parent 939 32a43ae3649b
child 954 995d36f39ba3
--- a/plugins/SpecialAdmin.php	Mon May 04 23:07:00 2009 -0400
+++ b/plugins/SpecialAdmin.php	Tue May 05 00:10:26 2009 -0400
@@ -44,26 +44,8 @@
     ));
 }
 
-$plugins->attachHook('session_started', 'SpecialAdmin_theme_init();');
 $plugins->attachHook('common_post', 'SpecialAdmin_include();');
 
-function SpecialAdmin_theme_init()
-{
-  global $db, $session, $paths, $template, $plugins; // Common objects
-  
-  // Admin pages that were too enormous to be in this file were split off into the plugins/admin/ directory in 1.0.1.
-  // Only load these files if we're looking to load the admin panel
-  list($pid, $ns) = RenderMan::strToPageID($paths->get_pageid_from_url());
-  if ( $ns == 'Admin' || ( $pid == 'Administration' && $ns == 'Special' ) )
-  {
-    // Set the theme
-    $session->theme = 'admin';
-    $session->style = 'default';
-    
-    $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>');
-  }
-}
-
 function SpecialAdmin_include()
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
@@ -132,6 +114,7 @@
     if(isset($_POST['editmsg']))                 setConfig('wiki_edit_notice', '1');
     else                                         setConfig('wiki_edit_notice', '0');
     setConfig('wiki_edit_notice_text', $_POST['editmsg_text']);
+    $cache->purge('wiki_edit_notice');
     if(isset($_POST['guest_edit_require_captcha'])) setConfig('guest_edit_require_captcha', '1');
     else                                         setConfig('guest_edit_require_captcha', '0');
     
@@ -2078,6 +2061,9 @@
   }
   else
   {
+    $template->set_theme('admin', 'default');
+    $template->add_header('<script type="text/javascript" src="' . cdnPath . '/includes/clientside/static/admin-menu.js"></script>');
+    
     if( !isset( $_GET['noheaders'] ) ) 
     {
       $template->header();