Changeset 5750
- Timestamp:
- 06/24/2007 05:58:38 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/user.php
r5707 r5750 194 194 $type_sql = " ( post_status = 'draft' OR post_status = 'pending' ) "; 195 195 196 $dir = ( 'pending' == $type ) ? 'ASC' : 'DESC'; 197 196 198 if( !$editable ) { 197 199 $other_unpubs = ''; 198 200 } else { 199 201 $editable = join(',', $editable); 200 $other_unpubs = $wpdb->get_results("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != '$user_id' ");202 $other_unpubs = $wpdb->get_results("SELECT ID, post_title, post_author FROM $wpdb->posts WHERE post_type = 'post' AND $type_sql AND post_author IN ($editable) AND post_author != '$user_id' ORDER BY post_modified $dir"); 201 203 } 202 204 … … 232 234 global $wpdb; 233 235 $user_id = (int) $user_id; 234 $query = "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = $user_id ORDER BY IDDESC";236 $query = "SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'draft' AND post_author = $user_id ORDER BY post_modified DESC"; 235 237 $query = apply_filters('get_users_drafts', $query); 236 238 return $wpdb->get_results( $query );
Note: See TracChangeset
for help on using the changeset viewer.