Changeset 9028 for trunk/wp-admin/edit.php
- Timestamp:
- 09/29/2008 09:26:21 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.