Changeset 2701
- Timestamp:
- 07/08/2005 10:59:15 PM (21 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
-
wp-admin/admin-db.php (added)
-
wp-admin/admin-functions.php (modified) (1 diff)
-
wp-admin/admin.php (modified) (1 diff)
-
wp-admin/edit.php (modified) (1 diff)
-
wp-admin/index.php (modified) (3 diffs)
-
wp-admin/post.php (modified) (1 diff)
-
wp-admin/upgrade-schema.php (modified) (1 diff)
-
wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r2699 r2701 1389 1389 add_action('admin_footer', 'pimp_firefox'); 1390 1390 1391 function documentation_link( $for ) { 1392 return; 1393 } 1394 1391 1395 ?> -
trunk/wp-admin/admin.php
r2623 r2701 6 6 7 7 require_once(ABSPATH . 'wp-admin/admin-functions.php'); 8 require_once(ABSPATH . 'wp-admin/admin-db.php'); 8 9 auth_redirect(); 9 10 -
trunk/wp-admin/edit.php
r2646 r2701 10 10 get_currentuserinfo(); 11 11 12 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); 13 if (1 < $user_level) { 14 $editable = $wpdb->get_col("SELECT ID FROM $wpdb->users WHERE user_level <= '$user_level' AND ID != $user_ID"); 15 if( is_array( $editable ) == false ) 16 $other_drafts = ''; 17 else { 18 $editable = join(',', $editable); 19 $other_drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author IN ($editable) "); 20 } 21 } else { 22 $other_drafts = false; 23 } 12 $drafts = get_users_drafts( $user_ID ); 13 $other_drafts = get_others_drafts( $user_ID); 24 14 25 15 if ($drafts || $other_drafts) { -
trunk/wp-admin/index.php
r2570 r2701 52 52 <div> 53 53 <h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">»</a></h3> 54 55 <?php 56 if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) : 57 ?> 58 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p> 59 <?php endif; ?> 60 </div> 61 62 <?php endif; ?> 63 54 64 <ul> 55 65 <?php … … 61 71 ?> 62 72 </ul> 63 <?php64 if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) :65 ?>66 <p><strong><a href="moderation.php"><?php echo sprintf(__('There are comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p>67 <?php endif; ?>68 </div>69 70 <?php endif; ?>71 73 72 74 <div> … … 147 149 </div> 148 150 </div> 149 <?php150 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID");151 if ($drafts) {152 ?>153 <div class="wrap">154 151 155 <p><strong><?php _e('Your Drafts:') ?></strong>156 <?php157 $i = 0;158 foreach ($drafts as $draft) {159 if (0 != $i)160 echo ', ';161 $draft->post_title = stripslashes($draft->post_title);162 if ($draft->post_title == '')163 $draft->post_title = sprintf(__('Post #%s'), $draft->ID);164 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";165 ++$i;166 }167 ?>168 .</p>169 </div>170 <?php } ?>171 152 <?php 172 153 require('./admin-footer.php'); -
trunk/wp-admin/post.php
r2692 r2701 323 323 <?php endif; ?> 324 324 <?php 325 if ( user_can_create_draft($user_ID)) {325 if ( user_can_create_draft($user_ID) ) { 326 326 $action = 'post'; 327 327 get_currentuserinfo(); 328 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); 329 if ($drafts) { 328 if ( $drafts = get_users_drafts( $user_ID ) ) { 330 329 ?> 331 330 <div class="wrap"> 332 331 <p><strong><?php _e('Your Drafts:') ?></strong> 333 332 <?php 334 $i = 0;335 foreach ($drafts as $draft) {336 if ( 0 != $i)333 for ( $i = 0; $i < 15; $i++ ) { 334 $draft = $drafts[$i]; 335 if ( 0 != $i ) 337 336 echo ', '; 338 337 $draft->post_title = stripslashes($draft->post_title); 339 if ( $draft->post_title == '')338 if ( empty($draft->post_title) ) 340 339 $draft->post_title = sprintf(__('Post # %s'), $draft->ID); 341 340 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 342 ++$i; 343 } 344 ?>.</p> 341 } 342 ?> 343 <?php if ( 15 < count($drafts) ) { ?> 344 , <a href="edit.php"><?php echo sprintf(__('and %s more'), (count($drafts) - 15) ); ?> »</a> 345 <?php } ?> 346 .</p> 345 347 </div> 346 348 <?php -
trunk/wp-admin/upgrade-schema.php
r2636 r2701 8 8 category_description longtext NOT NULL, 9 9 category_parent bigint(20) NOT NULL default '0', 10 category_count bigint(20) NOT NULL default '0', 10 11 PRIMARY KEY (cat_ID), 11 12 KEY category_nicename (category_nicename) -
trunk/wp-settings.php
r2700 r2701 50 50 $wpdb->postmeta = $table_prefix . 'postmeta'; 51 51 $wpdb->usermeta = $table_prefix . 'usermeta'; 52 53 $wpdb->prefix = $table_prefix; 52 54 53 55 if ( defined('CUSTOM_USER_TABLE') )
Note: See TracChangeset
for help on using the changeset viewer.