Changeset 789

Show
Ignore:
Timestamp:
10/05/06 17:45:26 (2 years ago)
Author:
donncha
Message:

WP Merge to rev 4347

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-footer.php

    r550 r789  
    11 
    2 <div id="footer"><p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p> 
    3 <p> 
    4 <a href="http://codex.wordpress.org/"><?php _e('Documentation'); ?></a> &#8212; <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br /
    5 <?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), number_format(timer_stop(), 2)); ?
    6 </p
    7  
     2<div id="footer"> 
     3       <p><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p> 
     4       <p
     5               <?php _e('<a href="http://codex.wordpress.org/">Documentation</a>'); ?> &#8212; <?php _e('<a href="http://wordpress.org/support/">Support Forums</a>'); ?> <br /
     6               <?php bloginfo('version'); ?> &#8212; <?php printf(__('%s seconds'), timer_stop(0, 2)); ?
     7        </p> 
    88</div> 
    99<?php do_action('admin_footer', ''); ?> 
  • trunk/wp-admin/admin-functions.php

    r788 r789  
    675675function return_link_categories_list($parent = 0) { 
    676676        global $wpdb; 
    677         return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND link_count > 0"); 
     677        return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC"); 
    678678} 
    679679 
     
    17211721        } 
    17221722 
    1723         if (!$plugins_dir || !$plugin_files) { 
     1723        if ( !$plugins_dir || !$plugin_files ) 
    17241724                return $wp_plugins; 
    1725         } 
    1726  
    1727         sort($plugin_files); 
    1728  
    1729         foreach ($plugin_files as $plugin_file) { 
    1730                 if ( !is_readable("$plugin_root/$plugin_file")) 
     1725 
     1726        foreach ( $plugin_files as $plugin_file ) { 
     1727                if ( !is_readable("$plugin_root/$plugin_file") ) 
    17311728                        continue; 
    17321729 
    17331730                $plugin_data = get_plugin_data("$plugin_root/$plugin_file"); 
    17341731 
    1735                 if (empty ($plugin_data['Name'])) { 
     1732                if ( empty ($plugin_data['Name']) ) 
    17361733                        continue; 
    1737                 } 
    17381734 
    17391735                $wp_plugins[plugin_basename($plugin_file)] = $plugin_data; 
    17401736        } 
     1737 
     1738        uasort($wp_plugins, create_function('$a, $b', 'return strnatcasecmp($a["Name"], $b["Name"]);')); 
    17411739 
    17421740        return $wp_plugins; 
     
    19891987 
    19901988?> 
    1991 <p><?php _e('Text linked to file') ?><br /> 
    1992 <textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid) ?></a></textarea></p> 
    1993 <p><?php _e('Text linked to subpost') ?><br /> 
    1994 <textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $post->post_title ?></a></textarea></p> 
     1989<form id="the-attachment-links"> 
     1990<table> 
     1991        <tr> 
     1992                <th scope="row"><?php _e('Text linked to file') ?></th> 
     1993                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo basename($post->guid) ?></a></textarea></td> 
     1994        </tr> 
     1995        <tr> 
     1996                <th scope="row"><?php _e('Text linked to subpost') ?></th> 
     1997                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $post->post_title ?></a></textarea></td> 
     1998        </tr> 
    19951999<?php if ( $icon ) : ?> 
    1996 <p><?php _e('Thumbnail linked to file') ?><br /> 
    1997 <textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo $icon ?></a></textarea></p> 
    1998 <p><?php _e('Thumbnail linked to subpost') ?><br /> 
    1999 <textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $icon ?></a></textarea></p> 
     2000        <tr> 
     2001                <th scope="row"><?php _e('Thumbnail linked to file') ?></th> 
     2002                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid ?>" class="attachmentlink"><?php echo $icon ?></a></textarea></td> 
     2003        </tr> 
     2004        <tr> 
     2005                <th scope="row"><?php _e('Thumbnail linked to subpost') ?></th> 
     2006                <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link($post->ID) ?>" rel="attachment" id="<?php echo $post->ID ?>"><?php echo $icon ?></a></textarea></td> 
     2007        </tr> 
    20002008<?php endif; ?> 
     2009</table> 
     2010</form> 
    20012011<?php 
    20022012} 
  • trunk/wp-admin/edit-form-advanced.php

    r788 r789  
    189189if (current_user_can('upload_files')) { 
    190190        $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); 
    191         $uploading_iframe_src = wp_nonce_url("inline-uploading.php?action=view&amp;post=$uploading_iframe_ID", 'inlineuploading'); 
     191        $uploading_iframe_src = wp_nonce_url("upload.php?style=inline&amp;tab=upload&amp;post_id=$uploading_iframe_ID", 'inlineuploading'); 
    192192        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 
    193193        if ( false != $uploading_iframe_src ) 
  • trunk/wp-admin/edit-page-form.php

    r788 r789  
    157157if (current_user_can('upload_files')) { 
    158158        $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); 
    159         $uploading_iframe_src = wp_nonce_url("inline-uploading.php?action=view&amp;post=$uploading_iframe_ID", 'inlineuploading'); 
     159        $uploading_iframe_src = wp_nonce_url("upload.php?style=inline&amp;tab=upload&amp;post_id=$uploading_iframe_ID", 'inlineuploading'); 
    160160        $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 
    161161        if ( false != $uploading_iframe_src ) 
  • trunk/wp-admin/edit.php

    r774 r789  
    116116        <fieldset> 
    117117        <legend><?php _e('Browse Category&hellip;') ?></legend> 
    118         <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=0&hierarchical=1&show_count=1&selected='.$cat);?> 
     118        <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?> 
    119119        <input type="submit" name="submit" value="<?php _e('Show Category') ?>"  />  
    120120        </fieldset> 
    121121</form> 
     122 
     123<?php do_action('restrict_manage_posts'); ?> 
    122124 
    123125<br style="clear:both;" /> 
  • trunk/wp-admin/index.php

    r723 r789  
    2727foreach ($rss->items as $item ) { 
    2828?> 
    29         <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wp_specialchars($item['title']); ?></a></li> 
     29        <li><a href="<?php echo wp_filter_kses($item['link']); ?>"><?php echo wptexturize(wp_specialchars($item['title'])); ?></a></li> 
    3030<?php } ?> 
    3131</ul> 
     
    119119 
    120120<ul> 
    121 <li><a href="post-new.php"><?php _e('Write a post'); ?></a></li> 
    122 <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> 
    123 <li><a href="link-add.php"><?php _e('Add a bookmark to your blogroll'); ?></a></li> 
    124 <li><a href="themes.php"><?php _e('Change your site&#8217;s look or theme'); ?></a></li> 
     121<?php if ( current_user_can('edit_posts') ) : ?> 
     122        <li><a href="post-new.php"><?php _e('Write a post'); ?></a></li> 
     123<?php endif; ?> 
     124        <li><a href="profile.php"><?php _e('Update your profile or change your password'); ?></a></li> 
     125<?php if ( current_user_can('manage_links') ) : ?> 
     126        <li><a href="link-add.php"><?php _e('Add a bookmark to your blogroll'); ?></a></li> 
     127<?php endif; ?> 
     128<?php if ( current_user_can('switch_themes') ) : ?> 
     129        <li><a href="themes.php"><?php _e('Change your site&#8217;s look or theme'); ?></a></li> 
     130<?php endif; ?> 
    125131</ul> 
    126         <p><?php _e("Below is the latest news from the official WordPress development blog, click on a title to read the full entry. If you need help with WordPress please see our <a href='http://codex.wordpress.org/'>great documentation</a> or if that doesn't help visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 
    127         <?php 
    128         $rss = @fetch_rss('http://wordpress.org/development/feed/'); 
    129         if ( isset($rss->items) && 0 != count($rss->items) ) { 
    130                 ?> 
    131                 <h3><?php _e('WordPress Development Blog'); ?></h3> 
    132                 <?php 
    133                 $rss->items = array_slice($rss->items, 0, 3); 
    134                 foreach ($rss->items as $item ) { 
    135                         ?> 
    136                         <h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> &#8212; <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4> 
    137                         <p><?php echo $item['description']; ?></p> 
    138                         <?php 
    139                 } 
     132<p><?php _e("Need help with WordPress? Please see our <a href='http://codex.wordpress.org/'>documentation</a> or visit the <a href='http://wordpress.org/support/'>support forums</a>."); ?></p> 
     133<?php 
     134$rss = @fetch_rss('http://wordpress.org/development/feed/'); 
     135if ( isset($rss->items) && 0 != count($rss->items) ) { 
     136?> 
     137<h3><?php _e('WordPress Development News'); ?></h3> 
     138<?php 
     139$rss->items = array_slice($rss->items, 0, 3); 
     140foreach ($rss->items as $item ) { 
     141?> 
     142<h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> &#8212; <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4> 
     143<p><?php echo $item['description']; ?></p> 
     144<?php 
    140145        } 
    141         $rss = @fetch_rss('http://planet.wordpress.org/feed/'); 
    142         if ( isset($rss->items) && 0 != count($rss->items) ) { 
    143                 ?> 
    144                 <div id="planetnews"> 
    145                 <h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> &raquo;</a></h3> 
    146                 <ul> 
    147                 <?php 
    148                 $rss->items = array_slice($rss->items, 0, 20); 
    149                 foreach ($rss->items as $item ) { 
    150                        ?
    151                        <li><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a></li
    152                        <?php 
    153                 } 
    154                 ?> 
    155                </ul
    156                </div
    157                <?php 
     146
     147?> 
     148 
     149 
     150<?php 
     151$rss = @fetch_rss('http://planet.wordpress.org/feed/'); 
     152if ( isset($rss->items) && 0 != count($rss->items) ) { 
     153?> 
     154<div id="planetnews"> 
     155<h3><?php _e('Other WordPress News'); ?> <a href="http://planet.wordpress.org/"><?php _e('more'); ?> &raquo;</a></h3
     156<ul
     157<?php 
     158$rss->items = array_slice($rss->items, 0, 20); 
     159foreach ($rss->items as $item ) { 
     160?
     161<li><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a></li
     162<?php 
    158163        } 
     164?> 
     165</ul> 
     166</div> 
     167<?php 
     168} 
    159169?> 
    160170<div style="clear: both">&nbsp; 
  • trunk/wp-admin/menu.php

    r786 r789  
    3535$submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php'); 
    3636$submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php'); 
     37$submenu['edit.php'][12] = array(__('Uploads'), 'upload_files', 'upload.php'); 
    3738$submenu['edit.php'][15] = array(__('Categories'), 'manage_categories', 'categories.php'); 
    3839$submenu['edit.php'][20] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); 
     
    129130} 
    130131 
     132unset($id); 
    131133get_currentuserinfo(); 
    132134if( is_site_admin() ) { 
     
    138140        $submenu[ 'wpmu-admin.php' ][30] = array( __('Upgrade'), '10', 'wpmu-upgrade-site.php' ); 
    139141} 
    140 ksort($menu); // make it all pretty 
     142uksort($menu, "strnatcasecmp"); // make it all pretty 
    141143 
    142144if (! user_can_access_admin_page()) { 
  • trunk/wp-admin/options-discussion.php

    r761 r789  
    6262<fieldset class="options"> 
    6363<legend><?php _e('Comment Moderation') ?></legend> 
    64 <p><?php printf(__('Hold a comment in the queue if it contains more than %s links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p> 
     64<p><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p> 
    6565 
    6666<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="moderation.php">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p> 
  • trunk/wp-admin/options-general.php

    r786 r789  
    9292<tr> 
    9393<th scope="row">&nbsp;</th> 
    94 <td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Save option to update sample output.') ?> </td> 
     94<td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Update options" to update sample output.') ?> </td> 
    9595</tr> 
    9696<tr> 
  • trunk/wp-admin/options.php

    r735 r789  
    2121} 
    2222 
    23 function sanitize_option($option, $value) { 
     23function sanitize_option($option, $value) { // Remember to call stripslashes! 
    2424 
    2525        switch ($option) { 
    2626                case 'admin_email': 
    27                 case 'new_admin_email': 
     27                       $value = stripslashes($value); 
    2828                        $value = sanitize_email($value); 
    2929                        break; 
     
    3232                case 'mailserver_port': 
    3333                case 'comment_max_links': 
     34                        $value = stripslashes($value); 
    3435                        $value = abs((int) $value); 
    3536                        break; 
     
    3738                case 'posts_per_page': 
    3839                case 'posts_per_rss': 
     40                        $value = stripslashes($value); 
    3941                        $value = (int) $value; 
    4042                        if ( empty($value) ) $value = 1; 
     
    4446                case 'default_ping_status': 
    4547                case 'default_comment_status': 
     48                        $value = stripslashes($value); 
    4649                        // Options that if not there have 0 value but need to be something like "closed" 
    4750                        if ( $value == '0' || $value == '') 
     
    5255                case 'blogname': 
    5356                        if (current_user_can('unfiltered_html') == false) 
    54                                 $value = wp_filter_post_kses( $value ); 
     57                                $value = wp_filter_post_kses( $value ); // calls stripslashes then addslashes 
     58                        $value = stripslashes($value); 
    5559                        break; 
    5660 
    5761                case 'blog_charset': 
    58                         $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); 
     62                        $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes 
    5963                        break; 
    6064 
     
    6771                case 'upload_path': 
    6872                        $value = strip_tags($value); 
    69                         $value = wp_filter_kses($value); 
     73                        $value = wp_filter_kses($value); // calls stripslashes then addslashes 
     74                        $value = stripslashes($value); 
    7075                        break; 
    7176 
    7277                case 'gmt_offset': 
    73                         $value = preg_replace('/[^0-9:.-]/', '', $value); 
     78                        $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes 
    7479                        break; 
    7580 
    7681                case 'siteurl': 
    7782                case 'home': 
     83                        $value = stripslashes($value); 
    7884                        $value = clean_url($value); 
     85                        break; 
     86                default : 
     87                        $value = stripslashes($value); 
    7988                        break; 
    8089        } 
     
    9099        check_admin_referer('update-options'); 
    91100 
    92         if (!$_POST['page_options']) { 
    93                 foreach ($_POST as $key => $value) { 
    94                         $options[] = $key; 
     101        if ( !$_POST['page_options'] ) { 
     102                foreach ( (array) $_POST as $key => $value) { 
     103                        if ( !in_array($key, array('_wpnonce', '_wp_http_referer')) ) 
     104                                $options[] = $key; 
    95105                } 
    96106        } else { 
     
    101111                foreach ($options as $option) { 
    102112                        $option = trim($option); 
    103                         $value = trim(stripslashes($_POST[$option])); 
    104                         $value = sanitize_option($option, $value); 
     113                        $value = trim($_POST[$option]); 
     114                        $value = sanitize_option($option, $value); // This does stripslashes on those that need it 
    105115                        update_option($option, $value); 
    106116                } 
     
    120130 
    121131<div class="wrap"> 
    122   <h2><?php _e('All options'); ?></h2> 
    123   <form name="form" action="options.php" method="post"
     132  <h2><?php _e('All Options'); ?></h2> 
     133  <form name="form" action="options.php" method="post" id="all-options"
    124134  <?php wp_nonce_field('update-options') ?> 
    125135  <input type="hidden" name="action" value="update" /> 
     136        <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Options &raquo;') ?>" /></p> 
    126137  <table width="98%"> 
    127138<?php 
    128139$options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); 
     140foreach ( (array) $options as $option ) 
     141        $options_to_update[] = $option->option_name; 
     142$options_to_update = implode(',', $options_to_update); 
     143?> 
    129144 
    130 foreach ($options as $option) : 
     145<input type="hidden" name="page_options" value="<?php echo $options_to_update; ?>" />  
     146 
     147<?php 
     148foreach ( (array) $options as $option) : 
    131149        $value = wp_specialchars($option->option_value, 'single'); 
    132150        echo " 
    133151<tr> 
    134152        <th scope='row'><label for='$option->option_name'>$option->option_name</label></th> 
    135         <td><input type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' /></td> 
     153<td>"; 
     154 
     155        if (stristr($value, "\n")) echo "<textarea class='all-options' name='$option->option_name' id='$option->option_name' cols='30' rows='5'>$value</textarea>"; 
     156        else echo "<input class='all-options' type='text' name='$option->option_name' id='$option->option_name' size='30' value='" . $value . "' />"; 
     157         
     158        echo "</td> 
    136159        <td>$option->option_description</td> 
    137160</tr>"; 
     
    139162?> 
    140163  </table> 
    141 <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings &raquo;') ?>" /></p> 
     164<p class="submit"><input type="submit" name="Update" value="<?php _e('Update Options &raquo;') ?>" /></p> 
    142165  </form> 
    143166</div> 
  • trunk/wp-admin/page-new.php

    r722 r789  
    99?> 
    1010 
    11 <?php if ( isset($_GET['saved']) || isset($_GET['posted'])  ) : ?> 
    12 <div id="message" class="updated fade"><p><strong><?php _e('Page saved.') ?> <a href="edit-pages.php"><?php _e('Manage pages'); ?></a> | <a href="<?php echo get_bloginfo('home') . '/'; ?>"><?php _e('View site') ; ?> &raquo;</a></strong></p></div> 
     11<?php if ( (isset($_GET['posted']) && $_GET['posted'])  || isset($_GET['saved'])  ) : ?> 
     12<div id="message" class="updated fade"><p><strong><?php _e('Page saved.') ?></strong> <a href="edit-pages.php"><?php _e('Manage pages'); ?></a> | <a href="<?php echo get_page_link( isset($_GET['posted']) ? $_GET['posted'] : $_GET['saved'] ); ?>"><?php _e('View page') ; ?> &raquo;</a></p></div> 
    1313<?php endif; ?> 
    1414 
  • trunk/wp-admin/page.php

    r734 r789  
    3131                } 
    3232        } else { 
    33                 $location = 'page-new.php?posted=true'
     33                $location = "page-new.php?posted=$page_ID"
    3434        } 
    3535 
     
    105105                        } 
    106106                } else { 
    107                         $location = 'page-new.php?posted=true'
     107                        $location = "page-new.php?posted=$page_ID"
    108108                } 
    109109 
  • trunk/wp-admin/plugins.php

    r774 r789  
    9292                <th style="text-align: center"><?php _e('Version'); ?></th> 
    9393                <th><?php _e('Description'); ?></th> 
    94                 <th style="text-align: center"><?php _e('Action'); ?></th> 
     94                <th style="text-align: center"<?php if ( current_user_can('edit_plugins') ) echo ' colspan="2"'; ?>><?php _e('Action'); ?></th> 
    9595        </tr> 
    9696        </thead> 
     
    9898        $style = ''; 
    9999 
    100         function sort_plugins($plug1, $plug2) { 
    101                 return strnatcasecmp($plug1['Name'], $plug2['Name']); 
    102         } 
    103  
    104         uksort($plugins, 'sort_plugins'); 
    105  
    106100        foreach($plugins as $plugin_file => $plugin_data) { 
    107101                $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate'; 
    108102 
    109103                if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) { 
    110                         $action = "<a href='" . wp_nonce_url("plugins.php?action=deactivate&amp;plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . "' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 
     104                        $toggle = "<a href='" . wp_nonce_url("plugins.php?action=deactivate&amp;plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . "' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 
    111105                        $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>"; 
    112106                        $style .= $style == 'alternate' ? ' active' : 'active'; 
    113107                } else { 
    114                         $action = "<a href='" . wp_nonce_url("plugins.php?action=activate&amp;plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 
     108                        $toggle = "<a href='" . wp_nonce_url("plugins.php?action=activate&amp;plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 
    115109                } 
    116110                $plugin_data['Description'] = wp_kses($plugin_data['Description'], array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()) ); ; 
    117                 if ($style != '') $style = 'class="' . $style . '"'; 
     111                if ( $style != '' ) 
     112                        $style = 'class="' . $style . '"'; 
     113                if ( is_writable(ABSPATH . 'wp-content/plugins/' . $plugin_file) ) 
     114                        $edit = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>"; 
     115                else 
     116                        $edit = ''; 
     117 
    118118                echo " 
    119119        <tr $style> 
     
    121121                <td class='vers'>{$plugin_data['Version']}</td> 
    122122                <td class='desc'>{$plugin_data['Description']} <cite>".sprintf(__('By %s'), $plugin_data['Author']).".</cite></td> 
    123                 <td class='togl'>$action</td> 
     123                <td class='togl'>$toggle</td>"; 
     124                if ( current_user_can('edit_plugins') ) 
     125                echo " 
     126                <td>$edit</td>"; 
     127                echo" 
    124128        </tr>"; 
    125129        } 
  • trunk/wp-admin/post-new.php

    r770 r789  
    2020} 
    2121 
    22 if ( isset($_GET['posted']) ) : ?> 
    23 <div id="message" class="updated fade"><p><?php printf(__('Post saved. <a href="%s">View site &raquo;</a>'), get_bloginfo('home') . '/'); ?></p></div> 
     22if ( isset($_GET['posted']) && $_GET['posted'] ) : ?> 
     23<div id="message" class="updated fade"><p><strong><?php _e('Post saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View post'); ?> &raquo;</a></p></div> 
    2424<?php 
    2525endif; 
  • trunk/wp-admin/post.php

    r734 r789  
    3333                } 
    3434        } else { 
    35                 $location = 'post-new.php?posted=true'
     35                $location = "post-new.php?posted=$post_ID"
    3636        } 
    3737 
     
    107107                        } 
    108108                } else { 
    109                         $location = 'post-new.php?posted=true'
     109                        $location = "post-new.php?posted=$post_ID"
    110110                } 
    111111 
  • trunk/wp-admin/templates.php

    r638 r789  
    6565                $f = @ fopen($real_file, 'r'); 
    6666                if ( $f ) { 
    67                         $content = fread($f, filesize($real_file)); 
    68                         $content = htmlspecialchars($content); 
     67                        if ( filesize($real_file ) > 0 ) { 
     68                                $content = fread($f, filesize($real_file)); 
     69                                $content = htmlspecialchars($content); 
     70                        } else { 
     71                                $content = ''; 
     72                        } 
    6973                } else { 
    7074                        $error = true; 
  • trunk/wp-admin/upgrade-functions.php

    r565 r789  
    9393 
    9494        // Default comment 
    95         $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_date_gmt, comment_content) VALUES ('1', '".$wpdb->escape(__('Mr WordPress'))."', '', 'http://wordpress.org/', '$now', '$now_gmt', '".$wpdb->escape(__('Hi, this is a comment.<br />To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.'))."')"); 
     95        $wpdb->query("INSERT INTO $wpdb->comments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_date_gmt, comment_content) VALUES ('1', '".$wpdb->escape(__('Mr WordPress'))."', '', 'http://wordpress.org/', '$now', '$now_gmt', '".$wpdb->escape(__('Hi, this is a comment.<br />To delete a comment, just log in and view the post&#039;s comments, there you will have the option to edit or delete them.'))."')"); 
    9696 
    9797        // First Page 
    98  
    9998        $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(__('about'))."', '$now', '$now_gmt', 'publish', 'page', '', '', '')"); 
    10099} 
     
    106105        $email = $user->user_email; 
    107106        $name = $user->user_login; 
    108         $message_headers = 'From: ' . $blog_title . ' <wordpress@' . $_SERVER['SERVER_NAME'] . '>'; 
     107        $message_headers = 'From: "' . $blog_title . '" <wordpress@' . $_SERVER['SERVER_NAME'] . '>'; 
    109108        $message = sprintf(__("Your new WordPress blog has been successfully set up at: 
    110109 
  • trunk/wp-admin/upgrade-schema.php

    r761 r789  
    88  cat_name varchar(55) NOT NULL default '', 
    99  category_nicename varchar(200) NOT NULL default '', 
    10   category_description longtext NOT NULL default ''
     10  category_description longtext NOT NULL
    1111  category_parent bigint(20) NOT NULL default '0', 
    1212  category_count bigint(20) NOT NULL default '0', 
     
    311311 
    312312        // Delete unused options 
    313         $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog'); 
     313        $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action'); 
    314314        foreach ($unusedoptions as $option) : 
    315315                delete_option($option); 
  • trunk/wp-admin/users.php

    r774 r789  
    8585        function do_paging() { 
    8686                if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results 
    87                         $prev_page = ( $this->page > 1) ? true : false; 
    88                         $next_page = ( ($this->page * $this->users_per_page) < $this->total_users_for_query ) ? true : false; 
    89                         $this->paging_text = ''; 
    90                         if ( $prev_page ) 
    91                                 $this->paging_text .= '<p class="alignleft"><a href="' . add_query_arg(array('usersearch' => $this->search_term, 'userspage' => $this->page - 1), 'users.php?') . '">&laquo; Previous Page</a></p>'; 
    92                         if ( $next_page ) 
    93                                 $this->paging_text .= '<p class="alignright"><a href="' . add_query_arg(array('usersearch' => $this->search_term, 'userspage' => $this->page + 1), 'users.php?') . '">Next Page &raquo;</a></p>'; 
    94                         if ( $prev_page || $next_page
    95                                $this->paging_text .= '<br style="clear:both" />'
     87                        $this->paging_text = paginate_links( array( 
     88                               'total' => ceil($this->total_users_for_query / $this->users_per_page), 
     89                               'current' => $this->page, 
     90                               'prev_text' => '&laquo; Previous Page', 
     91                                'next_text' => 'Next Page &raquo;', 
     92                               'base' => 'users.php?%_%', 
     93                                'format' => 'userspage=%#%', 
     94                               'add_args' => array( 'usersearch' => urlencode($this->search_term)
     95                        ) )
    9696                } 
    9797        } 
     
    498498<?php 
    499499foreach($roleclasses as $role => $roleclass) { 
    500         ksort($roleclass); 
     500        uksort($roleclass, "strnatcasecmp"); 
    501501?> 
    502502 
  • trunk/wp-admin/wp-admin.css

    r788 r789  
    187187        padding: 0px; 
    188188        margin-bottom: 16px; 
    189         height: 15em; 
     189        height: 16em; 
    190190        width: 100%; 
    191191/*      overflow-y: hidden;*/ 
     
    401401} 
    402402 
     403textarea.all-options, input.all-options { 
     404        width: 250px; 
     405} 
     406 
    403407#adminmenu { 
    404408        background: #83B4D8; 
     
    590594#login { 
    591595        position: relative; 
    592         background: url('images/login-bkg-tile.gif') no-repeat top center #fbfbfb
     596        background: url('images/login-bkg-tile.gif') no-repeat top center
    593597        color: #fff; 
    594         /* height: 430px; */ 
    595598        margin: 5em auto; 
    596         padding: 45px 50px 0; 
     599        padding: 20px 50px 0; 
    597600        width: 325px; 
    598601} 
     
    608611} 
    609612 
     613#login #login_error a { 
     614        color: #ebcd4e; 
     615        border-color: #ebcd4e; 
     616} 
     617 
    610618#login #send { 
    611619        color: #fff; 
     
    615623} 
    616624 
    617 #login h1
     625#login h1 a
    618626        margin: 0 auto; 
    619         padding-bottom: 10px; 
    620         left: 137px; 
    621         height: 75px; 
    622         width: 75px; 
    623 
    624  
    625 #login h1 a { 
     627        height: 88px; 
     628        width: 320px; 
    626629        display: block; 
    627         text-indent: -9999px; 
    628630        border-bottom: none; 
     631} 
     632 
     633#login .hide { 
     634        display: none; 
     635} 
     636 
     637#login .message { 
     638        font-size: 10pt; 
     639        text-align: center; 
     640} 
     641 
     642#login .register { 
     643        font-size: 20px; 
    629644} 
    630645 
     
    637652        list-style: none; 
    638653        margin: 0 -50px; 
    639         padding: 0 50px 5px
     654        padding: 10px 50px 25px;
    640655} 
    641656 
    642657#login ul:after { 
    643   content: "."; 
    644   display: block; 
    645   height: 0; 
    646   clear: both; 
    647   visibility: hidden; 
     658       content: "."; 
     659       display: block; 
     660       height: 0; 
     661       clear: both; 
     662       visibility: hidden; 
    648663} 
    649664 
    650665#login ul li { 
    651666        float: left; 
    652         font-size: 11px; 
    653         padding: 15px 0; 
     667        font-size: 12px; 
     668        padding: 5px 0; 
    654669        text-align: center; 
    655670} 
     
    670685} 
    671686 
    672 #login #log, #pwd, #user_login, #email
     687#login .input
    673688        font-size: 1.8em; 
    674689        margin-top: 3px; 
     
    682697#login #submit { 
    683698        margin: 0; 
    684         font-size: 1.2em; 
     699        font-size: 15px; 
     700
     701 
     702#login .fullwidth { 
     703        width: 320px; 
    685704} 
    686705 
  • trunk/wp-includes/category-template.php