Changeset 1979
- Timestamp:
- 12/19/2004 02:30:40 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/index.php
r1976 r1979 3 3 $title = __('Dashboard'); 4 4 require_once('admin-header.php'); 5 require_once (ABSPATH . WPINC . '/rss-functions.php'); 5 6 6 7 $today = current_time('mysql'); … … 14 15 ?> 15 16 <div> 16 <h3><?php _e('Posts'); ?> </h3>17 <h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">»</a></h3> 17 18 <ul> 18 19 <?php … … 50 51 ?> 51 52 <div> 52 <h3><?php _e('Comments'); ?> </h3>53 <h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">»</a></h3> 53 54 <ul> 54 55 <?php … … 63 64 if ( $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $tablecomments WHERE comment_approved = '0'") ) : 64 65 ?> 65 <p>< a href="moderation.php"><?php echo sprintf(__('There are comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></p>66 <p><strong><a href="moderation.php"><?php echo sprintf(__('There are comments in moderation (%s)'), number_format($numcomments) ); ?> »</a></strong></p> 66 67 <?php endif; ?> 67 68 </div> … … 86 87 </div> 87 88 88 <h2><?php _e('Dashboard'); ?></h2> 89 <h2><?php _e('Dashboard'); ?></h2> 90 <p><?php _e('Below is the latest news from the official WordPress development blog, click on a title to read the full entry.'); ?></p> 91 <?php 92 $rss = @fetch_rss('http://wordpress.org/development/feed/'); 93 if ( $rss ) { 94 ?> 95 <h3>WordPress Development Blog</h3> 96 <?php 97 $rss->items = array_slice($rss->items, 0, 4); 98 foreach ($rss->items as $item ) { 99 ?> 100 <h4><a href='<?php echo $item['link']; ?>'><?php echo wp_specialchars($item['title']); ?></a></h4> 101 <p><?php echo $item['description']; ?></p> 102 <?php 103 } 104 } 105 ?> 89 106 <br clear="all" /> 90 107 </div> 108 <?php 109 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'draft' AND post_author = $user_ID"); 110 if ($drafts) { 111 ?> 91 112 <div class="wrap"> 92 <p> 93 <strong> 94 <?php _e('Your Drafts:') ?> 95 </strong> 96 <br /> 97 <?php 98 get_currentuserinfo(); 99 $drafts = $wpdb->get_results("SELECT ID, post_title FROM $tableposts WHERE post_status = 'draft' AND post_author = $user_ID"); 100 if ($drafts) { 101 ?> 113 114 <p><strong><?php _e('Your Drafts:') ?></strong> 102 115 <?php 103 116 $i = 0; … … 108 121 if ($draft->post_title == '') 109 122 $draft->post_title = sprintf(__('Post #%s'), $draft->ID); 110 echo "<a href='post.php?action=edit& post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>";123 echo "<a href='post.php?action=edit&post=$draft->ID' title='" . __('Edit this draft') . "'>$draft->post_title</a>"; 111 124 ++$i; 112 125 } 113 }else{ 114 echo ('No Entries found.'); 115 } 116 ?> 117 </p> 118 </div> 126 ?> 127 .</p> 128 </div> 129 <?php } ?> 119 130 <?php 120 131 require('./admin-footer.php'); -
trunk/wp-admin/wp-admin.css
r1978 r1979 6 6 padding: 1em; 7 7 border: 1px solid #69c; 8 margin-left: 1em; 8 9 } 9 10 -
trunk/wp-includes/functions.php
r1972 r1979 373 373 374 374 // If the new and old values are the same, no need to update. 375 if ($newvalue == get_ settings($option_name)) {375 if ($newvalue == get_option($option_name)) { 376 376 return true; 377 377 } 378 379 // If it's not there add it 380 if ( !$wpdb->get_var("SELECT option_name FROM $wpdb->options WHERE option_name = '$option_name'") ) 381 add_option($option_name); 378 382 379 383 $newvalue = $wpdb->escape($newvalue); … … 385 389 386 390 // thx Alex Stapleton, http://alex.vort-x.net/blog/ 387 function add_option($name, $value = '', $description = '' ) {391 function add_option($name, $value = '', $description = '', $autoload = 'yes') { 388 392 global $wpdb; 389 393 if ( is_array($value) || is_object($value) ) … … 394 398 $value = $wpdb->escape($value); 395 399 $description = $wpdb->escape($description); 396 $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, option_description ) VALUES ('$name', '$value', '$description')");400 $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, option_description, autoload) VALUES ('$name', '$value', '$description', '$autoload')"); 397 401 398 402 if($wpdb->insert_id) { -
trunk/wp-includes/version.php
r1874 r1979 3 3 // This just holds the version number, in a separate file so we can bump it without cluttering the CVS 4 4 5 $wp_version = '1. 3-alpha-5';5 $wp_version = '1.5-alpha-6'; 6 6 7 7 ?> -
trunk/wp-login.php
r1974 r1979 11 11 12 12 // If someone has moved WordPress let's try to detect it 13 if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER[' SCRIPT_NAME']) != get_settings('siteurl') )14 update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER[' SCRIPT_NAME']) );13 if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') ) 14 update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) ); 15 15 16 16 switch($action) {
Note: See TracChangeset
for help on using the changeset viewer.