diff options
-rw-r--r-- | wp-admin/admin-db.php | 4 | ||||
-rw-r--r-- | wp-admin/link-manager.php | 31 | ||||
-rw-r--r-- | wp-includes/wp-db.php | 100 |
3 files changed, 69 insertions, 66 deletions
diff --git a/wp-admin/admin-db.php b/wp-admin/admin-db.php index 0b8c264..6cd63dd 100644 --- a/wp-admin/admin-db.php +++ b/wp-admin/admin-db.php @@ -271,13 +271,13 @@ function wp_delete_user($id, $reassign = 'novalue') { } // FINALLY, delete user + do_action('delete_user', $id); + $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = $id AND meta_key = '{$wpdb->prefix}capabilities'"); wp_cache_delete($id, 'users'); wp_cache_delete($user->user_login, 'userlogins'); - do_action('delete_user', $id); - return true; } diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 783c938..337e7b5 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -76,21 +76,22 @@ if ( isset($_GET['deleted']) ) { <h2><?php _e('Blogroll Management'); ?></h2> <p><?php _e('Here you add links to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it’s called a “blogroll.”'); ?></p> <form id="cats" method="get" action=""> -<p>Currently showing -<?php $categories = get_categories("hide_empty=1&type=link"); ?> -<select name="cat_id"> -<option value="all" <?php echo ($cat_id == 'all') ? " selected='selected'" : ''; ?>><?php _e('All') ?></option> -<?php foreach ($categories as $cat): ?> -<option value="<?php echo $cat->cat_ID; ?>"<?php echo ($cat->cat_ID == $cat_id) ? " selected='selected'" : ''; ?>><?php echo wp_specialchars($cat->cat_name); ?> -</option> -<?php endforeach; ?> -</select> -links ordered by -<select name="order_by"> -<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option> -<option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option> -<option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('Address') ?></option> -</select> +<p><?php +$categories = get_categories("hide_empty=1&type=link"); +$select_cat = "<select name=\"cat_id\">\n"; +$select_cat .= '<option value="all"' . (($cat_id == 'all') ? " selected='selected'" : '') . '>' . __('All') . "</option>\n"; +foreach ((array) $categories as $cat) + $select_cat .= '<option value="' . $cat->cat_ID . '"' . (($cat->cat_ID == $cat_id) ? " selected='selected'" : '') . '>' . wp_specialchars($cat->cat_name) . "</option>\n"; +$select_cat .= "</select>\n"; + +$select_order = "<select name=\"order_by\">\n"; +$select_order .= '<option value="order_id"' . (($order_by == 'order_id') ? " selected='selected'" : '') . '>' . __('Bookmark ID') . "</option>\n"; +$select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' . __('Name') . "</option>\n"; +$select_order .= '<option value="order_url"' . (($order_by == 'order_url') ? " selected='selected'" : '') . '>' . __('Address') . "</option>\n"; +$select_order .= "</select>\n"; + +printf(__('Currently showing %1$s links ordered by %2$s'), $select_cat, $select_order); +?> <input type="submit" name="action" value="<?php _e('Update »') ?>" /></p> </form> diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 142a3ec..37f361a 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -373,59 +373,61 @@ class wpdb { } function bail($message) { // Just wraps errors in a nice header and footer - if ( !$this->show_errors ) - return false; - header( 'Content-Type: text/html; charset=utf-8'); - echo <<<HEAD - <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>WordPress › Error</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <style media="screen" type="text/css"> - <!-- - html { - background: #eee; - } - body { - background: #fff; - color: #000; - font-family: Georgia, "Times New Roman", Times, serif; - margin-left: 25%; - margin-right: 25%; - padding: .2em 2em; - } + if ( !$this->show_errors ) + return false; - h1 { - color: #006; - font-size: 18px; - font-weight: lighter; - } + header( 'Content-Type: text/html; charset=utf-8'); +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>WordPress › Error</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <style media="screen" type="text/css"> + <!-- + html { + background: #eee; + } + body { + background: #fff; + color: #000; + font-family: Georgia, "Times New Roman", Times, serif; + margin-left: 25%; + margin-right: 25%; + padding: .2em 2em; + } - h2 { - font-size: 16px; - } + h1 { + color: #006; + font-size: 18px; + font-weight: lighter; + } - p, li, dt { - line-height: 140%; - padding-bottom: 2px; - } + h2 { + font-size: 16px; + } - ul, ol { - padding: 5px 5px 5px 20px; - } - #logo { - margin-bottom: 2em; - } - --> - </style> - </head> - <body> - <h1 id="logo"><img alt="WordPress" src="http://static.wordpress.org/logo.png" /></h1> -HEAD; - echo $message; - echo "</body></html>"; - die(); + p, li, dt { + line-height: 140%; + padding-bottom: 2px; + } + + ul, ol { + padding: 5px 5px 5px 20px; + } + #logo { + margin-bottom: 2em; + } + --> + </style> +</head> +<body> + <h1 id="logo"><img alt="WordPress" src="<?php echo "wp-admin/images/wordpress-logo.png" ?>/></h1> + <p><?php echo $message; ?></p> +</body> +</html> +<?php + die(); } } |