diff --git a/wp-admin/bookmarklet.php b/wp-admin/bookmarklet.php index 434534044..04e13cd86 100644 --- a/wp-admin/bookmarklet.php +++ b/wp-admin/bookmarklet.php @@ -3,7 +3,7 @@ $mode = 'bookmarklet'; require_once('admin.php'); if ( ! current_user_can('edit_posts') ) - die ("Cheatin' uh?"); + wp_die(__('Cheatin’ uh?')); if ('b' == $a): ?> diff --git a/wp-admin/categories.php b/wp-admin/categories.php index 63313d875..65d4b7fba 100644 --- a/wp-admin/categories.php +++ b/wp-admin/categories.php @@ -13,7 +13,7 @@ case 'addcat': check_admin_referer('add-category'); if ( !current_user_can('manage_categories') ) - die (__('Cheatin’ uh?')); + wp_die(__('Cheatin’ uh?')); wp_insert_category($_POST); @@ -25,7 +25,7 @@ case 'delete': check_admin_referer('delete-category_' . $cat_ID); if ( !current_user_can('manage_categories') ) - die (__('Cheatin’ uh?')); + wp_die(__('Cheatin’ uh?')); $cat_name = get_catname($cat_ID); @@ -56,7 +56,7 @@ case 'editedcat': check_admin_referer('update-category_' . $cat_ID); if ( !current_user_can('manage_categories') ) - die (__('Cheatin’ uh?')); + wp_die(__('Cheatin’ uh?')); wp_update_category($_POST); diff --git a/wp-admin/install.php b/wp-admin/install.php index 58a7bec18..9c2ade499 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -74,7 +74,7 @@ header( 'Content-Type: text/html; charset=utf-8' );

WordPress

'.__('Already Installed').'

'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'

'); +if ( is_blog_installed() ) die('

'.__('Already Installed').'

'.__('You appear to have already installed WordPress. To reinstall please clear your old database tables first.').'

'); switch($step) { diff --git a/wp-admin/link-import.php b/wp-admin/link-import.php index 98bdc87b1..819c15977 100644 --- a/wp-admin/link-import.php +++ b/wp-admin/link-import.php @@ -16,7 +16,7 @@ switch ($step) { { include_once('admin-header.php'); if ( !current_user_can('manage_links') ) - die (__("Cheatin’ uh?")); + wp_die(__('Cheatin’ uh?')); $opmltype = 'blogrolling'; // default. ?> @@ -68,7 +68,7 @@ foreach ($categories as $category) { include_once('admin-header.php'); if ( !current_user_can('manage_links') ) - die (__("Cheatin' uh ?")); + wp_die(__('Cheatin’ uh?')); ?>
diff --git a/wp-admin/link.php b/wp-admin/link.php index 00a281b4c..0590f1644 100644 --- a/wp-admin/link.php +++ b/wp-admin/link.php @@ -18,7 +18,7 @@ switch ($action) { // check the current user's level first. if (!current_user_can('manage_links')) - wp_die(__("Cheatin' uh ?")); + wp_die(__('Cheatin’ uh?')); //for each link id (in $linkcheck[]) change category to selected value if (count($linkcheck) == 0) { @@ -42,7 +42,7 @@ switch ($action) { // check the current user's level first. if (!current_user_can('manage_links')) - wp_die(__("Cheatin' uh ?")); + wp_die(__('Cheatin’ uh?')); //for each link id (in $linkcheck[]) change category to selected value if (count($linkcheck) == 0) { @@ -79,7 +79,7 @@ switch ($action) { check_admin_referer('delete-bookmark_' . $link_id); if (!current_user_can('manage_links')) - wp_die(__("Cheatin' uh ?")); + wp_die(__('Cheatin’ uh?')); wp_delete_link($link_id); diff --git a/wp-admin/options.php b/wp-admin/options.php index d94634beb..d4cf54432 100644 --- a/wp-admin/options.php +++ b/wp-admin/options.php @@ -8,7 +8,7 @@ $parent_file = 'options-general.php'; wp_reset_vars(array('action')); if ( !current_user_can('manage_options') ) - die ( __('Cheatin’ uh?') ); + wp_die(__('Cheatin’ uh?')); switch($action) { diff --git a/wp-admin/sidebar.php b/wp-admin/sidebar.php index 74cb0819a..4d3ee2174 100644 --- a/wp-admin/sidebar.php +++ b/wp-admin/sidebar.php @@ -4,7 +4,7 @@ $mode = 'sidebar'; require_once('admin.php'); if ( ! current_user_can('edit_posts') ) - die ("Cheatin' uh ?"); + wp_die(__('Cheatin’ uh?')); if ('b' == $_GET['a']) { diff --git a/wp-admin/update-links.php b/wp-admin/update-links.php index e2aa540d8..4aa8a8477 100644 --- a/wp-admin/update-links.php +++ b/wp-admin/update-links.php @@ -8,7 +8,7 @@ if ( !get_option('use_linksupdate') ) $link_uris = $wpdb->get_col("SELECT link_url FROM $wpdb->links"); if ( !$link_uris ) - wp_die('No links'); + wp_die(__('No links')); $link_uris = urlencode( join( $link_uris, "\n" ) ); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 302886e0f..97231f90b 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1117,65 +1117,58 @@ function wp_nonce_ays($action) { } function wp_die($message) { - global $wpdb; - - if ( !$wpdb->show_errors ) - return false; header('Content-Type: text/html; charset=utf-8'); - $output = << - - - WordPress › Error - - - - -

WordPress

-

$message

- - -HEAD; - - $output = apply_filters('wp_die', $output, $message); - echo $output; + ul, ol { + padding: 5px 5px 5px 20px; + } + #logo { + margin-bottom: 2em; + } + --> + + + +

WordPress

+

+ + +show_errors ) - return false; - header( 'Content-Type: text/html; charset=utf-8'); - echo << - - - WordPress › Error - - - - -

WordPress

-HEAD; - echo $message; - echo ""; - die(); + wp_die($message); } } diff --git a/wp-mail.php b/wp-mail.php index 91c448e05..7f75d55cc 100644 --- a/wp-mail.php +++ b/wp-mail.php @@ -11,10 +11,8 @@ $phone_delim = '::'; $pop3 = new POP3(); -if (!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) : - echo "Ooops $pop3->ERROR
\n"; - exit; -endif; +if (!$pop3->connect(get_settings('mailserver_url'), get_settings('mailserver_port'))) + wp_die($pop3->ERROR); $count = $pop3->login(get_settings('mailserver_login'), get_settings('mailserver_pass')); if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.'));