Changeset 4051
- Timestamp:
- 07/26/2006 10:56:56 PM (19 years ago)
- Location:
- branches/2.0
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-admin/admin-functions.php
r4036 r4051 362 362 $pass2 = $_POST['pass2']; 363 363 364 if (isset ($_POST['role']) ) {364 if (isset ($_POST['role']) && current_user_can('edit_users')) { 365 365 if($user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap('edit_users')) 366 366 $user->role = $_POST['role']; … … 1215 1215 global $menu; 1216 1216 global $submenu; 1217 global $plugin_page; 1217 1218 1218 1219 $parent = get_admin_page_parent(); … … 1230 1231 1231 1232 if (isset ($submenu[$parent])) { 1232 foreach ($submenu[$parent] as $submenu_array) { 1233 if ( isset($plugin_page) ) { 1234 foreach ($submenu[$parent] as $submenu_array) { 1235 if ( $submenu_array[2] == $plugin_page ) { 1236 if (!current_user_can($submenu_array[1])) 1237 return false; 1238 } 1239 } 1240 } 1241 1242 foreach ($submenu[$parent] as $submenu_array) { 1233 1243 if ($submenu_array[2] == $pagenow) { 1234 if (!current_user_can($submenu_array[1])) {1244 if (!current_user_can($submenu_array[1])) 1235 1245 return false; 1236 } else {1246 else 1237 1247 return true; 1238 }1239 1248 } 1240 1249 } -
branches/2.0/wp-admin/admin.php
r3771 r4051 43 43 $xfn_js = $sack_js = $list_js = $cat_js = $dbx_js = $editing = false; 44 44 45 if (isset($_GET['page'])) { 46 $plugin_page = stripslashes($_GET['page']); 47 $plugin_page = plugin_basename($plugin_page); 48 } 49 45 50 require(ABSPATH . '/wp-admin/menu.php'); 46 51 47 52 // Handle plugin admin pages. 48 if (isset($_GET['page'])) { 49 $plugin_page = stripslashes($_GET['page']); 50 $plugin_page = plugin_basename($plugin_page); 53 if (isset($plugin_page)) { 51 54 $page_hook = get_plugin_page_hook($plugin_page, $pagenow); 52 55 … … 76 79 77 80 $importer = $_GET['import']; 81 82 if ( ! current_user_can('import') ) 83 wp_die(__('You are not allowed to import.')); 78 84 79 85 if ( validate_file($importer) ) { -
branches/2.0/wp-content/plugins/wp-db-backup.php
r3820 r4051 321 321 /////////////////////////////// 322 322 function admin_menu() { 323 add_management_page(__('Backup'), __('Backup'), 9, basename(__FILE__), array(&$this, 'backup_menu'));323 add_management_page(__('Backup'), __('Backup'), 'import', basename(__FILE__), array(&$this, 'backup_menu')); 324 324 } 325 325 326 326 function fragment_menu() { 327 add_management_page(__('Backup'), __('Backup'), 9, basename(__FILE__), array(&$this, 'build_backup_script'));327 add_management_page(__('Backup'), __('Backup'), 'import', basename(__FILE__), array(&$this, 'build_backup_script')); 328 328 } 329 329 … … 886 886 function wpdbBackup_init() { 887 887 global $mywpdbbackup; 888 889 if ( !current_user_can('import') ) return; 890 888 891 $mywpdbbackup = new wpdbBackup(); 889 892 } -
branches/2.0/xmlrpc.php
r3498 r4051 1229 1229 $original_title = $title; 1230 1230 1231 $comment_post_ID = $post_ID;1231 $comment_post_ID = (int) $post_ID; 1232 1232 $comment_author = $title; 1233 $this->escape($comment_author); 1233 1234 $comment_author_url = $pagelinkedfrom; 1234 1235 $comment_content = $context; 1236 $this->escape($comment_content); 1235 1237 $comment_type = 'pingback'; 1236 1238
Note: See TracChangeset
for help on using the changeset viewer.