Changeset 972
- Timestamp:
- 05/21/07 18:37:58 (1 year ago)
- Files:
-
- trunk/app.php (deleted)
- trunk/wp-admin/admin-ajax.php (modified) (1 diff)
- trunk/wp-admin/admin-db.php (modified) (4 diffs)
- trunk/wp-admin/admin-footer.php (modified) (1 diff)
- trunk/wp-admin/admin-functions.php (modified) (13 diffs)
- trunk/wp-admin/admin-header.php (modified) (2 diffs)
- trunk/wp-admin/cat.js (modified) (1 diff)
- trunk/wp-admin/categories.js (modified) (1 diff)
- trunk/wp-admin/categories.php (modified) (1 diff)
- trunk/wp-admin/comment.php (modified) (1 diff)
- trunk/wp-admin/custom-header.php (modified) (10 diffs, 1 prop)
- trunk/wp-admin/dbx-admin-key.js (modified) (1 diff)
- trunk/wp-admin/edit-comments.js (modified) (1 diff)
- trunk/wp-admin/edit-comments.php (modified) (3 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (2 diffs)
- trunk/wp-admin/edit-form-comment.php (modified) (1 diff)
- trunk/wp-admin/edit-link-form.php (modified) (1 diff)
- trunk/wp-admin/edit-page-form.php (modified) (2 diffs)
- trunk/wp-admin/edit-pages.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (2 diffs)
- trunk/wp-admin/export.php (modified) (2 diffs)
- trunk/wp-admin/images/heading-bg.gif (added)
- trunk/wp-admin/import.php (modified) (1 diff)
- trunk/wp-admin/import/blogger.php (modified) (2 diffs)
- trunk/wp-admin/import/dotclear.php (modified) (12 diffs)
- trunk/wp-admin/import/greymatter.php (modified) (3 diffs)
- trunk/wp-admin/import/livejournal.php (modified) (2 diffs)
- trunk/wp-admin/import/mt.php (modified) (2 diffs)
- trunk/wp-admin/import/rss.php (modified) (1 diff)
- trunk/wp-admin/import/textpattern.php (modified) (13 diffs)
- trunk/wp-admin/import/utw.php (added)
- trunk/wp-admin/import/wordpress.php (modified) (7 diffs)
- trunk/wp-admin/import/wp-cat2tag.php (added)
- trunk/wp-admin/index-extra.php (modified) (4 diffs)
- trunk/wp-admin/index.php (modified) (4 diffs)
- trunk/wp-admin/link-import.php (modified) (2 diffs)
- trunk/wp-admin/link-manager.php (modified) (1 diff)
- trunk/wp-admin/menu.php (modified) (1 diff)
- trunk/wp-admin/moderation.php (modified) (3 diffs)
- trunk/wp-admin/options-permalink.php (modified) (1 diff)
- trunk/wp-admin/page.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (5 diffs)
- trunk/wp-admin/post-new.php (modified) (2 diffs)
- trunk/wp-admin/post.php (modified) (1 diff)
- trunk/wp-admin/profile.php (modified) (4 diffs)
- trunk/wp-admin/rtl.css (modified) (2 diffs)
- trunk/wp-admin/themes.php (modified) (1 diff)
- trunk/wp-admin/upgrade-functions.php (modified) (4 diffs)
- trunk/wp-admin/upload-functions.php (modified) (1 diff)
- trunk/wp-admin/upload.css (modified) (1 diff)
- trunk/wp-admin/upload.php (modified) (2 diffs)
- trunk/wp-admin/user-edit.php (modified) (2 diffs)
- trunk/wp-admin/widgets-rtl.css (added)
- trunk/wp-admin/widgets.css (added)
- trunk/wp-admin/widgets.php (added)
- trunk/wp-admin/wp-admin.css (modified) (9 diffs)
- trunk/wp-app.php (added)
- trunk/wp-comments-post.php (modified) (1 diff)
- trunk/wp-config-sample.php (modified) (1 diff, 1 prop)
- trunk/wp-content/index.php (modified) (1 prop)
- trunk/wp-content/themes/classic/functions.php (added)
- trunk/wp-content/themes/classic/index.php (modified) (2 diffs)
- trunk/wp-content/themes/classic/sidebar.php (modified) (3 diffs)
- trunk/wp-content/themes/classic/style.css (modified) (5 diffs)
- trunk/wp-content/themes/default/archive.php (modified) (1 diff)
- trunk/wp-content/themes/default/attachment.php (modified) (1 prop)
- trunk/wp-content/themes/default/comments.php (modified) (2 diffs)
- trunk/wp-content/themes/default/footer.php (modified) (1 diff)
- trunk/wp-content/themes/default/functions.php (modified) (10 diffs)
- trunk/wp-content/themes/default/sidebar.php (modified) (4 diffs)
- trunk/wp-cron.php (modified) (1 diff)
- trunk/wp-includes/author-template.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (5 diffs)
- trunk/wp-includes/bookmark.php (modified) (3 diffs)
- trunk/wp-includes/cache.php (modified) (1 diff)
- trunk/wp-includes/category-template.php (modified) (3 diffs)
- trunk/wp-includes/category.php (modified) (9 diffs)
- trunk/wp-includes/class-phpmailer.php (modified) (1 prop)
- trunk/wp-includes/class-smtp.php (modified) (1 prop)
- trunk/wp-includes/class-snoopy.php (modified) (1 diff)
- trunk/wp-includes/classes.php (modified) (2 diffs)
- trunk/wp-includes/comment-template.php (modified) (3 diffs)
- trunk/wp-includes/comment.php (modified) (7 diffs)
- trunk/wp-includes/compat.php (modified) (1 diff)
- trunk/wp-includes/cron.php (modified) (1 diff)
- trunk/wp-includes/default-filters.php (modified) (2 diffs)
- trunk/wp-includes/deprecated.php (modified) (1 diff)
- trunk/wp-includes/feed-atom-comments.php (modified) (2 diffs, 1 prop)
- trunk/wp-includes/feed-atom.php (modified) (1 diff, 1 prop)
- trunk/wp-includes/feed-rdf.php (modified) (1 diff, 1 prop)
- trunk/wp-includes/feed-rss.php (modified) (1 diff, 1 prop)
- trunk/wp-includes/feed-rss2-comments.php (modified) (1 prop)
- trunk/wp-includes/feed-rss2.php (modified) (1 diff, 1 prop)
- trunk/wp-includes/feed.php (modified) (2 diffs)
- trunk/wp-includes/formatting.php (modified) (3 diffs)
- trunk/wp-includes/functions.php (modified) (14 diffs)
- trunk/wp-includes/general-template.php (modified) (6 diffs)
- trunk/wp-includes/gettext.php (modified) (3 diffs)
- trunk/wp-includes/images/rss.png (added)
- trunk/wp-includes/js/crop/cropper.js (modified) (1 prop)
- trunk/wp-includes/js/prototype.js (modified) (52 diffs, 1 prop)
- trunk/wp-includes/js/quicktags.js (modified) (5 diffs)
- trunk/wp-includes/js/scriptaculous/builder.js (modified) (5 diffs)
- trunk/wp-includes/js/scriptaculous/controls.js (modified) (12 diffs)
- trunk/wp-includes/js/scriptaculous/dragdrop.js (modified) (10 diffs)
- trunk/wp-includes/js/scriptaculous/effects.js (modified) (18 diffs)
- trunk/wp-includes/js/scriptaculous/scriptaculous.js (modified) (3 diffs)
- trunk/wp-includes/js/scriptaculous/slider.js (modified) (2 diffs)
- trunk/wp-includes/js/scriptaculous/sound.js (added)
- trunk/wp-includes/js/scriptaculous/unittest.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/autosave/editor_plugin.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/directionality/editor_plugin.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (21 diffs)
- trunk/wp-includes/js/tinymce/plugins/paste/editor_plugin.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wordpress/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/css/colorpicker.css (added)
- trunk/wp-includes/js/tinymce/themes/advanced/css/editor_ui.css (modified) (5 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/editor_template.js (modified) (12 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/images/colors.jpg (added)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/color_picker.js (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/link.js (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/langs/en.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (23 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_gzip.php (modified) (1 diff)
- trunk/wp-includes/js/wp-ajax.js (modified) (1 diff)
- trunk/wp-includes/kses.php (modified) (1 diff)
- trunk/wp-includes/l10n.php (modified) (3 diffs)
- trunk/wp-includes/link-template.php (modified) (3 diffs)
- trunk/wp-includes/locale.php (modified) (1 diff)
- trunk/wp-includes/pluggable.php (modified) (1 diff)
- trunk/wp-includes/plugin.php (modified) (8 diffs)
- trunk/wp-includes/post-template.php (modified) (9 diffs)
- trunk/wp-includes/post.php (modified) (8 diffs)
- trunk/wp-includes/query.php (modified) (3 diffs)
- trunk/wp-includes/registration-functions.php (modified) (1 prop)
- trunk/wp-includes/rewrite.php (modified) (6 diffs)
- trunk/wp-includes/rss-functions.php (modified) (1 prop)
- trunk/wp-includes/rss.php (modified) (2 diffs)
- trunk/wp-includes/script-loader.php (modified) (7 diffs)
- trunk/wp-includes/theme.php (modified) (3 diffs)
- trunk/wp-includes/user.php (modified) (1 diff)
- trunk/wp-includes/vars.php (modified) (1 diff)
- trunk/wp-includes/version.php (modified) (1 diff)
- trunk/wp-links-opml.php (modified) (1 diff)
- trunk/wp-mail.php (modified) (4 diffs)
- trunk/wp-settings.php (modified) (3 diffs)
- trunk/xmlrpc.php (modified) (19 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r933 r972 150 150 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category <a href="#%s">%s</a> added' ), "cat-$cat->cat_ID", $cat_full_name)) 151 151 ) ); 152 $x->send(); 153 break; 154 case 'add-comment' : 155 if ( !current_user_can( 'edit_post', $id ) ) 156 die('-1'); 157 $search = isset($_POST['s']) ? $_POST['s'] : false; 158 $start = isset($_POST['page']) ? intval($_POST['page']) * 25 : 25; 159 160 list($comments, $total) = _wp_get_comment_list( $search, $start, 1 ); 161 162 if ( !$comments ) 163 die('1'); 164 $x = new WP_Ajax_Response(); 165 foreach ( (array) $comments as $comment ) { 166 get_comment( $comment ); 167 ob_start(); 168 _wp_comment_list_item( $comment->comment_ID ); 169 $comment_list_item = ob_get_contents(); 170 ob_end_clean(); 171 $x->add( array( 172 'what' => 'comment', 173 'id' => $comment->comment_ID, 174 'data' => $comment_list_item 175 ) ); 176 } 152 177 $x->send(); 153 178 break; trunk/wp-admin/admin-db.php
r970 r972 125 125 else 126 126 $links_private = 0; 127 128 129 // Let's check if we have this category already, if so just do an update 130 if ( !$update && $cat_ID = category_object_exists( $category_nicename ) ) 131 $update = true; 127 132 128 133 if (!$update) { … … 154 159 clean_category_cache($cat_ID); 155 160 161 if ($update) 162 do_action('edited_category', $cat_ID); 163 else 164 do_action('created_category', $cat_ID); 165 156 166 return $cat_ID; 157 167 } … … 244 254 245 255 return $cat_ids; 256 } 257 258 function category_object_exists($cat_name) { 259 global $wpdb; 260 if (!$category_nicename = sanitize_title($cat_name)) 261 return 0; 262 263 return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'"); 246 264 } 247 265 … … 420 438 $wpdb->query("DELETE FROM $wpdb->link2cat WHERE link_id = '$link_id'"); 421 439 return $wpdb->query("DELETE FROM $wpdb->links WHERE link_id = '$link_id'"); 440 441 do_action('deleted_link', $link_id); 422 442 } 423 443 trunk/wp-admin/admin-footer.php
r793 r972 3 3 <p class="logo"><a href="http://wordpress.org/" id="wordpress-logo"><img src="images/wordpress-logo.png" alt="WordPress" /></a></p> 4 4 <p class="docs"><?php _e('<a href="http://codex.wordpress.org/">Documentation</a>'); ?> — <?php _e('<a href="http://wordpress.org/support/">Support Forums</a>'); ?><br /> 5 <?php bloginfo('version'); ?> — <?php printf(__('%s seconds'), timer_stop(0, 2)); ?></p>5 <?php printf( __('Version %s'), get_bloginfo('version') ); ?></p> 6 6 </div> 7 7 <?php do_action('admin_footer', ''); ?> trunk/wp-admin/admin-functions.php
r933 r972 491 491 $user->user_email = wp_specialchars( trim( $_POST['email'] )); 492 492 if ( isset( $_POST['url'] ) ) { 493 $user->user_url = wp_specialchars( trim( $_POST['url'] ));493 $user->user_url = clean_url( trim( $_POST['url'] )); 494 494 $user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url; 495 495 } … … 703 703 } 704 704 705 $result = apply_filters('get_nested_categories', $result); 705 706 usort( $result, 'sort_cats' ); 706 707 … … 774 775 if (!$categories ) 775 776 $categories = get_categories( 'hide_empty=0' ); 777 778 $children = _get_category_hierarchy(); 776 779 777 780 if ( $categories ) { … … 784 787 if ( $category->category_parent == $parent) { 785 788 echo "\t" . _cat_row( $category, $level ); 786 cat_rows( $category->cat_ID, $level +1, $categories ); 789 if ( isset($children[$category->cat_ID]) ) 790 cat_rows( $category->cat_ID, $level +1, $categories ); 787 791 } 788 792 } … … 816 820 $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'"; 817 821 818 $category->category_count = number_format ( $category->category_count );819 $category->link_count = number_format ( $category->link_count );822 $category->category_count = number_format_i18n( $category->category_count ); 823 $category->link_count = number_format_i18n( $category->link_count ); 820 824 $posts_count = ( $category->category_count > 0 ) ? "<a href='edit.php?cat=$category->cat_ID'>$category->category_count</a>" : $category->category_count; 821 825 return "<tr id='cat-$category->cat_ID'$class> … … 897 901 $r .= "</td>\n\t</tr>"; 898 902 return $r; 903 } 904 905 function _wp_get_comment_list( $s = false, $start, $num ) { 906 global $wpdb; 907 908 $start = (int) $start; 909 $num = (int) $num; 910 911 if ( $s ) { 912 $s = $wpdb->escape($s); 913 $comments = $wpdb->get_results("SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE 914 (comment_author LIKE '%$s%' OR 915 comment_author_email LIKE '%$s%' OR 916 comment_author_url LIKE ('%$s%') OR 917 comment_author_IP LIKE ('%$s%') OR 918 comment_content LIKE ('%$s%') ) AND 919 comment_approved != 'spam' 920 ORDER BY comment_date DESC LIMIT $start, $num"); 921 } else { 922 $comments = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, $num" ); 923 } 924 925 $total = $wpdb->get_var( "SELECT FOUND_ROWS()" ); 926 927 return array($comments, $total); 928 } 929 930 function _wp_comment_list_item( $id, $alt = 0 ) { 931 global $authordata, $comment, $wpdb; 932 $id = (int) $id; 933 $comment =& get_comment( $id ); 934 $class = ''; 935 $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 936 $comment_status = wp_get_comment_status($comment->comment_ID); 937 if ( 'unapproved' == $comment_status ) 938 $class .= ' unapproved'; 939 if ( $alt % 2 ) 940 $class .= ' alternate'; 941 echo "<li id='comment-$comment->comment_ID' class='$class'>"; 942 ?> 943 <p><strong><?php comment_author(); ?></strong> <?php if ($comment->comment_author_email) { ?>| <?php comment_author_email_link() ?> <?php } if ($comment->comment_author_url && 'http://' != $comment->comment_author_url) { ?> | <?php comment_author_url_link() ?> <?php } ?>| <?php _e('IP:') ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></p> 944 945 <?php comment_text() ?> 946 947 <p><?php comment_date(__('M j, g:i A')); ?> — [ 948 <?php 949 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 950 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 951 echo ' | <a href="' . wp_nonce_url('ocomment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 952 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 953 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 954 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 955 } 956 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> "; 957 } 958 $post = get_post($comment->comment_post_ID); 959 $post_title = wp_specialchars( $post->post_title, 'double' ); 960 $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; 961 ?> 962 ] — <a href="<?php echo get_permalink($comment->comment_post_ID); ?>"><?php echo $post_title; ?></a></p> 963 </li> 964 <?php 899 965 } 900 966 … … 1280 1346 function page_template_dropdown( $default = '' ) { 1281 1347 $templates = get_page_templates(); 1348 ksort( $templates ); 1282 1349 foreach (array_keys( $templates ) as $template ) 1283 1350 : if ( $default == $templates[$template] ) … … 1685 1752 } 1686 1753 1687 return array ('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template[1]);1754 return array('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version); 1688 1755 } 1689 1756 … … 1702 1769 if ( $plugins_dir ) { 1703 1770 while (($file = $plugins_dir->read() ) !== false ) { 1704 if ( preg_match( '|^\.+$|', $file ))1771 if ( substr($file, 0, 1) == '.' ) 1705 1772 continue; 1706 1773 if ( is_dir( $plugin_root.'/'.$file ) ) { … … 1708 1775 if ( $plugins_subdir ) { 1709 1776 while (($subfile = $plugins_subdir->read() ) !== false ) { 1710 if ( preg_match( '|^\.+$|', $subfile ))1777 if ( substr($subfile, 0, 1) == '.' ) 1711 1778 continue; 1712 if ( preg_match( '|\.php$|', $subfile ))1779 if ( substr($subfile, -4) == '.php' ) 1713 1780 $plugin_files[] = "$file/$subfile"; 1714 1781 } 1715 1782 } 1716 1783 } else { 1717 if ( preg_match( '|\.php$|', $file ))1784 if ( substr($file, -4) == '.php' ) 1718 1785 $plugin_files[] = $file; 1719 1786 } … … 1796 1863 function get_importers() { 1797 1864 global $wp_importers; 1798 1865 uasort($wp_importers, create_function('$a, $b', 'return strcmp($a[0], $b[0]);')); 1799 1866 return $wp_importers; 1800 1867 } … … 1879 1946 extract( $wp_filetype ); 1880 1947 1881 if ( !$type || !$ext)1948 if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) 1882 1949 return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' )); 1950 1951 if ( !$ext ) 1952 $ext = strrchr($file['name'], '.'); 1883 1953 } 1884 1954 … … 1951 2021 <form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo attribute_escape($action) ?>"> 1952 2022 <p> 2023 <?php wp_nonce_field('import-upload'); ?> 1953 2024 <label for="upload"><?php _e( 'Choose a file from your computer:' ); ?></label> (<?php printf( __('Maximum size: %s' ), $size ); ?> ) 1954 2025 <input type="file" id="upload" name="import" size="25" /> trunk/wp-admin/admin-header.php
r920 r972 14 14 ?> 15 15 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 16 <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>16 <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 17 17 <head> 18 18 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> … … 45 45 <body> 46 46 <div id="wphead"> 47 <h1><?php echo wptexturize(get_bloginfo(('name'))); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1>47 <h1><?php bloginfo('name'); ?> <span>(<a href="<?php echo get_option('home') . '/'; ?>"><?php _e('View site »') ?></a>)</span></h1> 48 48 </div> 49 49 <div id="user_info"><p><?php printf(__('Howdy, <strong>%s</strong>.'), $user_identity) ?> [<a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>, <a href="profile.php"><?php _e('My Profile'); ?></a>] </p></div> trunk/wp-admin/cat.js
r909 r972 5 5 if ( !jaxcat ) 6 6 return false; 7 Element.update(jaxcat,'<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="' + catL10n.add + '"/>< span id="howto">' + catL10n.how + '</span></span>');7 Element.update(jaxcat,'<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="' + catL10n.add + '"/><input type="hidden"/><span id="howto">' + catL10n.how + '</span></span>'); 8 8 $('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; 9 9 $('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; trunk/wp-admin/categories.js
r753 r972 3 3 document.forms.addcat.submit.onclick = function(e) {return killSubmit('theList.ajaxAdder("cat", "addcat");', e); }; 4 4 theList.addComplete = function(what, where, update, transport) { 5 var name = getNodeValue(transport.responseXML, 'name') ;5 var name = getNodeValue(transport.responseXML, 'name').unescapeHTML(); 6 6 var id = transport.responseXML.getElementsByTagName(what)[0].getAttribute('id'); 7 7 var options = document.forms['addcat'].category_parent.options; trunk/wp-admin/categories.php
r920 r972 119 119 120 120 <?php include('edit-category-form.php'); ?> 121 121 122 <?php endif; ?> 122 123 trunk/wp-admin/comment.php
r821 r972 92 92 <tr> 93 93 <th scope="row"><?php _e('URL:'); ?></th> 94 <td><?php echo $comment->comment_author_url; ?></td>94 <td><?php echo "<a href='$comment->comment_author_url'>$comment->comment_author_url</a>"; ?></td> 95 95 </tr> 96 96 <?php } ?> trunk/wp-admin/custom-header.php
- Property svn:eol-style set to native
r909 r972 24 24 25 25 if ( isset( $_POST['textcolor'] ) ) { 26 check_admin_referer('custom-header'); 26 27 if ( 'blank' == $_POST['textcolor'] ) { 27 28 set_theme_mod('header_textcolor', 'blank'); … … 32 33 } 33 34 } 34 if ( isset($_POST['resetheader']) ) 35 if ( isset($_POST['resetheader']) ) { 36 check_admin_referer('custom-header'); 35 37 remove_theme_mods(); 38 } 36 39 ?> 37 40 <script type="text/javascript"> … … 158 161 <p><?php _e('This is your header image. You can change the text color or upload and crop a new image.'); ?></p> 159 162 160 <div id="headimg" style="background: url(<?php header_image() ?>) no-repeat;">163 <div id="headimg" style="background: url(<?php clean_url(header_image()) ?>) no-repeat;"> 161 164 <h1><a onclick="return false;" href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>" id="name"><?php bloginfo('name'); ?></a></h1> 162 165 <div id="desc"><?php bloginfo('description');?></div> … … 166 169 <input type="button" value="<?php _e('Hide Text'); ?>" onclick="hide_text()" id="hidetext" /> 167 170 <input type="button" value="<?php _e('Select a Text Color'); ?>" onclick="colorSelect($('textcolor'), 'pickcolor')" id="pickcolor" /><input type="button" value="<?php _e('Use Original Color'); ?>" onclick="colorDefault()" id="defaultcolor" /> 168 <input type="hidden" name="textcolor" id="textcolor" value="#<?php header_textcolor() ?>" /><input name="submit" type="submit" value="<?php _e('Save Changes'); ?> »" /></form> 171 <?php wp_nonce_field('custom-header') ?> 172 <input type="hidden" name="textcolor" id="textcolor" value="#<?php attribute_escape(header_textcolor()) ?>" /><input name="submit" type="submit" value="<?php _e('Save Changes'); ?> »" /></form> 169 173 <?php } ?> 170 174 … … 178 182 <label for="upload"><?php _e('Choose an image from your computer:'); ?></label><br /><input type="file" id="upload" name="import" /> 179 183 <input type="hidden" name="action" value="save" /> 184 <?php wp_nonce_field('custom-header') ?> 180 185 <p class="submit"> 181 186 <input type="submit" value="<?php _e('Upload'); ?> »" /> … … 190 195 <p><?php _e('This will restore the original header image and color. You will not be able to retrieve any customizations.') ?></p> 191 196 <form method="post" action="<?php echo attribute_escape(add_query_arg('step', 1)) ?>"> 197 <?php wp_nonce_field('custom-header'); ?> 192 198 <input type="submit" name="resetheader" value="<?php _e('Restore Original Header'); ?>" /> 193 199 </form> … … 198 204 199 205 function step_2() { 206 check_admin_referer('custom-header'); 200 207 $overrides = array('test_form' => false); 201 208 $file = wp_handle_upload($_FILES['import'], $overrides); … … 223 230 224 231 if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { 225 set_theme_mod('header_image', $url);232 set_theme_mod('header_image', clean_url($url)); 226 233 $header = apply_filters('wp_create_file_in_uploads', $file, $id); // For replication 227 234 return $this->finished(); … … 257 264 <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo $id; ?>" /> 258 265 <input type="hidden" name="oitar" id="oitar" value="<?php echo $oitar; ?>" /> 266 <?php wp_nonce_field('custom-header') ?> 259 267 <input type="submit" value="<?php _e('Crop Header »'); ?>" /> 260 268 </p> … … 266 274 267 275 function step_3() { 276 check_admin_referer('custom-header'); 268 277 if ( $_POST['oitar'] > 1 ) { 269 278 $_POST['x1'] = $_POST['x1'] * $_POST['oitar']; trunk/wp-admin/dbx-admin-key.js
r909 r972 1 addLoadEvent( function() {var manager = new dbxManager( dbxL10n.mana nger );} );1 addLoadEvent( function() {var manager = new dbxManager( dbxL10n.manager );} ); 2 2 3 3 addLoadEvent( function() trunk/wp-admin/edit-comments.js
r559 r972 3 3 if ( !theCommentList ) 4 4 return false; 5 6 theExtraCommentList = new listMan('the-extra-comment-list'); 7 if ( theExtraCommentList ) { 8 theExtraCommentList.showLink = 0; 9 theExtraCommentList.altOffset = 1; 10 if ( theExtraCommentList.theList && theExtraCommentList.theList.childNodes ) 11 var commentNum = $A(theExtraCommentList.theList.childNodes).findAll( function(i) { return Element.visible(i) } ).length; 12 else 13 var commentNum = 0; 14 var urlQ = document.location.href.split('?'); 15 var params = urlQ[1] ? urlQ[1].toQueryParams() : []; 16 var search = params['s'] ? params['s'] : ''; 17 var page = params['apage'] ? params['apage'] : 1; 18 } 19 5 20 theCommentList.dimComplete = function(what,id,dimClass) { 6 21 var m = document.getElementById('awaitmod'); 7 if ( document.getElementById(what + '-' + id).className.match(dimClass) ) m.innerHTML = parseInt(m.innerHTML,10) + 1; 8 else m.innerHTML = parseInt(m.innerHTML,10) - 1; 22 if ( document.getElementById(what + '-' + id).className.match(dimClass) ) 23 m.innerHTML = parseInt(m.innerHTML,10) + 1; 24 else 25 m.innerHTML = parseInt(m.innerHTML,10) - 1; 9 26 } 27 10 28 theCommentList.delComplete = function(what,id) { 11 29 var m = document.getElementById('awaitmod'); 12 if ( document.getElementById(what + '-' + id).className.match('unapproved') ) m.innerHTML = parseInt(m.innerHTML,10) - 1; 30 what = what.split('-')[0]; 31 if ( document.getElementById(what + '-' + id).className.match('unapproved') ) 32 m.innerHTML = parseInt(m.innerHTML,10) - 1; 33 if ( theExtraCommentList && commentNum ) { 34 var theMover = theExtraCommentList.theList.childNodes[0]; 35 Element.removeClassName(theMover,'alternate'); 36 theCommentList.theList.appendChild(theMover); 37 theExtraCommentList.inputData += '&page=' + page; 38 if ( search ) 39 theExtraCommentList.inputData += '&s=' + search; // trust the URL not the search box 40 theExtraCommentList.addComplete = function() { 41 if ( theExtraCommentList.theList.childNodes ) 42 var commentNum = $A(theExtraCommentList.theList.childNodes).findAll( function(i) { return Element.visible(i) } ).length; 43 else 44 var commentNum = 0; 45 } 46 theExtraCommentList.ajaxAdder( 'comment', 'ajax-response' ); // Dummy Request 47 } 13 48 } 49 14 50 if ( theList ) // the post list: edit.php 15 51 theList.delComplete = function() { trunk/wp-admin/edit-comments.php
r933 r972 76 76 endif; 77 77 78 if (isset($_GET['s'])) { 79 $s = $wpdb->escape($_GET['s']); 80 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE 81 (comment_author LIKE '%$s%' OR 82 comment_author_email LIKE '%$s%' OR 83 comment_author_url LIKE ('%$s%') OR 84 comment_author_IP LIKE ('%$s%') OR 85 comment_content LIKE ('%$s%') ) AND 86 comment_approved != 'spam' 87 ORDER BY comment_date DESC"); 88 } else { 89 if ( isset( $_GET['apage'] ) ) 90 $page = (int) $_GET['apage']; 91 else 92 $page = 1; 93 $start = $offset = ( $page - 1 ) * 20; 94 95 $comments = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1' ORDER BY comment_date DESC LIMIT $start, 20" ); 96 $total = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '0' OR comment_approved = '1'" ); 97 } 98 ?> 99 <?php if ( $total > 20 ) { 100 $total_pages = ceil( $total / 20 ); 101 $r = ''; 102 if ( 1 < $page ) { 103 $args['apage'] = ( 1 == $page - 1 ) ? FALSE : $page - 1; 104 $r .= '<a class="prev" href="' . clean_url(add_query_arg( $args )) . '">« '. __('Previous Page') .'</a>' . "\n"; 105 } 106 if ( ( $total_pages = ceil( $total / 20 ) ) > 1 ) { 107 for ( $page_num = 1; $page_num <= $total_pages; $page_num++ ) : 108 if ( $page == $page_num ) : 109 $r .= "<span>$page_num</span>\n"; 110 else : 111 $p = false; 112 if ( $page_num < 3 || ( $page_num >= $page - 3 && $page_num <= $page + 3 ) || $page_num > $total_pages - 3 ) : 113 $args['apage'] = ( 1 == $page_num ) ? FALSE : $page_num; 114 $r .= '<a class="page-numbers" href="' . clean_url(add_query_arg($args)) . '">' . ( $page_num ) . "</a>\n"; 115 $in = true; 116 elseif ( $in == true ) : 117 $r .= "...\n"; 118 $in = false; 119 endif; 120 endif; 121 endfor; 122 } 123 if ( ( $page ) * 20 <
