From 779f0f4411b6467808ff053780c7c96ed0f9a571 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 6 Jul 2006 10:41:20 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@638 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/admin-functions.php | 79 +++++++++++++++------ wp-admin/admin-header.php | 2 +- wp-admin/admin.php | 8 +-- wp-admin/categories.php | 4 +- wp-admin/comment.php | 22 +++--- wp-admin/edit-form-advanced.php | 14 +++- wp-admin/edit-link-form.php | 20 +++--- wp-admin/edit-page-form.php | 8 +-- wp-admin/images/box-bg-left.gif | Bin 0 -> 37 bytes wp-admin/images/box-bg-right.gif | Bin 0 -> 151 bytes wp-admin/images/box-butt-left.gif | Bin 0 -> 169 bytes wp-admin/images/box-butt-right.gif | Bin 0 -> 960 bytes wp-admin/images/box-head-left.gif | Bin 0 -> 334 bytes wp-admin/images/box-head-right.gif | Bin 0 -> 3609 bytes wp-admin/import.php | 2 +- wp-admin/import/blogger.php | 12 ++-- wp-admin/import/dotclear.php | 12 ++-- wp-admin/import/greymatter.php | 4 +- wp-admin/import/textpattern.php | 10 +-- wp-admin/inline-uploading.php | 13 ++-- wp-admin/link-add.php | 4 +- wp-admin/link-import.php | 2 +- wp-admin/link-manager.php | 9 +-- wp-admin/link.php | 10 +-- wp-admin/menu.php | 12 ++-- wp-admin/moderation.php | 10 +-- wp-admin/options.php | 5 +- wp-admin/page.php | 6 +- wp-admin/plugin-editor.php | 6 +- wp-admin/post.php | 6 +- wp-admin/profile-update.php | 2 +- wp-admin/sidebar.php | 2 +- wp-admin/templates.php | 8 +-- wp-admin/theme-editor.php | 8 +-- wp-admin/update-links.php | 4 +- wp-admin/users.php | 20 +++--- wp-admin/wp-admin.css | 53 ++++++++++++++ wp-comments-post.php | 10 +-- wp-content/themes/default/functions.php | 8 ++- wp-includes/comment-template.php | 2 +- wp-includes/comment.php | 8 +-- wp-includes/functions.php | 65 +++++++++++++++++ .../spellchecker/classes/TinyPspellShell.class.php | 2 +- wp-includes/kses.php | 11 +-- wp-includes/pluggable.php | 1 + wp-includes/vars.php | 5 -- wp-includes/wpmu-functions.php | 4 +- wp-login.php | 6 +- wp-mail.php | 2 +- 49 files changed, 337 insertions(+), 164 deletions(-) create mode 100644 wp-admin/images/box-bg-left.gif create mode 100644 wp-admin/images/box-bg-right.gif create mode 100644 wp-admin/images/box-butt-left.gif create mode 100644 wp-admin/images/box-butt-right.gif create mode 100644 wp-admin/images/box-head-left.gif create mode 100644 wp-admin/images/box-head-right.gif diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 49fe06e..29c8b1b 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -6,10 +6,10 @@ function write_post() { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can('edit_pages') ) - die(__('You are not allowed to create pages on this blog.')); + wp_die(__('You are not allowed to create pages on this blog.')); } else { if ( !current_user_can('edit_posts') ) - die(__('You are not allowed to create posts or drafts on this blog.')); + wp_die(__('You are not allowed to create posts or drafts on this blog.')); } // Rename. @@ -32,10 +32,10 @@ function write_post() { if ($_POST['post_author'] != $_POST['user_ID']) { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can('edit_others_pages') ) - die(__('You cannot create pages as this user.')); + wp_die(__('You cannot create pages as this user.')); } else { if ( !current_user_can('edit_others_posts') ) - die(__('You cannot post as this user.')); + wp_die(__('You cannot post as this user.')); } } @@ -151,10 +151,10 @@ function edit_post() { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can('edit_page', $post_ID) ) - die(__('You are not allowed to edit this page.')); + wp_die(__('You are not allowed to edit this page.')); } else { if ( !current_user_can('edit_post', $post_ID) ) - die(__('You are not allowed to edit this post.')); + wp_die(__('You are not allowed to edit this post.')); } // Rename. @@ -176,10 +176,10 @@ function edit_post() { if ($_POST['post_author'] != $_POST['user_ID']) { if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can('edit_others_pages') ) - die(__('You cannot edit pages as this user.')); + wp_die(__('You cannot edit pages as this user.')); } else { if ( !current_user_can('edit_others_posts') ) - die(__('You cannot edit posts as this user.')); + wp_die(__('You cannot edit posts as this user.')); } } @@ -251,7 +251,7 @@ function edit_comment() { $comment_post_ID = (int) $_POST['comment_post_ID']; if (!current_user_can('edit_post', $comment_post_ID)) - die(__('You are not allowed to edit comments on this post, so you cannot edit this comment.')); + wp_die(__('You are not allowed to edit comments on this post, so you cannot edit this comment.')); $_POST['comment_author'] = $_POST['newcomment_author']; $_POST['comment_author_email'] = $_POST['newcomment_author_email']; @@ -530,7 +530,7 @@ function add_link() { function edit_link($link_id = '') { if (!current_user_can('manage_links')) - die(__("Cheatin' uh ?")); + wp_die(__("Cheatin' uh ?")); $_POST['link_url'] = wp_specialchars($_POST['link_url']); $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url']; @@ -642,6 +642,50 @@ function dropdown_categories($default = 0) { write_nested_categories(get_nested_categories($default)); } +function return_link_categories_list($parent = 0) { + global $wpdb; + return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent AND link_count > 0"); +} + +function get_nested_link_categories( $default = 0, $parent = 0 ) { + global $post_ID, $link_id, $mode, $wpdb; + + if ($link_id) { + $checked_categories = $wpdb->get_col(" + SELECT category_id + FROM $wpdb->categories, $wpdb->link2cat + WHERE $wpdb->link2cat.category_id = cat_ID AND $wpdb->link2cat.link_id = '$link_id' + "); + + if (count($checked_categories) == 0) { + // No selected categories, strange + $checked_categories[] = $default; + } + } else { + $checked_categories[] = $default; + } + + $cats = return_link_categories_list($parent); + $result = array (); + + if (is_array($cats)) { + foreach ($cats as $cat) { + $result[$cat]['children'] = get_nested_link_categories($default, $cat); + $result[$cat]['cat_ID'] = $cat; + $result[$cat]['checked'] = in_array($cat, $checked_categories); + $result[$cat]['cat_name'] = get_the_category_by_ID($cat); + } + } + + usort($result, 'sort_cats'); + + return $result; +} + +function dropdown_link_categories($default = 0) { + write_nested_categories(get_nested_link_categories($default)); +} + // Dandy new recursive multiple category stuff. function cat_rows($parent = 0, $level = 0, $categories = 0) { global $wpdb, $class; @@ -783,11 +827,6 @@ function wp_dropdown_cats($currentcat = 0, $currentparent = 0, $parent = 0, $lev } } -function return_link_categories_list($parent = 0) { - global $wpdb; - return $wpdb->get_col("SELECT cat_ID FROM $wpdb->categories WHERE category_parent = $parent ORDER BY link_count DESC"); -} - function wp_create_thumbnail($file, $max_side, $effect = '') { // 1 = GIF, 2 = JPEG, 3 = PNG @@ -1534,13 +1573,13 @@ function validate_file_to_edit($file, $allowed_files = '') { switch ($code) { case 1 : - die(__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.')); + wp_die(__('Sorry, can’t edit files with ".." in the name. If you are trying to edit a file in your WordPress home directory, you can just type the name of the file in.')); case 2 : - die(__('Sorry, can’t call files with their real path.')); + wp_die(__('Sorry, can’t call files with their real path.')); case 3 : - die(__('Sorry, that file cannot be edited.')); + wp_die(__('Sorry, that file cannot be edited.')); } } @@ -1857,7 +1896,7 @@ function wp_handle_upload(&$file, $overrides = false) { // Move the file to the uploads dir $new_file = $uploads['path'] . "/$filename"; if ( false === @ move_uploaded_file($file['tmp_name'], $new_file) ) - die(printf(__('The uploaded file could not be moved to %s.'), $file['path'])); + wp_die(printf(__('The uploaded file could not be moved to %s.'), $file['path'])); // Set correct file permissions $stat = stat(dirname($new_file)); @@ -1887,7 +1926,7 @@ function wp_import_cleanup($id) { function wp_import_upload_form($action) { ?> -
+

diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index ee0c286..f8322b1 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -30,7 +30,7 @@ function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}el

-

%s.'), $user_identity) ?> [, ]

+

%s.'), $user_identity) ?> [, ]

%s category: this is the default one"), $cat_name)); + wp_die(sprintf(__("Can't delete the %s category: this is the default one"), $cat_name)); if ( $cat_ID == get_option('default_link_category') ) - die(sprintf(__("Can't delete the %s category: this is the default one for bookmarks"), $cat_name)); + wp_die(sprintf(__("Can't delete the %s category: this is the default one for bookmarks"), $cat_name)); wp_delete_category($cat_ID); diff --git a/wp-admin/comment.php b/wp-admin/comment.php index bc6f510..95bee96 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -19,10 +19,10 @@ case 'editcomment': $comment = (int) $_GET['comment']; if ( ! $comment = get_comment($comment) ) - die(sprintf(__('Oops, no comment with this ID. Go back!'), 'javascript:history.go(-1)')); + wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'javascript:history.go(-1)')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( __('You are not allowed to edit comments on this post.') ); + wp_die( __('You are not allowed to edit comments on this post.') ); $comment = get_comment_to_edit($comment); @@ -42,10 +42,10 @@ case 'mailapprovecomment': $nonce_action .= $comment; if ( ! $comment = get_comment($comment) ) - die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( 'confirmdeletecomment' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + wp_die( 'confirmdeletecomment' == $action ? __('You are not allowed to delete comments on this post.') : __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); echo "
\n"; if ( 'spam' == $_GET['delete_type'] ) @@ -90,13 +90,13 @@ case 'deletecomment': } $postdata = get_post($p) or - die(sprintf(__('Oops, no post with this ID. Go back!'), 'edit.php')); + wp_die(sprintf(__('Oops, no post with this ID. Go back!'), 'edit.php')); if ( ! $comment = get_comment($comment) ) - die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit-comments.php')); + wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit-comments.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( __('You are not allowed to edit comments on this post.') ); + wp_die( __('You are not allowed to edit comments on this post.') ); if ( 'spam' == $_REQUEST['delete_type'] ) wp_set_comment_status($comment->comment_ID, 'spam'); @@ -123,10 +123,10 @@ case 'unapprovecomment': } if ( ! $comment = get_comment($comment) ) - die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); + wp_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); wp_set_comment_status($comment->comment_ID, "hold"); @@ -150,10 +150,10 @@ case 'approvecomment': } if ( ! $comment = get_comment($comment) ) - die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); + wp_die(sprintf(__('Oops, no comment with this ID. Go back!'), 'edit.php')); if ( !current_user_can('edit_post', $comment->comment_post_ID) ) - die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + wp_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); wp_set_comment_status($comment->comment_ID, "approve"); if (get_settings("comments_notify") == true) { diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 5431ce2..71eb46b 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -94,7 +94,7 @@ addLoadEvent(focusit);
-

+

@@ -189,20 +189,32 @@ if (current_user_can('upload_files')) {
+
+

+
+
+
+
+
+

+
+
: ()
+
+

diff --git a/wp-admin/edit-link-form.php b/wp-admin/edit-link-form.php index 5534f1d..30002e6 100644 --- a/wp-admin/edit-link-form.php +++ b/wp-admin/edit-link-form.php @@ -1,12 +1,12 @@ '; $nonce_action = 'update-bookmark_' . $link_id; } else { - $heading = __('Create Bookmark'); - $submit_text = __('Add Bookmark »'); + $heading = __('Add Link'); + $submit_text = __('Add Link »'); $form = ''; $nonce_action = 'add-bookmark'; } @@ -84,14 +84,14 @@ function xfn_check($class, $value = '', $type = 'check') { - - - - + + + + @@ -130,7 +130,7 @@ function xfn_check($class, $value = '', $type = 'check') { /> -
- + - + diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index de6dd62..58cd669 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -37,12 +37,12 @@ if (isset($mode) && 'bookmarklet' == $mode) {
@@ -69,7 +69,7 @@ addLoadEvent(focusit);
-

+

@@ -83,7 +83,7 @@ addLoadEvent(focusit); -
+

', __('Dotclear Database User:')); - printf('

  • ', __('Dotclear Database Password:')); - printf('
  • ', __('Dotclear Database Name:')); - printf('
  • ', __('Dotclear Database Host:')); - printf('
  • ', __('Dotclear Table prefix:')); - printf('
  • ', __('Originating character set:')); + printf('
  • ', __('Dotclear Database User:')); + printf('
  • ', __('Dotclear Database Password:')); + printf('
  • ', __('Dotclear Database Name:')); + printf('
  • ', __('Dotclear Database Host:')); + printf('
  • ', __('Dotclear Table prefix:')); + printf('
  • ', __('Originating character set:')); echo ''; } diff --git a/wp-admin/import/greymatter.php b/wp-admin/import/greymatter.php index f2b4e2d..8f7b34a 100644 --- a/wp-admin/import/greymatter.php +++ b/wp-admin/import/greymatter.php @@ -87,10 +87,10 @@ class GM_Import { } if (!chdir($archivespath)) - die("Wrong path, $archivespath\ndoesn't exist\non the server"); + wp_die("Wrong path, $archivespath\ndoesn't exist\non the server"); if (!chdir($gmpath)) - die("Wrong path, $gmpath\ndoesn't exist\non the server"); + wp_die("Wrong path, $gmpath\ndoesn't exist\non the server"); $this->header(); ?> diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index 17cae87..4a123de 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -569,11 +569,11 @@ class Textpattern_Import { function db_form() { echo '
      '; - printf('
    • ', __('Textpattern Database User:')); - printf('
    • ', __('Textpattern Database Password:')); - printf('
    • ', __('Textpattern Database Name:')); - printf('
    • ', __('Textpattern Database Host:')); - printf('
    • ', __('Textpattern Table prefix (if any):')); + printf('
    • ', __('Textpattern Database User:')); + printf('
    • ', __('Textpattern Database Password:')); + printf('
    • ', __('Textpattern Database Name:')); + printf('
    • ', __('Textpattern Database Host:')); + printf('
    • ', __('Textpattern Table prefix (if any):')); echo '
    '; } diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index c5c969d..bd2a2b9 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -5,7 +5,7 @@ require_once('admin.php'); header('Content-Type: text/html; charset=' . get_option('blog_charset')); if (!current_user_can('upload_files')) - die(__('You do not have permission to upload files.')); + wp_die(__('You do not have permission to upload files.')); wp_reset_vars(array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment')); @@ -22,7 +22,7 @@ case 'delete': check_admin_referer('inlineuploading'); if ( !current_user_can('edit_post', (int) $attachment) ) - die(__('You are not allowed to delete this attachment.').' ".__('Go back').''); + wp_die(__('You are not allowed to delete this attachment.').' ".__('Go back').''); wp_delete_attachment($attachment); @@ -41,7 +41,7 @@ if( isset( $file[ 'error' ] ) == false ) $file[ 'error' ] = apply_filters( "check_uploaded_file", $file[ 'error' ] ); if ( isset($file['error']) ) - die($file['error'] . '
    '.__('Back to Image Uploading').''); + wp_die($file['error'] . '
    '.__('Back to Image Uploading').''); $url = $file['url']; $type = $file['type']; @@ -279,7 +279,7 @@ $images_width = $uwidth_sum + ( count($images) * 6 ) + 35; break; default: -die(__('This script was not meant to be called directly.')); +wp_die(__('This script was not meant to be called directly.')); } ?> @@ -287,8 +287,10 @@ die(__('This script was not meant to be called directly.')); + + + +

    WordPress

    +

    $message

    + + +HEAD; + + $output = apply_filters('wp_die', $output, $message); + echo $output; + + die(); +} + ?> diff --git a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php index 41c0948..81e3f15 100755 --- a/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php +++ b/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php @@ -71,7 +71,7 @@ class TinyPspellShell { fwrite($fh, "^$word\n"); fclose($fh); } else - die("Error opening tmp file."); + wp_die("Error opening tmp file."); $data = shell_exec($this->cmd); @unlink($this->tmpfile); diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 0fc416e..3f244bc 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -1,8 +1,8 @@ <%1$s%2$s> tag'), $slash, $elem)); return ''; # They are using a not allowed HTML element @@ -629,6 +629,7 @@ function wp_kses_bad_protocol($string, $allowed_protocols) ############################################################################### { $string = wp_kses_no_null($string); + $string = preg_replace('/\xad+/', '', $string); # deals with Opera "feature" $string2 = $string.'a'; while ($string != $string2) { @@ -641,7 +642,7 @@ function wp_kses_bad_protocol($string, $allowed_protocols) function wp_kses_no_null($string) ############################################################################### -# This function removes any NULL or chr(173) characters in $string. +# This function removes any NULL characters in $string. ############################################################################### { $string = preg_replace('/\0+/', '', $string); @@ -717,6 +718,8 @@ function wp_kses_bad_protocol_once2($string, $allowed_protocols) $string2 = wp_kses_decode_entities($string); $string2 = preg_replace('/\s/', '', $string2); $string2 = wp_kses_no_null($string2); + $string2 = preg_replace('/\xad+/', '', $string2); + # deals with Opera "feature" $string2 = strtolower($string2); $allowed = false; diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index ab054bf..d2e7137 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -267,6 +267,7 @@ function wp_redirect($location) { global $is_IIS; $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); + $location = wp_kses_no_null($location); $strip = array('%0d', '%0a'); $location = str_replace($strip, '', $location); diff --git a/wp-includes/vars.php b/wp-includes/vars.php index 2573b27..beec34c 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -34,11 +34,6 @@ $is_IE = (($is_macIE) || ($is_winIE)); $is_apache = ( strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') || strstr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') ) ? 1 : 0; $is_IIS = strstr($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') ? 1 : 0; -// On OS X Server, $_SERVER['REMOTE_ADDR'] is the server's address. Workaround this -// by using $_SERVER['HTTP_PC_REMOTE_ADDR'], which *is* the remote address. -if ( isset($_SERVER['HTTP_PC_REMOTE_ADDR']) ) - $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_PC_REMOTE_ADDR']; - // if the config file does not provide the smilies array, let's define it here if (!isset($wpsmiliestrans)) { $wpsmiliestrans = array( diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php index b643eb8..c43fcb8 100644 --- a/wp-includes/wpmu-functions.php +++ b/wp-includes/wpmu-functions.php @@ -1332,7 +1332,7 @@ SITE_NAME" ) ); $message = $welcome_email; if( empty( $current_site->site_name ) ) $current_site->site_name = "WordPress MU"; - $subject = sprintf(__('New %s Blog: %s'), $current_site->site_name, $title); + $subject = sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, $title); wp_mail($user->user_email, $subject, $message, $message_headers); } @@ -1363,7 +1363,7 @@ SITE_NAME" ); $message = $welcome_email; if( empty( $current_site->site_name ) ) $current_site->site_name = "WordPress MU"; - $subject = sprintf(__('New %s User: %s'), $current_site->site_name, $user->user_login); + $subject = sprintf(__('New %1$s User: %2$s'), $current_site->site_name, $user->user_login); wp_mail($user->user_email, $subject, $message, $message_headers); } diff --git a/wp-login.php b/wp-login.php index b169ee5..8ee6e8a 100644 --- a/wp-login.php +++ b/wp-login.php @@ -98,7 +98,7 @@ case 'retrievepassword': $user_email = $user_data->user_email; if (!$user_email || $user_email != $_POST['email']) - die(sprintf(__('Sorry, that user does not seem to exist in our database. Perhaps you have the wrong username or e-mail address? Try again.'), 'wp-login.php?action=lostpassword')); + wp_die(sprintf(__('Sorry, that user does not seem to exist in our database. Perhaps you have the wrong username or e-mail address? Try again.'), 'wp-login.php?action=lostpassword')); do_action('retreive_password', $user_login); // Misspelled and deprecated. do_action('retrieve_password', $user_login); @@ -132,10 +132,10 @@ case 'rp' : // Generate something random for a password... md5'ing current time with a rand salt $key = preg_replace('/a-z0-9/i', '', $_GET['key']); if ( empty($key) ) - die( __('Sorry, that key does not appear to be valid.') ); + wp_die( __('Sorry, that key does not appear to be valid.') ); $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE user_activation_key = '$key'"); if ( !$user ) - die( __('Sorry, that key does not appear to be valid.') ); + wp_die( __('Sorry, that key does not appear to be valid.') ); do_action('password_reset'); diff --git a/wp-mail.php b/wp-mail.php index 2512907..7ab76f8 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -17,7 +17,7 @@ if (!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_por endif; $count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass')); -if (0 == $count) die(__('There doesn’t seem to be any new mail.')); +if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.')); for ($i=1; $i <= $count; $i++) : -- cgit