Changeset 9028
- Timestamp:
- 09/29/2008 09:26:21 AM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r9025 r9028 88 88 } 89 89 ?> 90 <img id="logo50" src="images/logo50.png" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1>90 <img id="logo50" src="images/logo50.png" alt="" /> <h1><?php if ( '' == get_bloginfo('name', 'display') ) echo ' '; else echo get_bloginfo('name', 'display'); ?><span id="breadcrumb"><?php echo $breadcrumb ?></span></h1> 91 91 </div> 92 92 -
trunk/wp-admin/categories.php
r9016 r9028 12 12 $title = __('Categories'); 13 13 14 wp_reset_vars( array('action', 'cat'));15 16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete']) )14 wp_reset_vars( array('action', 'cat') ); 15 16 if ( isset( $_GET['action'] ) && isset($_GET['delete']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) ) 17 17 $action = 'bulk-delete'; 18 18 … … 103 103 default: 104 104 105 if ( !empty($_GET['_wp_http_referer']) ) {106 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));105 if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 106 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 107 107 exit; 108 108 } … … 184 184 </tr> 185 185 </thead> 186 187 <tfoot> 188 <tr> 189 <?php print_column_headers('category', false); ?> 190 </tr> 191 </tfoot> 192 186 193 <tbody id="the-list" class="list:cat"> 187 194 <?php … … 191 198 </table> 192 199 193 </form>194 195 200 <div class="tablenav"> 196 197 201 <?php 198 202 if ( $page_links ) 199 203 echo "<div class='tablenav-pages'>$page_links</div>"; 200 204 ?> 201 <br class="clear" /> 202 </div> 203 <br class="clear" /> 205 206 <div class="alignleft"> 207 <select name="action2"> 208 <option value="" selected><?php _e('Actions'); ?></option> 209 <option value="delete"><?php _e('Delete'); ?></option> 210 </select> 211 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 212 <?php wp_nonce_field('bulk-categories'); ?> 213 </div> 214 215 <br class="clear" /> 216 </div> 217 218 <br class="clear" /> 219 </form> 204 220 205 221 </div> -
trunk/wp-admin/css/colors-classic.css
r9018 r9028 322 322 323 323 .widefat thead, 324 .widefat tfoot, 324 325 .thead, 326 .tfoot, 327 h3.dashboard-widget-title, 328 h3.dashboard-widget-title span, 329 h3.dashboard-widget-title small, 325 330 .find-box-head { 326 331 background-color: #464646; -
trunk/wp-admin/css/colors-fresh.css
r9018 r9028 316 316 317 317 .widefat thead, 318 .widefat tfoot, 318 319 .thead, 320 .tfoot, 319 321 h3.dashboard-widget-title, 320 322 h3.dashboard-widget-title span, -
trunk/wp-admin/edit-attachment-rows.php
r8931 r9028 15 15 </tr> 16 16 </thead> 17 18 <tfoot> 19 <tr> 20 <?php print_column_headers('media', false); ?> 21 </tr> 22 </tfoot> 23 17 24 <tbody id="the-list" class="list:post"> 18 25 <?php -
trunk/wp-admin/edit-comments.php
r9023 r9028 17 17 if ( isset( $_POST['delete_all_spam'] ) ) { 18 18 check_admin_referer('bulk-spam-delete'); 19 19 20 20 $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam'" ); 21 21 wp_redirect('edit-comments.php?deleted=' . (int) $deleted_spam); 22 22 } 23 23 24 if ( !empty( $_REQUEST['delete_comments'] ) && isset($_REQUEST['action']) ) {24 if ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) { 25 25 check_admin_referer('bulk-comments'); 26 27 $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; 28 foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each 29 $comment = (int) $comment; 30 $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) ); 26 $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; 27 28 $deleted = $approved = $unapproved = $spammed = 0; 29 foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each 30 $comment_id = (int) $comment_id; 31 $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment_id) ); 32 31 33 if ( !current_user_can('edit_post', $post_id) ) 32 34 continue; 33 if ( $_REQUEST['action'] == 'markspam' ) { 34 wp_set_comment_status($comment, 'spam'); 35 $comments_spammed++; 36 } elseif ( $_REQUEST['action'] == 'delete' ) { 37 wp_set_comment_status($comment, 'delete'); 38 $comments_deleted++; 39 } elseif ( $_REQUEST['action'] == 'approve' ) { 40 wp_set_comment_status($comment, 'approve'); 41 $comments_approved++; 42 } elseif ( $_REQUEST['action'] == 'unapprove' ) { 43 wp_set_comment_status($comment, 'hold'); 44 $comments_unapproved++; 35 36 switch( $doaction ) { 37 case 'markspam' : 38 wp_set_comment_status($comment_id, 'spam'); 39 $spammed++; 40 break; 41 case 'delete' : 42 wp_set_comment_status($comment_id, 'delete'); 43 $deleted++; 44 break; 45 case 'approve' : 46 wp_set_comment_status($comment_id, 'approve'); 47 $approved++; 48 break; 49 case 'unapprove' : 50 wp_set_comment_status($comment_id, 'hold'); 51 $unapproved++; 52 break; 45 53 } 46 54 endforeach; 47 $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed . '&unapproved=' . $comments_unapproved; 55 56 $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved; 48 57 if ( isset($_REQUEST['apage']) ) 49 58 $redirect_to = add_query_arg( 'apage', absint($_REQUEST['apage']), $redirect_to ); … … 55 64 $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); 56 65 wp_redirect( $redirect_to ); 57 } elseif ( !empty($_GET['_wp_http_referer']) ) {58 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));66 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 67 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 59 68 exit; 60 69 } … … 112 121 } 113 122 ?> 123 114 124 <div class="wrap"> 115 125 … … 144 154 145 155 <?php 146 147 156 $comments_per_page = apply_filters('comments_per_page', 20, $comment_status); 148 157 … … 181 190 <div class="alignleft"> 182 191 <select name="action"> 183 <option value=" " selected="selected"><?php _e('Actions') ?></option>192 <option value="-1" selected="selected"><?php _e('Actions') ?></option> 184 193 <?php if ( empty($comment_status) || 'approved' == $comment_status ): ?> 185 194 <option value="unapprove"><?php _e('Unapprove'); ?></option> … … 199 208 <?php } 200 209 201 if ( 'spam' == $comment_status ) { 210 if ( 'spam' == $comment_status ) { 202 211 wp_nonce_field('bulk-spam-delete'); ?> 203 212 <input type="submit" name="delete_all_spam" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> … … 211 220 212 221 <br class="clear" /> 213 <?php 214 if ($comments) { 215 ?> 222 223 <?php if ( $comments ) { ?> 216 224 <table class="widefat"> 217 225 <thead> … … 220 228 </tr> 221 229 </thead> 230 231 <tfoot> 232 <tr> 233 <?php print_column_headers('comment', false); ?> 234 </tr> 235 </tfoot> 236 222 237 <tbody id="the-comment-list" class="list:comment"> 223 238 <?php … … 233 248 </tbody> 234 249 </table> 250 251 <div class="tablenav"> 252 <?php 253 if ( $page_links ) 254 echo "<div class='tablenav-pages'>$page_links</div>"; 255 ?> 256 257 <div class="alignleft"> 258 <select name="action2"> 259 <option value="-1" selected="selected"><?php _e('Actions') ?></option> 260 <?php if ( empty($comment_status) || 'approved' == $comment_status ): ?> 261 <option value="unapprove"><?php _e('Unapprove'); ?></option> 262 <?php endif; ?> 263 <?php if ( empty($comment_status) || 'moderated' == $comment_status ): ?> 264 <option value="approve"><?php _e('Approve'); ?></option> 265 <?php endif; ?> 266 <?php if ( 'spam' != $comment_status ): ?> 267 <option value="markspam"><?php _e('Mark as Spam'); ?></option> 268 <?php endif; ?> 269 <option value="delete"><?php _e('Delete'); ?></option> 270 </select> 271 <input type="submit" name="doaction2" id="doaction2" value="<?php _e('Apply'); ?>" class="button-secondary apply" /> 272 273 <?php if ( 'spam' == $comment_status ) { ?> 274 <input type="submit" name="delete_all_spam2" value="<?php _e('Delete All Spam'); ?>" class="button-secondary apply" /> 275 <?php } ?> 276 <?php do_action('manage_comments_nav', $comment_status); ?> 277 </div> 278 279 <br class="clear" /> 280 </div> 235 281 236 282 </form> … … 252 298 </p> 253 299 <?php 254 } else 300 } else { 255 301 ?> 256 302 <p> … … 260 306 } 261 307 ?> 262 <div class="tablenav">263 <?php264 if ( $page_links )265 echo "<div class='tablenav-pages'>$page_links</div>";266 ?>267 <br class="clear" />268 </div>269 308 270 309 </div> -
trunk/wp-admin/edit-link-categories.php
r9016 r9028 13 13 if ( isset($_GET['action']) && isset($_GET['delete']) ) { 14 14 check_admin_referer('bulk-link-categories'); 15 $doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2']; 15 16 16 17 if ( !current_user_can('manage_categories') ) 17 18 wp_die(__('Cheatin’ uh?')); 18 19 if ( $_GET['action'] == 'delete') {19 20 if ( 'delete' == $doaction ) { 20 21 foreach( (array) $_GET['delete'] as $cat_ID ) { 21 22 $cat_name = get_term_field('name', $cat_ID, 'link_category'); … … 39 40 exit(); 40 41 } 41 } elseif ( !empty($_GET['_wp_http_referer']) ) {42 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));42 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 43 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 43 44 exit; 44 45 } … … 121 122 </tr> 122 123 </thead> 124 125 <tfoot> 126 <tr> 127 <?php print_column_headers('link-category', false); ?> 128 </tr> 129 </tfoot> 130 123 131 <tbody id="the-list" class="list:link-cat"> 124 132 <?php … … 144 152 </table> 145 153 146 </form>147 148 154 <div class="tablenav"> 149 150 155 <?php 151 156 if ( $page_links ) 152 157 echo "<div class='tablenav-pages'>$page_links</div>"; 153 158 ?> 159 160 <div class="alignleft"> 161 <select name="action2"> 162 <option value="" selected><?php _e('Actions'); ?></option> 163 <option value="delete"><?php _e('Delete'); ?></option> 164 </select> 165 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 166 </div> 167 154 168 <br class="clear" /> 155 169 </div> 156 170 <br class="clear" /> 171 </form> 157 172 158 173 </div> -
trunk/wp-admin/edit-pages.php
r9018 r9028 11 11 12 12 // Handle bulk actions 13 if ( isset($_GET['action']) && $_GET['action'] != -1 ) { 14 switch ( $_GET['action'] ) { 13 if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { 14 $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; 15 16 switch ( $doaction ) { 15 17 case 'delete': 16 18 if ( isset($_GET['post']) && isset($_GET['doaction']) ) { … … 18 20 foreach( (array) $_GET['post'] as $post_id_del ) { 19 21 $post_del = & get_post($post_id_del); 20 22 21 23 if ( !current_user_can('delete_page', $post_id_del) ) 22 24 wp_die( __('You are not allowed to delete this page.') ); 23 25 24 26 if ( $post_del->post_type == 'attachment' ) { 25 27 if ( ! wp_delete_attachment($post_id_del) ) … … 36 38 check_admin_referer('bulk-pages'); 37 39 $_GET['post_status'] = $_GET['_status']; 38 40 39 41 if ( -1 == $_GET['post_author'] ) 40 42 unset($_GET['post_author']); 41 43 42 44 $done = bulk_edit_posts($_GET); 43 45 } … … 56 58 wp_redirect($sendback); 57 59 exit(); 58 } elseif ( !empty($_GET['_wp_http_referer']) ) {59 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));60 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 61 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 60 62 exit; 61 63 } … … 108 110 </div></div> 109 111 110 <?php if ( isset($_GET['upd']) && (int) $_GET['upd'] ) { ?> 112 <div class="wrap"> 113 114 <?php if ( isset($_GET['upd']) || isset($_GET['skip']) ) { ?> 111 115 <div id="message" class="updated fade"><p> 112 <?php printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) ); 113 unset($_GET['upd']); 114 115 if ( isset($_GET['skip']) && (int) $_GET['skip'] ) { 116 printf( __ngettext( ' %d page not updated. Somebody is editing it.', ' %d pages not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) ); 117 unset($_GET['skip']); 118 } ?> 116 <?php if ( (int) $_GET['upd'] ) { 117 printf( __ngettext( '%d page updated.', '%d pages updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) ); 118 unset($_GET['upd']); 119 } 120 121 if ( (int) $_GET['skip'] ) { 122 printf( __ngettext( ' %d page not updated. Somebody is editing it.', ' %d pages not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) ); 123 unset($_GET['skip']); 124 } ?> 119 125 </p></div> 120 126 <?php } ?> 121 127 122 <div class="wrap"> 128 <?php if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 129 <div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div> 130 <?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 131 endif; ?> 123 132 124 133 <h2><?php … … 159 168 </ul> 160 169 170 <form id="posts-filter" action="" method="get"> 171 161 172 <?php if ( isset($_GET['post_status'] ) ) : ?> 162 173 <input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" /> 163 <?php endif; 164 165 if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 166 <div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div> 167 <?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 168 endif; 169 ?> 174 <?php endif; ?> 170 175 171 176 <div class="tablenav"> … … 190 195 ?> 191 196 192 <form id="posts-filter" action="" method="get">193 194 197 <div class="alignleft"> 195 198 <select name="action"> 196 <option value="-1" selected ><?php _e('Actions'); ?></option>199 <option value="-1" selected="selected"><?php _e('Actions'); ?></option> 197 200 <option value="edit"><?php _e('Edit'); ?></option> 198 201 <option value="delete"><?php _e('Delete'); ?></option> … … 219 222 </tr> 220 223 </thead> 224 225 <tfoot> 226 <tr> 227 <?php print_column_headers('page', false); ?> 228 </tr> 229 </tfoot> 230 221 231 <tbody> 222 232 <?php page_rows($posts, $pagenum, $per_page); ?> 223 233 </tbody> 224 234 </table> 235 236 <div class="tablenav"> 237 <?php 238 if ( $page_links ) 239 echo "<div class='tablenav-pages'>$page_links</div>"; 240 ?> 241 242 <div class="alignleft"> 243 <select name="action2"> 244 <option value="-1" selected="selected"><?php _e('Actions'); ?></option> 245 <option value="edit"><?php _e('Edit'); ?></option> 246 <option value="delete"><?php _e('Delete'); ?></option> 247 </select> 248 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 249 </div> 250 251 <br class="clear" /> 252 </div> 253 225 254 </form> 226 255 … … 238 267 ?> 239 268 240 <div class="tablenav">241 <?php242 if ( $page_links )243 echo "<div class='tablenav-pages'>$page_links</div>";244 ?>245 <br class="clear" />246 </div>247 269 248 270 <?php -
trunk/wp-admin/edit-post-rows.php
r8981 r9028 15 15 </tr> 16 16 </thead> 17 18 <tfoot> 19 <tr> 20 <?php print_column_headers('post', false); ?> 21 </tr> 22 </tfoot> 23 17 24 <tbody> 18 19 25 <?php 20 26 if ( have_posts() ) { … … 29 35 ?> 30 36 </tbody> 31 <thead>32 <tr>33 <?php print_column_headers('post'); ?>34 </tr>35 </thead>36 37 </table> -
trunk/wp-admin/edit-tags.php
r9016 r9028 12 12 $title = __('Tags'); 13 13 14 wp_reset_vars( array('action', 'tag'));15 16 if ( isset( $_GET['action'] ) && $_GET['action'] == 'delete' && isset($_GET['delete_tags']) )14 wp_reset_vars( array('action', 'tag') ); 15 16 if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) ) 17 17 $action = 'bulk-delete'; 18 18 … … 108 108 default: 109 109 110 if ( !empty($_GET['_wp_http_referer']) ) {111 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));110 if ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 111 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 112 112 exit; 113 113 } … … 188 188 </tr> 189 189 </thead> 190 191 <tfoot> 192 <tr> 193 <?php print_column_headers('tag', false); ?> 194 </tr> 195 </tfoot> 196 190 197 <tbody id="the-list" class="list:tag"> 191 198 <?php … … 198 205 </table> 199 206 200 </form>201 202 207 <div class="tablenav"> 203 204 208 <?php 205 209 if ( $page_links ) 206 210 echo "<div class='tablenav-pages'>$page_links</div>"; 207 211 ?> 208 <br class="clear" /> 209 </div> 210 <br class="clear" /> 212 213 <div class="alignleft"> 214 <select name="action2"> 215 <option value="" selected><?php _e('Actions'); ?></option> 216 <option value="delete"><?php _e('Delete'); ?></option> 217 </select> 218 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 219 </div> 220 221 <br class="clear" /> 222 </div> 223 224 <br class="clear" /> 225 </form> 211 226 212 227 </div> -
trunk/wp-admin/edit.php
r9018 r9028 10 10 require_once('admin.php'); 11 11 12 $action = -1;13 if ( isset($_GET['action2']) && $_GET['action2'] != -1 )14 $action = $_GET['action2'];15 if ( isset($_GET['action']) && $_GET['action'] != -1 )16 $action = $_GET['action'];17 18 12 // Handle bulk actions 19 if ( $action != -1 ) { 20 switch ( $action ) { 13 if ( isset($_GET['action']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { 14 $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; 15 16 switch ( $doaction ) { 21 17 case 'delete': 22 18 if ( isset($_GET['post']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { … … 42 38 check_admin_referer('bulk-posts'); 43 39 $_GET['post_status'] = $_GET['_status']; 44 40 45 41 if ( -1 == $_GET['post_author'] ) 46 42 unset($_GET['post_author']); 47 43 48 44 $done = bulk_edit_posts($_GET); 49 45 } … … 52 48 53 49 $sendback = wp_get_referer(); 54 if ( strpos($sendback, 'post.php') !== false) $sendback = admin_url('post-new.php');55 elseif ( strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php');50 if ( strpos($sendback, 'post.php') !== false ) $sendback = admin_url('post-new.php'); 51 elseif ( strpos($sendback, 'attachments.php') !== false ) $sendback = admin_url('attachments.php'); 56 52 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 57 53 if ( isset($done) ) { … … 63 59 wp_redirect($sendback); 64 60 exit(); 65 } elseif ( !empty($_GET['_wp_http_referer']) ) {66 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));61 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 62 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 67 63 exit; 68 64 } … … 115 111 <?php printf( __ngettext( '%d post updated.', '%d posts updated.', $_GET['upd'] ), number_format_i18n( $_GET['upd'] ) ); 116 112 unset($_GET['upd']); 117 113 118 114 if ( isset($_GET['skip']) && (int) $_GET['skip'] ) { 119 115 printf( __ngettext( ' %d post not updated. Somebody is editing it.', ' %d posts not updated. Somebody is editing them.', $_GET['skip'] ), number_format_i18n( $_GET['skip'] ) ); … … 133 129 $post_status_label = $post_stati[$_GET['post_status']][1]; 134 130 //TODO: Unreachable code: $post_listing_pageable is undefined, Similar code in upload.php 135 //if ( $post_listing_pageable && !is_archive() && !is_search() ) 131 //if ( $post_listing_pageable && !is_archive() && !is_search() ) 136 132 // $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); 137 133 //else … … 177 173 sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 178 174 } 179 echo implode( ' | </li>', $status_links ) . '</li>';175 echo implode( ' | </li>', $status_links ) . '</li>'; 180 176 unset( $status_links ); 181 177 endif; … … 320 316 </tr> 321 317 </thead> 318 319 <tfoot> 320 <tr> 321 <th scope="col"><?php _e('Comment') ?></th> 322 <th scope="col"><?php _e('Author') ?></th> 323 <th scope="col"><?php _e('Submitted') ?></th> 324 </tr> 325 </tfoot> 326 322 327 <tbody id="the-comment-list" class="list:comment"> 323 328 <?php -
trunk/wp-admin/includes/plugin-install.php
r8912 r9028 213 213 </tr> 214 214 </thead> 215 216 <tfoot> 217 <tr> 218 <th scope="col" class="name"><?php _e('Name'); ?></th> 219 <th scope="col" class="num"><?php _e('Version'); ?></th> 220 <th scope="col" class="num"><?php _e('Rating'); ?></th> 221 <th scope="col" class="desc"><?php _e('Description'); ?></th> 222 <th scope="col" class="action-links"><?php _e('Actions'); ?></th> 223 </tr> 224 </tfoot> 225 215 226 <tbody class="plugins"> 216 227 <?php … … 265 276 </tbody> 266 277 </table> 278 279 <div class="tablenav"> 280 <?php if ( $page_links ) 281 echo "\t\t<div class='tablenav-pages'>$page_links</div>"; ?> 282 </div> 283 <br class="clear" /> 284 267 285 <?php 268 286 } -
trunk/wp-admin/includes/template.php
r9023 r9028 583 583 } 584 584 585 function print_column_headers( $type ) {585 function print_column_headers( $type, $id = true ) { 586 586 $columns = get_column_headers( $type ); 587 587 $hidden = (array) get_user_option( "manage-$type-columns-hidden" ); … … 615 615 $style = ' style="' . $style . '"'; 616 616 ?> 617 <th scope="col" <?php echo "id=\"$column_key\""; echo $class; echo $style?>><?php echo $column_display_name; ?></th>617 <th scope="col" <?php echo $id ? "id=\"$column_key\"" : ""; echo $class; echo $style; ?>><?php echo $column_display_name; ?></th> 618 618 <?php } 619 619 } -
trunk/wp-admin/link-manager.php
r9018 r9028 11 11 12 12 // Handle bulk deletes 13 if ( isset($_GET['action']) && isset($_GET['linkcheck']) && isset($_GET['doaction'])) {13 if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) { 14 14 check_admin_referer('bulk-bookmarks'); 15 $doaction = $_GET['action'] ? $_GET['action'] : $_GET['action2']; 15 16 16 17 if ( ! current_user_can('manage_links') ) 17 18 wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); 18 19 if ( $_GET['action'] == 'delete') {20 foreach ( (array) $_GET['linkcheck'] as $link_id ) {19 20 if ( 'delete' == $doaction ) { 21 foreach ( (array) $_GET['linkcheck'] as $link_id ) { 21 22 $link_id = (int) $link_id; 22 23 … … 29 30 exit; 30 31 } 31 } elseif ( !empty($_GET['_wp_http_referer']) ) {32 wp_redirect( remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));32 } elseif ( isset($_GET['_wp_http_referer']) && ! empty($_GET['_wp_http_referer']) ) { 33 wp_redirect( remove_query_arg( array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']) ) ); 33 34 exit; 34 35 } … … 39 40 wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]')); 40 41 41 if ( empty ($cat_id))42 if ( empty($cat_id) ) 42 43 $cat_id = 'all'; 43 44 44 if ( empty ($order_by))45 if ( empty($order_by) ) 45 46 $order_by = 'order_name'; 46 47 … … 159 160 </tr> 160 161 </thead> 162 163 <tfoot> 164 <tr> 165 <?php print_column_headers('link', false); ?> 166 </tr> 167 </tfoot> 168 161 169 <tbody> 162 170 <?php … … 249 257 <?php } ?> 250 258 259 <div class="tablenav"> 260 261 <div class="alignleft"> 262 <select name="action2"> 263 <option value="" selected><?php _e('Actions'); ?></option> 264 <option value="delete"><?php _e('Delete'); ?></option> 265 </select> 266 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 267 </div> 268 269 <br class="clear" /> 270 </div> 271 251 272 </form> 252 273 253 274 <div id="ajax-response"></div> 254 275 255 <div class="tablenav">256 <br class="clear" />257 </div>258 259 260 276 </div> 261 277 -
trunk/wp-admin/plugins.php
r8973 r9028 280 280 </tr> 281 281 </thead> 282 283 <tfoot> 284 <tr> 285 <th scope="col" class="check-column"><input type="checkbox" /></th> 286 <th scope="col"><?php _e('Plugin'); ?></th> 287 <th scope="col" class="num"><?php _e('Version'); ?></th> 288 <th scope="col"><?php _e('Description'); ?></th> 289 <th scope="col" class="action-links"><?php _e('Action'); ?></th> 290 </tr> 291 </tfoot> 292 282 293 <tbody class="plugins"> 283 294 <?php -
trunk/wp-admin/upload.php
r9020 r9028 400 400 } ?> 401 401 402 </form>403 404 402 <div id="ajax-response"></div> 405 403 … … 411 409 ?> 412 410 411 <div class="alignleft"> 412 <select name="action2" id="select-action"> 413 <option value="" selected><?php _e('Actions'); ?></option> 414 <option value="delete"><?php _e('Delete'); ?></option> 415 <?php if ( isset($orphans) ) { ?> 416 <option value="attach"><?php _e('Attach to a post'); ?></option> 417 <?php } ?> 418 </select> 419 <input type="submit" id="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 413 420 </div> 414 421 422 <br class="clear" /> 423 </div> 424 </form> 415 425 <br class="clear" /> 416 426 -
trunk/wp-admin/users.php
r9016 r9028 19 19 $parent_file = 'users.php'; 20 20 21 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 22 $update = ''; 23 24 if ( empty($action) ) { 21 $update = $doaction = ''; 22 if ( isset($_REQUEST['action']) ) 23 $doaction = $_REQUEST['action'] ? $_REQUEST['action'] : $_REQUEST['action2']; 24 25 if ( empty($doaction) ) { 25 26 if ( isset($_GET['changeit']) && !empty($_GET['new_role']) ) 26 $ action = 'promote';27 $doaction = 'promote'; 27 28 } 28 29 … … 37 38 } 38 39 39 switch ($ action) {40 switch ($doaction) { 40 41 41 42 case 'promote': … … 208 209 $userspage = isset($_GET['userspage']) ? $_GET['userspage'] : null; 209 210 $role = isset($_GET['role']) ? $_GET['role'] : null; 210 211 211 212 // Query the users 212 213 $wp_user_search = new WP_User_Search($usersearch, $userspage, $role); 213 214 214 215 $messages = array(); 215 216 if ( isset($_GET['update']) ) : … … 259 260 </ul> 260 261 </div> 261 <?php endif; 262 <?php endif; 262 263 263 264 if ( ! empty($messages) ) { … … 359 360 </tr> 360 361 </thead> 362 363 <tfoot> 364 <tr class="thead"> 365 <?php print_column_headers('user', false) ?> 366 </tr> 367 </tfoot> 368 361 369 <tbody id="users" class="list:user user-list"> 362 370 <?php … … 379 387 <div class="tablenav-pages"><?php $wp_user_search->page_links(); ?></div> 380 388 <?php endif; ?> 389 390 <div class="alignleft"> 391 <select name="action2"> 392 <option value="" selected><?php _e('Actions'); ?></option> 393 <option value="delete"><?php _e('Delete'); ?></option> 394 </select> 395 <input type="submit" value="<?php _e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 396 </div> 381 397 382 398 <br class="clear" /> … … 475 491 break; 476 492 477 } // end of the $ action switch493 } // end of the $doaction switch 478 494 479 495 include('admin-footer.php');
Note: See TracChangeset
for help on using the changeset viewer.