w/s changes
authorMark A. Hershberger <mah@users.mediawiki.org>
Sat, 4 Sep 2010 01:06:34 +0000 (01:06 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Sat, 4 Sep 2010 01:06:34 +0000 (01:06 +0000)
includes/Exception.php
includes/HttpFunctions.php
includes/Skin.php
includes/db/Database.php
includes/filerepo/LocalFile.php
includes/installer/CliInstaller.php
maintenance/parserTests.inc
maintenance/tests/LanguageConverterTest.php
maintenance/tests/UploadFromUrlTestSuite.php
maintenance/tests/selenium/Selenium.php
maintenance/tests/selenium/SeleniumTestSuite.php

index 0b77322..e89d942 100644 (file)
@@ -229,7 +229,7 @@ class MWException extends Exception {
        function htmlFooter() {
                return "</body></html>";
        }
-       
+
        /**
         * headers handled by subclass?
         */
index 9464895..9123cc6 100644 (file)
@@ -26,7 +26,7 @@ class Http {
         *    - sslVerifyCert       (curl only) Verify SSL certificate
         *    - caInfo              (curl only) Provide CA information
         *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
-        *    - followRedirects     Whether to follow redirects (defaults to false). 
+        *    - followRedirects     Whether to follow redirects (defaults to false).
         *                                  Note: this should only be used when the target URL is trusted,
         *                                  to avoid attacks on intranet services accessible by HTTP.
         * @return Mixed: (bool)false on failure or a string on success
@@ -222,7 +222,7 @@ class HttpRequest {
 
        /**
         * Set the parameters of the request
-        
+
         * @param $args Array
         * @todo overload the args param
         */
@@ -502,7 +502,7 @@ class HttpRequest {
        }
 
        /**
-        * Returns true if the backend can follow redirects. Overridden by the 
+        * Returns true if the backend can follow redirects. Overridden by the
         * child classes.
         */
        public function canFollowRedirects() {
@@ -767,7 +767,7 @@ class CurlHttpRequest extends HttpRequest {
                if ( isset( $this->sslVerifyHost ) ) {
                        $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = $this->sslVerifyHost;
                }
-               
+
                if ( isset( $this->sslVerifyCert ) ) {
                        $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = $this->sslVerifyCert;
                }
@@ -800,7 +800,7 @@ class CurlHttpRequest extends HttpRequest {
                        if ( ! @curl_setopt( $curlHandle, CURLOPT_FOLLOWLOCATION, true ) ) {
                                wfDebug( __METHOD__.": Couldn't set CURLOPT_FOLLOWLOCATION. " .
                                        "Probably safe_mode or open_basedir is set.\n");
-                               // Continue the processing. If it were in curl_setopt_array, 
+                               // Continue the processing. If it were in curl_setopt_array,
                                // processing would have halted on its entry
                        }
                }
index 99926b7..664c11f 100644 (file)
@@ -664,10 +664,10 @@ CSS;
 
                wfProfileOut( __METHOD__ );
        }
-       
+
        /**
         * Get the query to generate a dynamic stylesheet
-        * 
+        *
         * @return array
         */
        public static function getDynamicStylesheetQuery() {
@@ -2140,14 +2140,14 @@ CSS;
         * Currently only used for MediaWiki:Sidebar (but may be used by Extensions)
         *
         * This is just a wrapper around addToSidebarPlain() for backwards compatibility
-        * 
+        *
         * @param &$bar array
         * @param $message String
         */
        function addToSidebar( &$bar, $message ) {
                $this->addToSidebarPlain( $bar, wfMsgForContent( $message ) );
        }
-       
+
        /**
         * Add content from plain text
         * @since 1.17
@@ -2205,12 +2205,12 @@ CSS;
                                        );
                                } else if ( (substr($line, 0, 2) == '{{') && (substr($line, -2) == '}}') ) {
                                        global $wgParser, $wgTitle;
-                                       
+
                                        $line = substr($line, 2, strlen($line) - 4 );
-                                       
+
                                        if (is_null($wgParser->mOptions))
                                                $wgParser->mOptions = new ParserOptions();
-                                       
+
                                        $wgParser->mOptions->setEditSection(false);
                                        $wikiBar[$heading] = $wgParser->parse( wfMsgForContentNoTrans( $line ) , $wgTitle, $wgParser->mOptions )->getText();
                                } else {
@@ -2218,10 +2218,10 @@ CSS;
                                }
                        }
                }
-               
+
                if ( count($wikiBar) > 0 )
                        $bar = array_merge($bar, $wikiBar);
-               
+
                return $bar;
        }
 
index 4f2217d..adee634 100644 (file)
@@ -186,7 +186,7 @@ abstract class DatabaseBase implements DatabaseType {
 
        /**
         * Returns true if this database requires that SELECT DISTINCT queries require that all
-       ORDER BY expressions occur in the SELECT list per the SQL92 standard
+          ORDER BY expressions occur in the SELECT list per the SQL92 standard
         */
        function standardSelectDistinct() {
                return true;
@@ -2030,7 +2030,7 @@ abstract class DatabaseBase implements DatabaseType {
         * @return Database replication lag in seconds
         */
        function getLag() {
-               return $this->mFakeSlaveLag;            
+               return $this->mFakeSlaveLag;
        }
 
        /**
@@ -2096,7 +2096,7 @@ abstract class DatabaseBase implements DatabaseType {
                                throw $e;
                        }
                }
-               
+
                fclose( $fp );
                return $error;
        }
@@ -2554,16 +2554,16 @@ class DBConnectionError extends DBError {
 <small>$outofdate</small></div>
 <!-- SiteSearch Google -->
 <form method="get" action="http://www.google.com/search" id="googlesearch">
-    <input type="hidden" name="domains" value="$wgServer" />
-    <input type="hidden" name="num" value="50" />
-    <input type="hidden" name="ie" value="$wgInputEncoding" />
-    <input type="hidden" name="oe" value="$wgInputEncoding" />
+       <input type="hidden" name="domains" value="$wgServer" />
+       <input type="hidden" name="num" value="50" />
+       <input type="hidden" name="ie" value="$wgInputEncoding" />
+       <input type="hidden" name="oe" value="$wgInputEncoding" />
 
-    <input type="text" name="q" size="31" maxlength="255" value="$search" />
-    <input type="submit" name="btnG" value="$googlesearch" />
+       <input type="text" name="q" size="31" maxlength="255" value="$search" />
+       <input type="submit" name="btnG" value="$googlesearch" />
   <div>
-    <input type="radio" name="sitesearch" id="gwiki" value="$wgServer" checked="checked" /><label for="gwiki">$wgSitename</label>
-    <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
+       <input type="radio" name="sitesearch" id="gwiki" value="$wgServer" checked="checked" /><label for="gwiki">$wgSitename</label>
+       <input type="radio" name="sitesearch" id="gWWW" value="" /><label for="gWWW">WWW</label>
   </div>
 </form>
 <!-- SiteSearch Google -->
index 3090106..22fb347 100644 (file)
@@ -73,7 +73,7 @@ class LocalFile extends File {
                $file->loadFromRow( $row );
                return $file;
        }
-       
+
        /**
         * Create a LocalFile from a SHA-1 key
         * Do not call this except from inside a repo class.
@@ -91,7 +91,7 @@ class LocalFile extends File {
                        return false;
                }
        }
-       
+
        /**
         * Fields in the image table
         */
@@ -130,7 +130,7 @@ class LocalFile extends File {
        }
 
        /**
-        * Get the memcached key for the main data for this file, or false if 
+        * Get the memcached key for the main data for this file, or false if
         * there is no access to the shared cache.
         */
        function getCacheKey() {
@@ -655,7 +655,7 @@ class LocalFile extends File {
                $opts['ORDER BY'] = "oi_timestamp $order";
                $opts['USE INDEX'] = array( 'oldimage' => 'oi_name_timestamp' );
 
-               wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields, 
+               wfRunHooks( 'LocalFile::getHistory', array( &$this, &$tables, &$fields,
                        &$conds, &$opts, &$join_conds ) );
 
                $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $opts, $join_conds );
@@ -792,7 +792,7 @@ class LocalFile extends File {
        {
                if( is_null( $user ) ) {
                        global $wgUser;
-                       $user = $wgUser; 
+                       $user = $wgUser;
                }
 
                $dbw = $this->repo->getMasterDB();
@@ -914,7 +914,7 @@ class LocalFile extends File {
                        $nullRevision = Revision::newNullRevision( $dbw, $descTitle->getArticleId(),
                                $log->getRcComment(), false );
                        $nullRevision->insertOn( $dbw );
-                       
+
                        wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRevision, $latest, $user ) );
                        $article->updateRevisionOn( $dbw, $nullRevision );
 
@@ -1023,7 +1023,7 @@ class LocalFile extends File {
                        // Purge the new image
                        $this->purgeEverything();
                }
-               
+
                return $status;
        }
 
@@ -1870,7 +1870,7 @@ class LocalFileMoveBatch {
                $dbw = $this->db;
 
                // Update current image
-               $dbw->update( 
+               $dbw->update(
                        'image',
                        array( 'img_name' => $this->newName ),
                        array( 'img_name' => $this->oldName ),
@@ -1902,7 +1902,7 @@ class LocalFileMoveBatch {
 
        /**
         * Generate triplets for FSRepo::storeBatch().
-        */ 
+        */
        function getMoveTriplets() {
                $moves = array_merge( array( $this->cur ), $this->olds );
                $triplets = array();    // The format is: (srcUrl, destZone, destUrl)
@@ -1917,7 +1917,7 @@ class LocalFileMoveBatch {
 
        /**
         * Removes non-existent files from move batch.
-        */ 
+        */
        function removeNonexistentFiles( $triplets ) {
                $files = array();
                foreach( $triplets as $file )
index 666f835..24d0fd7 100644 (file)
@@ -35,7 +35,7 @@ class CliInstaller extends CoreInstaller {
 
        /**
         * Constructor.
-        * 
+        *
         * @param $siteName
         * @param $admin
         * @param $option Array
@@ -59,7 +59,7 @@ class CliInstaller extends CoreInstaller {
                }
 
                $this->setVar( 'wgSitename', $siteName );
-               
+
                if ( $admin ) {
                        $this->setVar( '_AdminName', $admin );
                }
@@ -96,7 +96,7 @@ class CliInstaller extends CoreInstaller {
 
        public function endStage( $step, $status ) {
                $warnings = $status->getWarningsArray();
-               
+
                if ( !$status->isOk() ) {
                        $this->showStatusMessage( $status );
                        echo "\n";
@@ -107,7 +107,7 @@ class CliInstaller extends CoreInstaller {
                                        wfMsg( 'word-separator' ) );
                        }
                }
-               
+
                $this->showMessage( wfMsg( 'config-install-step-done' ) ."\n");
        }
 
index 7f38def..05327c1 100644 (file)
@@ -657,7 +657,7 @@ class ParserTest {
                                $db->query( "DROP TABLE IF EXISTS $newTableName" );
                        } elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) {
                                /* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669)
-                                * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That 
+                                * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That
                                 * syntax would also work for mysql.
                                 */
                        } elseif ( $db->tableExists( $tbl ) ) {
index c37d2f6..9fdcedc 100644 (file)
@@ -93,7 +93,7 @@ class LanguageConverterTest extends PHPUnit_Framework_TestCase {
                $wgUser = User::newFromId( "admin" );
                $wgUser->setId( 1 );
                $wgUser->setOption( 'variant', 'tg-latn' ); // The user's data is ignored
-                                                         // because the variant is set in the URL.
+                                                                                                 // because the variant is set in the URL.
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant( true,  false ) );
                $this->assertEquals( 'tg', $this->lc->getPreferredVariant( true,  true ) );
        }
index a439fd9..8393eb7 100644 (file)
@@ -13,11 +13,11 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite
 
        function setUp() {
                global $wgParser,  $wgParserConf, $IP, $messageMemc, $wgMemc, $wgDeferredUpdateList,
-                  $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
-                  $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
-                  $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
-                  $wgThumbnailScriptPath, $wgScriptPath,
-                  $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
+                                 $wgUser, $wgLang, $wgOut, $wgRequest, $wgStyleDirectory, $wgEnableParserCache,
+                                 $wgMessageCache, $wgUseDatabaseMessages, $wgMsgCacheExpiry, $parserMemc,
+                                 $wgNamespaceAliases, $wgNamespaceProtection, $wgLocalFileRepo,
+                                 $wgThumbnailScriptPath, $wgScriptPath,
+                                 $wgArticlePath, $wgStyleSheetPath, $wgScript, $wgStylePath;
 
                $wgScript = '/index.php';
                $wgScriptPath = '/';
@@ -163,10 +163,10 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite
                return $dir;
        }
 
-    public static function suite()
-    {
-        return new UploadFromUrlTestSuite( 'UploadFromUrlTest' );
-    }
+       public static function suite()
+       {
+               return new UploadFromUrlTestSuite( 'UploadFromUrlTest' );
+       }
 
 }
 
index 2662a75..48e505d 100644 (file)
@@ -81,7 +81,7 @@ class Selenium {
                if ( $value != true ) {
                        throw new Testing_Selenium_Exception( "Login Failed" );
                }
-               
+
        }
 
        public static function getInstance() {
@@ -107,7 +107,7 @@ class Selenium {
        public function log( $message ) {
                $this->logger->write( $message );
        }
-       
+
        public function setUrl( $url ) {
                self::$url = $url;
        }
index 3613576..a86f5a9 100644 (file)
@@ -15,7 +15,7 @@ class SeleniumTestSuite extends PHPUnit_Framework_TestSuite {
                if ( $this->isSetUp ) {
                        return;
                }
-               $this->isSetUp = true;  
+               $this->isSetUp = true;
                $this->selenium = Selenium::getInstance();
                $this->selenium->start();
                $this->login();