From d5ced26371089b427d31878f6d0b91450699f405 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 13 Feb 2010 06:08:15 +0000 Subject: [PATCH] Initialise Variables, Whitespace cleanup, Remove unused variables, Cast start_of_week option to int in sanitization. git-svn-id: https://develop.svn.wordpress.org/trunk@13089 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/class-wp-upgrader.php | 2 ++ wp-includes/formatting.php | 2 +- wp-includes/query.php | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 717e3dde0f..708577e77f 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -464,6 +464,8 @@ class Plugin_Upgrader extends WP_Upgrader { $this->maintenance_mode(true); + $results = array(); + $all = count($plugins); $i = 1; foreach ( $plugins as $plugin ) { diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 8f0aa7fd14..5069c8786f 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -1374,7 +1374,6 @@ function make_clickable($ret) { * @return string Converted content. */ function wp_rel_nofollow( $text ) { - global $wpdb; // This is a pre save filter, so text is already escaped. $text = stripslashes($text); $text = preg_replace_callback('||i', 'wp_rel_nofollow_callback', $text); @@ -2470,6 +2469,7 @@ function sanitize_option($option, $value) { case 'comments_per_page': case 'thread_comments_depth': case 'users_can_register': + case 'start_of_week': $value = absint( $value ); break; diff --git a/wp-includes/query.php b/wp-includes/query.php index 4b352b728f..b19621b99c 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2365,8 +2365,8 @@ class WP_Query { foreach ( $stickies as $sticky_post ) { if ( 'publish' != $sticky_post->post_status ) continue; - array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); - $sticky_offset++; + array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); + $sticky_offset++; } } }