Changeset 8916
- Timestamp:
- 09/17/2008 04:39:08 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/template.php
r8911 r8916 1228 1228 if ( current_user_can( 'edit_user', $user_object->ID ) ) { 1229 1229 if ($current_user->ID == $user_object->ID) { 1230 $edit = 'profile.php';1230 $edit_link = 'profile.php'; 1231 1231 } else { 1232 $edit = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); 1233 } 1234 $edit = "<a href=\"$edit\">$user_object->user_login</a>"; 1232 $edit_link = clean_url( add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ) ); 1233 } 1234 $edit = "<strong><a href=\"$edit_link\">$user_object->user_login</a></strong><br />"; 1235 $actions = array(); 1236 $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>'; 1237 $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&user=$user_object->ID", 'bulk-users') . "' onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this user '%s'\n 'Cancel' to stop, 'OK' to delete."), $user_object->user_login )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>"; 1238 $action_count = count($actions); 1239 $i = 0; 1240 foreach ( $actions as $action => $link ) { 1241 ++$i; 1242 ( $i == $action_count ) ? $sep = '' : $sep = ' | '; 1243 $edit .= "<span class='$action'>$link$sep</span>"; 1244 } 1235 1245 } else { 1236 $edit = $user_object->user_login;1246 $edit = '<strong>' . $user_object->user_login . '</strong>'; 1237 1247 } 1238 1248 $role_name = isset($wp_roles->role_names[$role]) ? translate_with_context($wp_roles->role_names[$role]) : __('None'); 1239 1249 $r = "<tr id='user-$user_object->ID'$style> 1240 1250 <th scope='row' class='check-column'><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></th> 1241 <td> <strong>$edit</strong></td>1251 <td>$edit</td> 1242 1252 <td>$user_object->first_name $user_object->last_name</td> 1243 1253 <td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td> -
trunk/wp-admin/users.php
r8867 r8916 115 115 check_admin_referer('bulk-users'); 116 116 117 if ( empty($_REQUEST['users']) ) {117 if ( empty($_REQUEST['users']) && empty($_REQUEST['user']) ) { 118 118 wp_redirect($redirect); 119 119 exit(); … … 123 123 $errors = new WP_Error('edit_users', __('You can’t delete users.')); 124 124 125 $userids = $_REQUEST['users']; 125 if ( empty($_REQUEST['users']) ) 126 $userids = array(intval($_REQUEST['user'])); 127 else 128 $userids = $_REQUEST['users']; 126 129 127 130 include ('admin-header.php');
Note: See TracChangeset
for help on using the changeset viewer.