Changes in trunk/wp-admin/admin.php [4349:3422]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r4349 r3422 6 6 7 7 if ( get_option('db_version') != $wp_db_version ) 8 wp_die(sprintf(__("Your database is out-of-date. Please <a href='%s'>upgrade</a>."), get_option('siteurl') . '/wp-admin/upgrade.php'));8 die (sprintf(__("Your database is out-of-date. Please <a href='%s'>upgrade</a>."), get_option('siteurl') . '/wp-admin/upgrade.php')); 9 9 10 10 require_once(ABSPATH . 'wp-admin/admin-functions.php'); 11 11 require_once(ABSPATH . 'wp-admin/admin-db.php'); 12 require_once(ABSPATH . WPINC . '/registration .php');12 require_once(ABSPATH . WPINC . '/registration-functions.php'); 13 13 14 14 auth_redirect(); … … 18 18 update_category_cache(); 19 19 20 wp_get_current_user();20 get_currentuserinfo(); 21 21 22 $posts_per_page = get_ option('posts_per_page');23 $what_to_show = get_ option('what_to_show');24 $date_format = get_ option('date_format');25 $time_format = get_ option('time_format');22 $posts_per_page = get_settings('posts_per_page'); 23 $what_to_show = get_settings('what_to_show'); 24 $date_format = get_settings('date_format'); 25 $time_format = get_settings('time_format'); 26 26 27 wp_reset_vars(array('profile', 'redirect', 'redirect_url', 'a', 'popuptitle', 'popupurl', 'text', 'trackback', 'pingback')); 27 $wpvarstoreset = array('profile','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); 28 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 29 $wpvar = $wpvarstoreset[$i]; 30 if (!isset($$wpvar)) { 31 if (empty($_POST["$wpvar"])) { 32 if (empty($_GET["$wpvar"])) { 33 $$wpvar = ''; 34 } else { 35 $$wpvar = $_GET["$wpvar"]; 36 } 37 } else { 38 $$wpvar = $_POST["$wpvar"]; 39 } 40 } 41 } 28 42 29 wp_enqueue_script( 'fat' ); 30 31 $editing = false; 32 33 if (isset($_GET['page'])) { 34 $plugin_page = stripslashes($_GET['page']); 35 $plugin_page = plugin_basename($plugin_page); 36 } 43 $xfn_js = $sack_js = $list_js = $cat_js = $dbx_js = $editing = false; 37 44 38 45 require(ABSPATH . '/wp-admin/menu.php'); 39 46 40 47 // Handle plugin admin pages. 41 if (isset($plugin_page)) { 48 if (isset($_GET['page'])) { 49 $plugin_page = stripslashes($_GET['page']); 50 $plugin_page = plugin_basename($plugin_page); 42 51 $page_hook = get_plugin_page_hook($plugin_page, $pagenow); 43 52 44 53 if ( $page_hook ) { 45 do_action('load-' . $page_hook);46 54 if (! isset($_GET['noheader'])) 47 55 require_once(ABSPATH . '/wp-admin/admin-header.php'); 48 56 49 57 do_action($page_hook); 50 58 } else { 51 59 if ( validate_file($plugin_page) ) { 52 wp_die(__('Invalid plugin page'));60 die(__('Invalid plugin page')); 53 61 } 54 55 if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page")) 56 wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); 57 58 do_action('load-' . $plugin_page); 62 63 if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page")) 64 die(sprintf(__('Cannot load %s.'), $plugin_page)); 59 65 60 66 if (! isset($_GET['noheader'])) 61 67 require_once(ABSPATH . '/wp-admin/admin-header.php'); 62 63 include(ABSPATH . PLUGINDIR . "/$plugin_page");68 69 include(ABSPATH . "wp-content/plugins/$plugin_page"); 64 70 } 65 71 66 72 include(ABSPATH . 'wp-admin/admin-footer.php'); 67 73 68 74 exit(); 69 75 } else if (isset($_GET['import'])) { 70 76 71 77 $importer = $_GET['import']; 72 78 73 if ( ! current_user_can('import') )74 wp_die(__('You are not allowed to import.'));75 76 79 if ( validate_file($importer) ) { 77 wp_die(__('Invalid importer.'));80 die(__('Invalid importer.')); 78 81 } 79 82 80 83 if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) 81 wp_die(__('Cannot load importer.'));82 84 die(__('Cannot load importer.')); 85 83 86 include(ABSPATH . "wp-admin/import/$importer.php"); 84 87 85 $parent_file = 'edit.php'; 86 $submenu_file = 'import.php'; 88 $parent_file = 'import.php'; 87 89 $title = __('Import'); 88 90 89 91 if (! isset($_GET['noheader'])) 90 92 require_once(ABSPATH . 'wp-admin/admin-header.php'); … … 96 98 97 99 call_user_func($wp_importers[$importer][2]); 98 100 99 101 include(ABSPATH . 'wp-admin/admin-footer.php'); 100 102 101 103 exit(); 102 } else {103 do_action("load-$pagenow");104 104 } 105 105
Note: See TracChangeset
for help on using the changeset viewer.