various eol whitespace now instead of when someone needs to do CR
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 12 Feb 2010 06:44:16 +0000 (06:44 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 12 Feb 2010 06:44:16 +0000 (06:44 +0000)
api.php
includes/api/ApiBase.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatJson.php
includes/api/ApiQuery.php
includes/api/ApiResult.php
includes/filerepo/ArchivedFile.php

diff --git a/api.php b/api.php
index 07c826c..852a808 100644 (file)
--- a/api.php
+++ b/api.php
@@ -23,8 +23,8 @@
  * @file
  */
 
-/** 
- * This file is the entry point for all API queries. It begins by checking 
+/**
+ * This file is the entry point for all API queries. It begins by checking
  * whether the API is enabled on this wiki; if not, it informs the user that
  * s/he should set $wgEnableAPI to true and exits. Otherwise, it constructs
  * a new ApiMain using the parameter passed to it as an argument in the URL
index 7bd9216..b01c507 100644 (file)
@@ -971,23 +971,23 @@ abstract class ApiBase {
        */
        public function getPossibleErrors() {
                $ret = array();
-               
+
                if ( $this->mustBePosted() ) {
                        $ret[] = array ( 'mustbeposted', $this->getModuleName() );
                }
-               
+
                if ( $this->isReadMode() ) {
                        $ret[] = array ( 'readrequired' );
                }
-               
+
                if ( $this->isWriteMode() ) {
                        $ret[] = array ( 'writerequired' );
                        $ret[] = array ( 'writedisabled' );
                }
-               
+
                return $ret;
        }
-       
+
        /**
        * Parses a list of errors into a standardised format
        * @param $errors array List of errors. Items can be in the for array( key, param1, param2, ... ) or array( 'code' => ..., 'info' => ... )
@@ -995,9 +995,9 @@ abstract class ApiBase {
        */
        public function parseErrors( $errors ) {
                $ret = array();
-               
+
                foreach ( $errors as $row )
-               {       
+               {
                        if ( isset( $row['code'] ) && isset( $row['info'] ) ) {
                                $ret[] = $row;
                        }
index 7803d8c..a6d6893 100644 (file)
@@ -101,11 +101,11 @@ abstract class ApiFormatBase extends ApiBase {
        public function getIsHtml() {
                return $this->mIsHtml;
        }
-       
+
        /**
         * Whether this formatter can format the help message in a nice way.
         * By default, this returns the same as getIsHtml().
-        * When action=help is set explicitly, the help will always be shown 
+        * When action=help is set explicitly, the help will always be shown
         * @return bool
         */
        public function getWantsHelp() {
@@ -189,6 +189,7 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
         * @param $text string
         */
        public function printText( $text ) {
+               error_log($text);
                if ( $this->mBufferResult ) {
                        $this->mBuffer = $text;
                } elseif ( $this->getIsHtml() ) {
@@ -205,7 +206,7 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
                        echo $text;
                }
        }
-       
+
        /**
         * Get the contents of the buffer.
         */
@@ -235,7 +236,7 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
        */
        protected function formatHTML( $text ) {
                global $wgUrlProtocols;
-               
+
                // Escape everything first for full coverage
                $text = htmlspecialchars( $text );
 
index 691f31c..ab62b9e 100644 (file)
@@ -42,7 +42,7 @@ class ApiFormatJson extends ApiFormatBase {
 
        public function getMimeType() {
                $params = $this->extractRequestParams();
-               // callback:            
+               // callback:
                if ( $params['callback'] ) {
                        return 'text/javascript';
                }
@@ -52,7 +52,7 @@ class ApiFormatJson extends ApiFormatBase {
        public function getNeedsRawData() {
                return $this->mIsRaw;
        }
-       
+
        public function getWantsHelp() {
                // Help is always ugly in JSON
                return false;
index a9fc9ca..75d0f89 100644 (file)
@@ -171,7 +171,7 @@ class ApiQuery extends ApiBase {
        function getModules() {
                return array_merge( $this->mQueryPropModules, $this->mQueryListModules, $this->mQueryMetaModules );
        }
-       
+
        public function getCustomPrinter() {
                // If &exportnowrap is set, use the raw formatter
                if ( $this->getParameter( 'export' ) &&
index e2355db..a818f6d 100644 (file)
@@ -91,7 +91,7 @@ class ApiResult extends ApiBase {
        public function getData() {
                return $this->mData;
        }
-       
+
        /**
         * Get the 'real' size of a result item. This means the strlen() of the item,
         * or the sum of the strlen()s of the elements if the item is an array.
@@ -116,7 +116,7 @@ class ApiResult extends ApiBase {
        public function getSize() {
                return $this->mSize;
        }
-       
+
        /**
         * Disable size checking in addValue(). Don't use this unless you
         * REALLY know what you're doing. Values added while size checking
@@ -125,7 +125,7 @@ class ApiResult extends ApiBase {
        public function disableSizeCheck() {
                $this->mCheckingSize = false;
        }
-       
+
        /**
         * Re-enable size checking in addValue()
         */
index 7905088..9113fd1 100644 (file)
@@ -49,18 +49,18 @@ class ArchivedFile
                $this->deleted = 0;
                $this->dataLoaded = false;
                $this->exists = false;
-               
+
                if( is_object($title) ) {
                        $this->title = $title;
                        $this->name = $title->getDBkey();
                }
-               
+
                if ($id)
                        $this->id = $id;
-               
+
                if ($key)
                        $this->key = $key;
-               
+
                if (!$id && !$key && !is_object($title))
                        throw new MWException( "No specifications provided to ArchivedFile constructor." );
        }
@@ -74,19 +74,19 @@ class ArchivedFile
                        return true;
                }
                $conds = array();
-               
+
                if( $this->id > 0 )
                        $conds['fa_id'] = $this->id;
                if( $this->key ) {
-                       $conds['fa_storage_group'] = $this->group;      
+                       $conds['fa_storage_group'] = $this->group;
                        $conds['fa_storage_key'] = $this->key;
                }
                if( $this->title )
                        $conds['fa_name'] = $this->title->getDBkey();
-                       
+
                if( !count($conds))
                        throw new MWException( "No specific information for retrieving archived file" );
-               
+
                if( !$this->title || $this->title->getNamespace() == NS_FILE ) {
                        $dbr = wfGetDB( DB_SLAVE );
                        $res = $dbr->select( 'filearchive',
@@ -195,7 +195,7 @@ class ArchivedFile
                $this->load();
                return $this->id;
        }
-       
+
        public function exists() {
                $this->load();
                return $this->exists;