Merge "Fix tabs inside/between statements/text"
authorNikerabbit <niklas.laxstrom@gmail.com>
Fri, 26 Oct 2012 18:57:25 +0000 (18:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Oct 2012 18:57:25 +0000 (18:57 +0000)
16 files changed:
includes/MimeMagic.php
includes/OutputPage.php
includes/RecentChange.php
includes/Skin.php
includes/WebRequest.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/json/Services_JSON.php
includes/media/SVG.php
includes/parser/LinkHolderArray.php
includes/resourceloader/ResourceLoader.php
maintenance/archives/patch-uploadstash.sql
maintenance/update.php
tests/phpunit/data/db/sqlite/tables-1.18.sql
tests/phpunit/includes/GlobalFunctions/wfBCP47Test.php
tests/phpunit/includes/MWNamespaceTest.php

index 88383d8..65a2a6f 100644 (file)
@@ -433,7 +433,7 @@ class MimeMagic {
                $ext = explode( ' ', $ext );
 
                $extension = strtolower( $extension );
-               return  in_array( $extension, $ext );
+               return  in_array( $extension, $ext );
        }
 
        /**
index 3578568..ff83f70 100644 (file)
@@ -2982,7 +2982,7 @@ $templates
                );
                if ( $wgContLang->hasVariants() ) {
                        $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
-               }
+               }
                foreach ( $title->getRestrictionTypes() as $type ) {
                        $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type );
                }
index 2f221a8..3cf6c72 100644 (file)
@@ -616,7 +616,7 @@ class RecentChange {
                        'rc_params' => isset( $row->rc_params ) ? $row->rc_params : '',
                        'rc_log_type' => isset( $row->rc_log_type ) ? $row->rc_log_type : null,
                        'rc_log_action' => isset( $row->rc_log_action ) ? $row->rc_log_action : null,
-                       'rc_log_id' => isset( $row->rc_log_id ) ? $row->rc_log_id: 0,
+                       'rc_logid' => isset( $row->rc_logid ) ? $row->rc_logid : 0,
                        'rc_deleted' => $row->rc_deleted // MUST be set
                );
        }
index 24d48bc..9e5613e 100644 (file)
@@ -73,7 +73,7 @@ abstract class Skin extends ContextSource {
                return $wgValidSkinNames;
        }
 
-       /**
+       /**
         * Fetch the skinname messages for available skins.
         * @return array of strings
         */
index aeac694..e251ac5 100644 (file)
@@ -382,7 +382,7 @@ class WebRequest {
 
        /**
         * Unset an arbitrary value from our get/post data.
-        *
+        *
         * @param $key String: key name to use
         * @return Mixed: old value if one was present, null otherwise
         */
index de59b2d..75ede23 100644 (file)
@@ -269,14 +269,15 @@ abstract class DatabaseInstaller {
 
                $ret = true;
                ob_start( array( $this, 'outputHandler' ) );
+               $up = DatabaseUpdater::newForDB( $this->db );
                try {
-                       $up = DatabaseUpdater::newForDB( $this->db );
                        $up->doUpdates();
                } catch ( MWException $e ) {
                        echo "\nAn error occurred:\n";
                        echo $e->getText();
                        $ret = false;
                }
+               $up->purgeCache();
                ob_end_flush();
                return $ret;
        }
index 7223003..740ead5 100644 (file)
@@ -292,8 +292,8 @@ abstract class DatabaseUpdater {
         *
         * @param $what Array: what updates to perform
         */
-       public function doUpdates( $what = array( 'core', 'extensions', 'purge', 'stats' ) ) {
-               global $wgLocalisationCacheConf, $wgVersion;
+       public function doUpdates( $what = array( 'core', 'extensions', 'stats' ) ) {
+               global $wgVersion;
 
                $this->db->begin( __METHOD__ );
                $what = array_flip( $what );
@@ -310,14 +310,6 @@ abstract class DatabaseUpdater {
                if ( isset( $what['stats'] ) ) {
                        $this->checkStats();
                }
-
-               if ( isset( $what['purge'] ) ) {
-                       $this->purgeCache();
-
-                       if ( $wgLocalisationCacheConf['manualRecache'] ) {
-                               $this->rebuildLocalisationCache();
-                       }
-               }
                $this->db->commit( __METHOD__ );
        }
 
@@ -617,11 +609,15 @@ abstract class DatabaseUpdater {
        /**
         * Purge the objectcache table
         */
-       protected function purgeCache() {
+       public function purgeCache() {
+               global $wgLocalisationCacheConf;
                # We can't guarantee that the user will be able to use TRUNCATE,
                # but we know that DELETE is available to us
                $this->output( "Purging caches..." );
                $this->db->delete( 'objectcache', '*', __METHOD__ );
+               if ( $wgLocalisationCacheConf['manualRecache'] ) {
+                       $this->rebuildLocalisationCache();
+               }
                $this->output( "done.\n" );
        }
 
index 398ed6a..2566072 100644 (file)
@@ -283,7 +283,7 @@ class Services_JSON
                return $this->encode2($var);
        }
 
-       /**
+       /**
         * encodes an arbitrary variable into JSON format
         *
         * @param $var Mixed: any number, boolean, string, array, or object to be encoded.
index 75d474c..53716df 100644 (file)
@@ -252,7 +252,7 @@ class SvgHandler extends ImageHandler {
                try {
                        $metadata = SVGMetadataExtractor::getMetadata( $filename );
                } catch( Exception $e ) {
-                       // Broken file?
+                       // Broken file?
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
                        return '0';
                }
index 49160e8..9f1fff2 100644 (file)
@@ -43,7 +43,7 @@ class LinkHolderArray {
                }
        }
 
-       /**
+       /**
         * Don't serialize the parent object, it is big, and not needed when it is
         * a parameter to mergeForeign(), which is the only application of
         * serializing at present.
index 6705863..b4bd98c 100644 (file)
@@ -347,7 +347,7 @@ class ResourceLoader {
                return array_keys( $this->moduleInfos );
        }
 
-       /**
+       /**
         * Get a list of test module names for one (or all) frameworks.
         * If the given framework id is unknkown, or if the in-object variable is not an array,
         * then it will return an empty array.
index 556d6b2..14eaeab 100644 (file)
@@ -33,7 +33,7 @@ CREATE TABLE /*_*/uploadstash (
        us_sha1 varchar(31) NOT NULL,
        us_mime varchar(255),
        -- Media type as defined by the MEDIATYPE_xxx constants, should duplicate definition in the image table
-       us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
+       us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
        -- image-specific properties
        us_image_width int unsigned,
        us_image_height int unsigned,
index e3c993b..cb6f06b 100644 (file)
@@ -118,9 +118,6 @@ class UpdateMediaWiki extends Maintenance {
                $shared = $this->hasOption( 'doshared' );
 
                $updates = array( 'core', 'extensions', 'stats' );
-               if( !$this->hasOption('nopurge') ) {
-                       $updates[] = 'purge';
-               }
 
                $updater = DatabaseUpdater::newForDb( $db, $shared, $this );
                $updater->doUpdates( $updates );
@@ -140,6 +137,10 @@ class UpdateMediaWiki extends Maintenance {
                        }
                }
 
+               if( !$this->hasOption('nopurge') ) {
+                       $updater->purgeCache();
+               }
+
                $this->output( "\nDone.\n" );
        }
 
index bedf6c3..b106d2b 100644 (file)
@@ -296,7 +296,7 @@ CREATE TABLE /*_*/uploadstash (
        us_size int unsigned NOT NULL,
        us_sha1 varchar(31) NOT NULL,
        us_mime varchar(255),
-       us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
+       us_media_type ENUM("UNKNOWN", "BITMAP", "DRAWING", "AUDIO", "VIDEO", "MULTIMEDIA", "OFFICE", "TEXT", "EXECUTABLE", "ARCHIVE") default NULL,
        us_image_width int unsigned,
        us_image_height int unsigned,
        us_image_bits smallint unsigned
index f4ec7a5..4a0f406 100644 (file)
@@ -7,7 +7,7 @@ class wfBCP47 extends MediaWikiTestCase {
         * test @see wfBCP47().
         * Please note the BCP explicitly state that language codes are case
         * insensitive, there are some exceptions to the rule :)
-        * This test is used to verify our formatting against all lower and
+        * This test is used to verify our formatting against all lower and
         * all upper cases language code.
         *
         * @see http://tools.ietf.org/html/bcp47
index 5de5cc9..01d406a 100644 (file)
@@ -449,7 +449,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
         *   $wgCapitalLinkOverrides = array(); by default
         *   $wgCapitalLinks = true; by default
         * This function test $wgCapitalLinks
-        *
+        *
         * Global setting correctness is tested against the NS_PROJECT and
         * NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
         */