diff -r 5e8fd89c02ea -r a38876c0793c plugins/SpecialAdmin.php --- a/plugins/SpecialAdmin.php Sun Jun 22 18:13:59 2008 -0400 +++ b/plugins/SpecialAdmin.php Tue Jun 24 23:37:23 2008 -0400 @@ -174,6 +174,13 @@ '; } + // Any hooks? + $code = $plugins->setHook('acp_home'); + foreach ( $code as $cmd ) + { + eval($cmd); + } + // Security log echo '

' . $lang->get('acphome_heading_seclog') . '

'; echo '

' . $lang->get('acphome_msg_seclog_info') . '

'; @@ -316,7 +323,7 @@ if ( is_dir(ENANO_ROOT . '/' . $_POST['avatar_directory']) ) { - if ( preg_match('/^([A-z0-9_-]+)(\/([A-z0-9_-]+))*\/?$/', $_POST['avatar_directory']) ) + if ( preg_match('/^[A-z0-9_-]+(?:\/(?:[A-z0-9_-]+))*\/?$/', $_POST['avatar_directory']) ) { setConfig('avatar_directory', $_POST['avatar_directory']); } @@ -1944,6 +1951,7 @@ } else { + $template->add_header(''); $template->load_theme('admin', 'default'); $template->init_vars(); if( !isset( $_GET['noheaders'] ) ) @@ -1962,6 +1970,7 @@ } if ( t == namespace_list.Admin + 'AdminLogout' ) { + load_component('messagebox'); miniPromptMessage({ title: $lang.get('user_logout_confirm_title_elev'), message: $lang.get('user_logout_confirm_body_elev'), @@ -2023,7 +2032,16 @@ } }); } - function _enanoAdminOnload() { ajaxPage('nslist['Admin']; ?>Home'); } + nslist['Admin']}Home'); }; + addOnloadHook(_enanoAdminOnload); + +EOF; + } + ?> var TREE_TPL = { 'target' : '_self', // name of the frame links will be opened in // other possible values are: _blank, _parent, _search, _self and _top @@ -2051,10 +2069,18 @@ 'icon_26' : '/images/icons/minusbottom.gif',// junction for opened node 'icon_27' : '/images/icons/minus.gif' // junction for last opended node }; - addOnloadHook(keepalive_onload); + + addOnloadHook(function() + { + load_component('ajax'); + load_component('l10n'); + load_component('autofill'); + keepalive_onload(); + }); + parseAdminTree(); // Make a Javascript array that defines the tree - if(!isset($_GET['module'])) { echo 'addOnloadHook(_enanoAdminOnload);'; } ?> + ?>