Changeset 2878
- Timestamp:
- 11/25/08 06:22:49 (6 weeks ago)
- Location:
- branches/adminhandler/htdocs
- Files:
-
- 1 added
- 2 modified
- 17 moved
-
index.php (modified) (1 diff)
-
system/admin/classes (added)
-
system/admin/classes/adminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/adminpage.php) (1 prop)
-
system/admin/classes/commentadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/commentadminpage.php) (2 diffs, 1 prop)
-
system/admin/classes/commentsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/commentsadminpage.php) (1 prop)
-
system/admin/classes/dashboardadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/dashboardadminpage.php) (1 prop)
-
system/admin/classes/groupadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/groupadminpage.php) (1 prop)
-
system/admin/classes/groupsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/groupsadminpage.php) (1 prop)
-
system/admin/classes/importadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/importadminpage.php) (1 prop)
-
system/admin/classes/logsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/logsadminpage.php) (1 prop)
-
system/admin/classes/mediaadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/mediaadminpage.php) (1 prop)
-
system/admin/classes/optionsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/optionsadminpage.php) (3 diffs, 1 prop)
-
system/admin/classes/pluginsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/pluginsadminpage.php) (1 prop)
-
system/admin/classes/postsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/postsadminpage.php) (1 prop)
-
system/admin/classes/publishadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/publishadminpage.php) (1 prop)
-
system/admin/classes/tagsadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/tagsadminpage.php) (1 prop)
-
system/admin/classes/themesadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/themesadminpage.php) (1 prop)
-
system/admin/classes/useradminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/useradminpage.php) (1 prop)
-
system/admin/classes/usersadminpage.php (moved) (moved from branches/adminhandler/htdocs/system/classes/usersadminpage.php) (1 prop)
-
system/classes/adminhandler.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/adminhandler/htdocs/index.php
r2852 r2878 74 74 if( empty($files) ) { 75 75 $files = array(); 76 $dirs= array( HABARI_PATH . '/system', HABARI_PATH . '/ user' );76 $dirs= array( HABARI_PATH . '/system', HABARI_PATH . '/system/admin', HABARI_PATH . '/user' ); 77 77 78 78 // For each directory, save the available files in the $files array. -
branches/adminhandler/htdocs/system/admin/classes/adminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/commentadminpage.php
r2870 r2878 3 3 class CommentAdminPage extends AdminPage 4 4 { 5 public function act_request_get($update = FALSE) { 5 public function act_request_get($update = FALSE) 6 { 6 7 if ( isset( $this->handler_vars['id'] ) && $comment = Comment::get( $this->handler_vars['id'] ) ) { 7 8 $this->theme->comment = $comment; … … 67 68 } 68 69 69 public function act_request_post() { 70 public function act_request_post() 71 { 70 72 $this->act_request_get(true); 71 73 } 72 74 73 public functionajax_update_comment( $handler_vars )75 public function act_ajax_update_comment( $handler_vars ) 74 76 { 75 77 // check WSSE authentication -
branches/adminhandler/htdocs/system/admin/classes/commentsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/dashboardadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/groupadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/groupsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/importadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/logsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/mediaadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/optionsadminpage.php
r2870 r2878 4 4 { 5 5 /** 6 * Handles get requests from the options admin page 6 * Handles get requests from the options admin page. 7 * Send all POST request to GET so FormUI can proccess them. 7 8 */ 8 9 public function act_request_post() … … 158 159 * @param FormUI $form The successfully submitted form 159 160 */ 160 public function form_options_success( $form)161 public function form_options_success( FormUI $form ) 161 162 { 162 163 $wsse = Utils::WSSE( $form->nonce->value, $form->timestamp->value ); … … 165 166 $form->save(); 166 167 } 167 Session::error( _t('WSSE Authentication Failed') ); 168 else { 169 Session::error( _t('WSSE authentication failed. Could not update options.') ); 170 } 168 171 } 169 172 } -
branches/adminhandler/htdocs/system/admin/classes/pluginsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/postsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/publishadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/tagsadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/themesadminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/useradminpage.php
-
branches/adminhandler/htdocs/system/admin/classes/usersadminpage.php
-
branches/adminhandler/htdocs/system/classes/adminhandler.php
r2872 r2878 70 70 public function act_admin() 71 71 { 72 $page = ( isset( $this->handler_vars['page'] ) && !empty( $this->handler_vars['page'] ) ) ? $this->handler_vars['page'] : 'dashboard'; 73 $type = ( isset( $this->handler_vars['content_type'] ) && !empty( $this->handler_vars['content_type'] ) ) ? $this->handler_vars['content_type'] : ''; 74 $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', TRUE ) ); 75 $this->theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir ); 76 77 // Add some default stylesheets 78 Stack::add('admin_stylesheet', array(Site::get_url('admin_theme') . '/css/admin.css', 'screen'), 'admin'); 79 80 // Add some default template variables 81 $this->set_admin_template_vars( $this->theme ); 82 $this->theme->admin_type = $type; 83 $this->theme->admin_page = $page; 84 $this->theme->page = $page; 85 $this->theme->admin_title = ucwords($page) . ( $type != '' ? ' ' . ucwords($type) : '' ); 72 $page = ( !empty($this->handler_vars['page']) ) ? $this->handler_vars['page'] : 'dashboard'; 73 $this->theme = $this->get_admin_theme($page); 86 74 87 75 $request_method = strtolower($_SERVER['REQUEST_METHOD']); 88 76 $admin_page = $page . 'AdminPage'; 89 77 Plugins::act("admin_theme_{$request_method}_{$page}", $this, $this->theme); 78 90 79 if ( class_exists($admin_page) ) { 91 80 $admin_page = new $admin_page( $request_method, $this, $this->theme ); … … 117 106 _e('Page Not Found'); 118 107 } 108 } 109 110 protected function get_admin_theme( $page ) 111 { 112 $type = ( isset( $this->handler_vars['content_type'] ) && !empty( $this->handler_vars['content_type'] ) ) ? $this->handler_vars['content_type'] : ''; 113 $theme_dir = Plugins::filter( 'admin_theme_dir', Site::get_dir( 'admin_theme', TRUE ) ); 114 $theme = Themes::create( 'admin', 'RawPHPEngine', $theme_dir ); 115 116 // Add some default stylesheets 117 Stack::add('admin_stylesheet', array(Site::get_url('admin_theme') . '/css/admin.css', 'screen'), 'admin'); 118 119 // Add some default template variables 120 $this->get_main_menu( $theme ); 121 $theme->admin_type = $type; 122 $theme->admin_page = $page; 123 $theme->page = $page; 124 $theme->admin_title = ucwords($page) . ( $type != '' ? ' ' . ucwords($type) : '' ); 125 126 return $theme; 119 127 } 120 128 … … 216 224 217 225 /** 218 * Assigns the main menu to $mainmenu into the theme.219 */220 protected function set_admin_template_vars( $theme )221 {222 $this->get_main_menu( $theme );223 }224 225 /**226 226 * Setup the default admin javascript stack here so that it can be called 227 227 * from plugins, etc. This is not an ideal solution, but works for now. … … 229 229 */ 230 230 public static function setup_stacks() { 231 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.js" );232 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.core.js" );233 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.slider.js" );234 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.tabs.js" );235 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.sortable.js" );236 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.resizable.js" );237 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.spinner.js" );238 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.color.js" );239 Stack::add( 'admin_header_javascript', Site::get_url('habari') . "/3rdparty/humanmsg/humanmsg.js" );240 Stack::add( 'admin_header_javascript', Site::get_url('habari') . "/3rdparty/hotkeys/jquery.hotkeys.js" );241 Stack::add( 'admin_header_javascript', Site::get_url('admin_theme') . "/js/media.js" );242 Stack::add( 'admin_header_javascript', Site::get_url('admin_theme') . "/js/admin.js" );231 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.js", 'jquery' ); 232 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.core.js", 'ui.core', 'jquery' ); 233 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.slider.js", 'ui.slider', array('jquery', 'ui.core') ); 234 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.tabs.js", 'ui.tabs', array('jquery', 'ui.core') ); 235 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.sortable.js", 'ui.sortable', array('jquery', 'ui.core') ); 236 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/ui.resizable.js", 'ui.resizable', array('jquery', 'ui.core') ); 237 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.spinner.js", 'jquery.spinner', 'jquery' ); 238 Stack::add( 'admin_header_javascript', Site::get_url('scripts') . "/jquery.color.js", 'jquery.color', 'jquery' ); 239 Stack::add( 'admin_header_javascript', Site::get_url('habari') . "/3rdparty/humanmsg/humanmsg.js", 'humanmsg', 'jquery' ); 240 Stack::add( 'admin_header_javascript', Site::get_url('habari') . "/3rdparty/hotkeys/jquery.hotkeys.js", 'jquery.hotkeys', 'jquery' ); 241 Stack::add( 'admin_header_javascript', Site::get_url('admin_theme') . "/js/media.js", 'media', 'jquery' ); 242 Stack::add( 'admin_header_javascript', Site::get_url('admin_theme') . "/js/admin.js", 'admin', 'jquery' ); 243 243 } 244 244 }
