diff -r 29663506e85c -r d9533bb07563 plugins/SpecialAdmin.php
--- a/plugins/SpecialAdmin.php Mon Sep 29 08:26:49 2008 -0400
+++ b/plugins/SpecialAdmin.php Fri Oct 17 21:21:55 2008 -0400
@@ -44,8 +44,26 @@
));
}
+$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('');
+ }
+}
+
function SpecialAdmin_include()
{
global $db, $session, $paths, $template, $plugins; // Common objects
@@ -66,12 +84,6 @@
require(ENANO_ROOT . '/plugins/admin/ThemeManager.php');
require(ENANO_ROOT . '/plugins/admin/PluginManager.php');
require(ENANO_ROOT . '/plugins/admin/CacheManager.php');
-
- // Set the theme
- $session->theme = 'admin';
- $session->style = 'default';
-
- $template->add_header('');
}
}