When there's only one user on a blog edit.php displays an error. Fixed.
http://wordpress.org/support/6/12915 git-svn-id: http://svn.automattic.com/wordpress/trunk@1680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ed8f14406a
commit
c83efe02ea
|
@ -10,7 +10,9 @@ get_currentuserinfo();
|
|||
$drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID");
|
||||
if (1 < $user_level) {
|
||||
$editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID");
|
||||
$editable = join($editable, ',');
|
||||
if( is_array( $editable ) == false )
|
||||
$editable = array( "1" );
|
||||
$editable = join(',', $editable);
|
||||
$other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) ");
|
||||
} else {
|
||||
$other_drafts = false;
|
||||
|
|
Loading…
Reference in New Issue