Changeset 789
- Timestamp:
- 10/05/06 17:45:26 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-footer.php (modified) (1 diff)
- trunk/wp-admin/admin-functions.php (modified) (3 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (1 diff)
- trunk/wp-admin/index.php (modified) (2 diffs)
- trunk/wp-admin/inline-uploading.php (deleted)
- trunk/wp-admin/menu.php (modified) (3 diffs)
- trunk/wp-admin/options-discussion.php (modified) (1 diff)
- trunk/wp-admin/options-general.php (modified) (1 diff)
- trunk/wp-admin/options.php (modified) (10 diffs)
- trunk/wp-admin/page-new.php (modified) (1 diff)
- trunk/wp-admin/page.php (modified) (2 diffs)
- trunk/wp-admin/plugins.php (modified) (3 diffs)
- trunk/wp-admin/post-new.php (modified) (1 diff)
- trunk/wp-admin/post.php (modified) (2 diffs)
- trunk/wp-admin/templates.php (modified) (1 diff)
- trunk/wp-admin/upgrade-functions.php (modified) (2 diffs)
- trunk/wp-admin/upgrade-schema.php (modified) (2 diffs)
- trunk/wp-admin/upload-functions.php (added)
- trunk/wp-admin/upload-js.php (added)
- trunk/wp-admin/upload-rtl.css (added)
- trunk/wp-admin/upload.css (added)
- trunk/wp-admin/upload.php (added)
- trunk/wp-admin/users.php (modified) (2 diffs)
- trunk/wp-admin/wp-admin.css (modified) (8 diffs)
- trunk/wp-includes/category-template.php (modified) (1 diff)
- trunk/wp-includes/classes.php (modified) (2 diffs)
- trunk/wp-includes/comment.php (modified) (2 diffs)
- trunk/wp-includes/cron.php (modified) (2 diffs)
- trunk/wp-includes/feed.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (4 diffs)
- trunk/wp-includes/general-template.php (modified) (5 diffs)
- trunk/wp-includes/link-template.php (modified) (1 diff)
- trunk/wp-includes/pluggable.php (modified) (5 diffs)
- trunk/wp-includes/plugin.php (modified) (1 diff)
- trunk/wp-includes/post-template.php (modified) (1 diff)
- trunk/wp-includes/rewrite.php (modified) (1 diff)
- trunk/wp-includes/script-loader.php (modified) (3 diffs)
- trunk/wp-includes/vars.php (modified) (3 diffs)
- trunk/wp-includes/version.php (modified) (1 diff)
- trunk/wp-settings.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-footer.php
r550 r789 1 1 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> — <a href="http://wordpress.org/support/"><?php _e('Support Forums'); ?></a> <br />5 <?php bloginfo('version'); ?> — <?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>'); ?> — <?php _e('<a href="http://wordpress.org/support/">Support Forums</a>'); ?> <br /> 6 <?php bloginfo('version'); ?> — <?php printf(__('%s seconds'), timer_stop(0, 2)); ?> 7 </p> 8 8 </div> 9 9 <?php do_action('admin_footer', ''); ?> trunk/wp-admin/admin-functions.php
r788 r789 675 675 function return_link_categories_list($parent = 0) { 676 676 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"); 678 678 } 679 679 … … 1721 1721 } 1722 1722 1723 if ( !$plugins_dir || !$plugin_files) {1723 if ( !$plugins_dir || !$plugin_files ) 1724 1724 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") ) 1731 1728 continue; 1732 1729 1733 1730 $plugin_data = get_plugin_data("$plugin_root/$plugin_file"); 1734 1731 1735 if ( empty ($plugin_data['Name'])) {1732 if ( empty ($plugin_data['Name']) ) 1736 1733 continue; 1737 }1738 1734 1739 1735 $wp_plugins[plugin_basename($plugin_file)] = $plugin_data; 1740 1736 } 1737 1738 uasort($wp_plugins, create_function('$a, $b', 'return strnatcasecmp($a["Name"], $b["Name"]);')); 1741 1739 1742 1740 return $wp_plugins; … … 1989 1987 1990 1988 ?> 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> 1995 1999 <?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> 2000 2008 <?php endif; ?> 2009 </table> 2010 </form> 2001 2011 <?php 2002 2012 } trunk/wp-admin/edit-form-advanced.php
r788 r789 189 189 if (current_user_can('upload_files')) { 190 190 $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); 191 $uploading_iframe_src = wp_nonce_url(" inline-uploading.php?action=view&post=$uploading_iframe_ID", 'inlineuploading');191 $uploading_iframe_src = wp_nonce_url("upload.php?style=inline&tab=upload&post_id=$uploading_iframe_ID", 'inlineuploading'); 192 192 $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 193 193 if ( false != $uploading_iframe_src ) trunk/wp-admin/edit-page-form.php
r788 r789 157 157 if (current_user_can('upload_files')) { 158 158 $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); 159 $uploading_iframe_src = wp_nonce_url(" inline-uploading.php?action=view&post=$uploading_iframe_ID", 'inlineuploading');159 $uploading_iframe_src = wp_nonce_url("upload.php?style=inline&tab=upload&post_id=$uploading_iframe_ID", 'inlineuploading'); 160 160 $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); 161 161 if ( false != $uploading_iframe_src ) trunk/wp-admin/edit.php
r774 r789 116 116 <fieldset> 117 117 <legend><?php _e('Browse Category…') ?></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);?> 119 119 <input type="submit" name="submit" value="<?php _e('Show Category') ?>" /> 120 120 </fieldset> 121 121 </form> 122 123 <?php do_action('restrict_manage_posts'); ?> 122 124 123 125 <br style="clear:both;" /> trunk/wp-admin/index.php
r723 r789 27 27 foreach ($rss->items as $item ) { 28 28 ?> 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> 30 30 <?php } ?> 31 31 </ul> … … 119 119 120 120 <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’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’s look or theme'); ?></a></li> 130 <?php endif; ?> 125 131 </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> — <?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/'); 135 if ( 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); 140 foreach ($rss->items as $item ) { 141 ?> 142 <h4><a href='<?php echo wp_filter_kses($item['link']); ?>'><?php echo wp_specialchars($item['title']); ?></a> — <?php printf(__('%s ago'), human_time_diff(strtotime($item['pubdate'], time() ) ) ); ?></h4> 143 <p><?php echo $item['description']; ?></p> 144 <?php 140 145 } 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'); ?> »</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 <?php153 } 154 ?> 155 </ul>156 </div>157 <?php146 } 147 ?> 148 149 150 <?php 151 $rss = @fetch_rss('http://planet.wordpress.org/feed/'); 152 if ( 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'); ?> »</a></h3> 156 <ul> 157 <?php 158 $rss->items = array_slice($rss->items, 0, 20); 159 foreach ($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 158 163 } 164 ?> 165 </ul> 166 </div> 167 <?php 168 } 159 169 ?> 160 170 <div style="clear: both"> trunk/wp-admin/menu.php
r786 r789 35 35 $submenu['edit.php'][5] = array(__('Posts'), 'edit_posts', 'edit.php'); 36 36 $submenu['edit.php'][10] = array(__('Pages'), 'edit_pages', 'edit-pages.php'); 37 $submenu['edit.php'][12] = array(__('Uploads'), 'upload_files', 'upload.php'); 37 38 $submenu['edit.php'][15] = array(__('Categories'), 'manage_categories', 'categories.php'); 38 39 $submenu['edit.php'][20] = array(__('Comments'), 'edit_posts', 'edit-comments.php'); … … 129 130 } 130 131 132 unset($id); 131 133 get_currentuserinfo(); 132 134 if( is_site_admin() ) { … … 138 140 $submenu[ 'wpmu-admin.php' ][30] = array( __('Upgrade'), '10', 'wpmu-upgrade-site.php' ); 139 141 } 140 ksort($menu); // make it all pretty142 uksort($menu, "strnatcasecmp"); // make it all pretty 141 143 142 144 if (! user_can_access_admin_page()) { trunk/wp-admin/options-discussion.php
r761 r789 62 62 <fieldset class="options"> 63 63 <legend><?php _e('Comment Moderation') ?></legend> 64 <p><?php printf(__('Hold a comment in the queue if it contains more than %slinks. (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> 65 65 66 66 <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 92 92 <tr> 93 93 <th scope="row"> </th> 94 <td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Save optionto 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> 95 95 </tr> 96 96 <tr> trunk/wp-admin/options.php
r735 r789 21 21 } 22 22 23 function sanitize_option($option, $value) { 23 function sanitize_option($option, $value) { // Remember to call stripslashes! 24 24 25 25 switch ($option) { 26 26 case 'admin_email': 27 case 'new_admin_email':27 $value = stripslashes($value); 28 28 $value = sanitize_email($value); 29 29 break; … … 32 32 case 'mailserver_port': 33 33 case 'comment_max_links': 34 $value = stripslashes($value); 34 35 $value = abs((int) $value); 35 36 break; … … 37 38 case 'posts_per_page': 38 39 case 'posts_per_rss': 40 $value = stripslashes($value); 39 41 $value = (int) $value; 40 42 if ( empty($value) ) $value = 1; … … 44 46 case 'default_ping_status': 45 47 case 'default_comment_status': 48 $value = stripslashes($value); 46 49 // Options that if not there have 0 value but need to be something like "closed" 47 50 if ( $value == '0' || $value == '') … … 52 55 case 'blogname': 53 56 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); 55 59 break; 56 60 57 61 case 'blog_charset': 58 $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); 62 $value = preg_replace('/[^a-zA-Z0-9_-]/', '', $value); // strips slashes 59 63 break; 60 64 … … 67 71 case 'upload_path': 68 72 $value = strip_tags($value); 69 $value = wp_filter_kses($value); 73 $value = wp_filter_kses($value); // calls stripslashes then addslashes 74 $value = stripslashes($value); 70 75 break; 71 76 72 77 case 'gmt_offset': 73 $value = preg_replace('/[^0-9:.-]/', '', $value); 78 $value = preg_replace('/[^0-9:.-]/', '', $value); // strips slashes 74 79 break; 75 80 76 81 case 'siteurl': 77 82 case 'home': 83 $value = stripslashes($value); 78 84 $value = clean_url($value); 85 break; 86 default : 87 $value = stripslashes($value); 79 88 break; 80 89 } … … 90 99 check_admin_referer('update-options'); 91 100 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; 95 105 } 96 106 } else { … … 101 111 foreach ($options as $option) { 102 112 $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 105 115 update_option($option, $value); 106 116 } … … 120 130 121 131 <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"> 124 134 <?php wp_nonce_field('update-options') ?> 125 135 <input type="hidden" name="action" value="update" /> 136 <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Options »') ?>" /></p> 126 137 <table width="98%"> 127 138 <?php 128 139 $options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name"); 140 foreach ( (array) $options as $option ) 141 $options_to_update[] = $option->option_name; 142 $options_to_update = implode(',', $options_to_update); 143 ?> 129 144 130 foreach ($options as $option) : 145 <input type="hidden" name="page_options" value="<?php echo $options_to_update; ?>" /> 146 147 <?php 148 foreach ( (array) $options as $option) : 131 149 $value = wp_specialchars($option->option_value, 'single'); 132 150 echo " 133 151 <tr> 134 152 <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> 136 159 <td>$option->option_description</td> 137 160 </tr>"; … … 139 162 ?> 140 163 </table> 141 <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Settings »') ?>" /></p>164 <p class="submit"><input type="submit" name="Update" value="<?php _e('Update Options »') ?>" /></p> 142 165 </form> 143 166 </div> trunk/wp-admin/page-new.php
r722 r789 9 9 ?> 10 10 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') ; ?> »</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') ; ?> »</a></p></div> 13 13 <?php endif; ?> 14 14 trunk/wp-admin/page.php
r734 r789 31 31 } 32 32 } else { 33 $location = 'page-new.php?posted=true';33 $location = "page-new.php?posted=$page_ID"; 34 34 } 35 35 … … 105 105 } 106 106 } else { 107 $location = 'page-new.php?posted=true';107 $location = "page-new.php?posted=$page_ID"; 108 108 } 109 109 trunk/wp-admin/plugins.php
r774 r789 92 92 <th style="text-align: center"><?php _e('Version'); ?></th> 93 93 <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> 95 95 </tr> 96 96 </thead> … … 98 98 $style = ''; 99 99 100 function sort_plugins($plug1, $plug2) {101 return strnatcasecmp($plug1['Name'], $plug2['Name']);102 }103 104 uksort($plugins, 'sort_plugins');105 106 100 foreach($plugins as $plugin_file => $plugin_data) { 107 101 $style = ('class="alternate"' == $style|| 'class="alternate active"' == $style) ? '' : 'alternate'; 108 102 109 103 if (!empty($current_plugins) && in_array($plugin_file, $current_plugins)) { 110 $ action= "<a href='" . wp_nonce_url("plugins.php?action=deactivate&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&plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . "' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 111 105 $plugin_data['Title'] = "<strong>{$plugin_data['Title']}</strong>"; 112 106 $style .= $style == 'alternate' ? ' active' : 'active'; 113 107 } else { 114 $ action= "<a href='" . wp_nonce_url("plugins.php?action=activate&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&plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 115 109 } 116 110 $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 118 118 echo " 119 119 <tr $style> … … 121 121 <td class='vers'>{$plugin_data['Version']}</td> 122 122 <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" 124 128 </tr>"; 125 129 } trunk/wp-admin/post-new.php
r770 r789 20 20 } 21 21 22 if ( isset($_GET['posted']) ) : ?>23 <div id="message" class="updated fade"><p>< ?php printf(__('Post saved. <a href="%s">View site »</a>'), get_bloginfo('home') . '/'); ?></p></div>22 if ( 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'); ?> »</a></p></div> 24 24 <?php 25 25 endif; trunk/wp-admin/post.php
r734 r789 33 33 } 34 34 } else { 35 $location = 'post-new.php?posted=true';35 $location = "post-new.php?posted=$post_ID"; 36 36 } 37 37 … … 107 107 } 108 108 } else { 109 $location = 'post-new.php?posted=true';109 $location = "post-new.php?posted=$post_ID"; 110 110 } 111 111 trunk/wp-admin/templates.php
r638 r789 65 65 $f = @ fopen($real_file, 'r'); 66 66 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 } 69 73 } else { 70 74 $error = true; trunk/wp-admin/upgrade-functions.php
r565 r789 93 93 94 94 // 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's comments, there you will have the option to edit or delete them.'))."')"); 96 96 97 97 // First Page 98 99 98 $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', '', '', '')"); 100 99 } … … 106 105 $email = $user->user_email; 107 106 $name = $user->user_login; 108 $message_headers = 'From: ' . $blog_title . '<wordpress@' . $_SERVER['SERVER_NAME'] . '>';107 $message_headers = 'From: "' . $blog_title . '" <wordpress@' . $_SERVER['SERVER_NAME'] . '>'; 109 108 $message = sprintf(__("Your new WordPress blog has been successfully set up at: 110 109 trunk/wp-admin/upgrade-schema.php
r761 r789 8 8 cat_name varchar(55) NOT NULL default '', 9 9 category_nicename varchar(200) NOT NULL default '', 10 category_description longtext NOT NULL default '',10 category_description longtext NOT NULL, 11 11 category_parent bigint(20) NOT NULL default '0', 12 12 category_count bigint(20) NOT NULL default '0', … … 311 311 312 312 // 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'); 314 314 foreach ($unusedoptions as $option) : 315 315 delete_option($option); trunk/wp-admin/users.php
r774 r789 85 85 function do_paging() { 86 86 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?') . '">« 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 »</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' => '« Previous Page', 91 'next_text' => 'Next Page »', 92 'base' => 'users.php?%_%', 93 'format' => 'userspage=%#%', 94 'add_args' => array( 'usersearch' => urlencode($this->search_term) ) 95 ) ); 96 96 } 97 97 } … … 498 498 <?php 499 499 foreach($roleclasses as $role => $roleclass) { 500 ksort($roleclass);500 uksort($roleclass, "strnatcasecmp"); 501 501 ?> 502 502 trunk/wp-admin/wp-admin.css
r788 r789 187 187 padding: 0px; 188 188 margin-bottom: 16px; 189 height: 1 5em;189 height: 16em; 190 190 width: 100%; 191 191 /* overflow-y: hidden;*/ … … 401 401 } 402 402 403 textarea.all-options, input.all-options { 404 width: 250px; 405 } 406 403 407 #adminmenu { 404 408 background: #83B4D8; … … 590 594 #login { 591 595 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; 593 597 color: #fff; 594 /* height: 430px; */595 598 margin: 5em auto; 596 padding: 45px 50px 0;599 padding: 20px 50px 0; 597 600 width: 325px; 598 601 } … … 608 611 } 609 612 613 #login #login_error a { 614 color: #ebcd4e; 615 border-color: #ebcd4e; 616 } 617 610 618 #login #send { 611 619 color: #fff; … … 615 623 } 616 624 617 #login h1 {625 #login h1 a { 618 626 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; 626 629 display: block; 627 text-indent: -9999px;628 630 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; 629 644 } 630 645 … … 637 652 list-style: none; 638 653 margin: 0 -50px; 639 padding: 0 50px 5px;654 padding: 10px 50px 25px;; 640 655 } 641 656 642 657 #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; 648 663 } 649 664 650 665 #login ul li { 651 666 float: left; 652 font-size: 1 1px;653 padding: 15px 0;667 font-size: 12px; 668 padding: 5px 0; 654 669 text-align: center; 655 670 } … … 670 685 } 671 686 672 #login #log, #pwd, #user_login, #email{687 #login .input { 673 688 font-size: 1.8em; 674 689 margin-top: 3px; … … 682 697 #login #submit { 683 698 margin: 0; 684 font-size: 1.2em; 699 font-size: 15px; 700 } 701 702 #login .fullwidth { 703 width: 320px; 685 704 } 686 705 trunk/wp-includes/category-template.php
