Skip to content
Browse files

Lets try again... Simplify things and use the function provided by th…

…e parent class to create the admin theme objects when needed
  • Loading branch information...
1 parent e0c4348 commit 1366b18e806cdd4144259e5832ddbc08fd95c2dc @lildude lildude committed Apr 7, 2012
View
3 handlers/admincommentshandler.php
@@ -500,8 +500,7 @@ public function ajax_comments()
{
Utils::check_request_method( array( 'GET', 'HEAD' ) );
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
$this->theme->theme = $this->theme;
$params = $_GET;
View
3 handlers/admindashboardhandler.php
@@ -108,8 +108,7 @@ public function ajax_dashboard( $handler_vars )
{
Utils::check_request_method( array( 'POST' ) );
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
switch ( $handler_vars['action'] ) {
case 'updateModules':
View
3 handlers/admingroupshandler.php
@@ -180,8 +180,7 @@ public function ajax_groups( $handler_vars )
{
Utils::check_request_method( array( 'GET', 'HEAD' ) );
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
$output = '';
View
3 handlers/adminpostshandler.php
@@ -525,8 +525,7 @@ public function ajax_posts()
{
Utils::check_request_method( array( 'GET', 'HEAD' ) );
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
$params = $_GET;
View
6 handlers/admintagshandler.php
@@ -41,8 +41,7 @@ public function ajax_get_tags( $handler_vars )
return;
}
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
$search = $handler_vars['search'];
@@ -69,8 +68,7 @@ public function ajax_tags( $handler_vars )
}
$tag_names = array();
- $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', true ) );
- $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir );
+ $this->create_theme();
$action = $this->handler_vars['action'];
switch ( $action ) {
case 'delete':

0 comments on commit 1366b18

Please sign in to comment.
Something went wrong with that request. Please try again.