From: Mark A. Hershberger Date: Fri, 12 Feb 2010 06:44:16 +0000 (+0000) Subject: various eol whitespace now instead of when someone needs to do CR X-Git-Tag: 1.31.0-rc.0~37802 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8b36a2b9699d59c23b890da1bf7bb72a72d1be20;p=lhc%2Fweb%2Fwiklou.git various eol whitespace now instead of when someone needs to do CR --- diff --git a/api.php b/api.php index 07c826c068..852a80816d 100644 --- 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 diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 7bd9216899..b01c507afa 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -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; } diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 7803d8c633..a6d689359c 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -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 complete documentation, 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 complete documentation, or echo $text; } } - + /** * Get the contents of the buffer. */ @@ -235,7 +236,7 @@ See complete documentation, or */ protected function formatHTML( $text ) { global $wgUrlProtocols; - + // Escape everything first for full coverage $text = htmlspecialchars( $text ); diff --git a/includes/api/ApiFormatJson.php b/includes/api/ApiFormatJson.php index 691f31c44e..ab62b9e960 100644 --- a/includes/api/ApiFormatJson.php +++ b/includes/api/ApiFormatJson.php @@ -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; diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index a9fc9ca00a..75d0f89f2a 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -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' ) && diff --git a/includes/api/ApiResult.php b/includes/api/ApiResult.php index e2355db3c8..a818f6d5d6 100644 --- a/includes/api/ApiResult.php +++ b/includes/api/ApiResult.php @@ -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() */ diff --git a/includes/filerepo/ArchivedFile.php b/includes/filerepo/ArchivedFile.php index 79050880b2..9113fd1529 100644 --- a/includes/filerepo/ArchivedFile.php +++ b/includes/filerepo/ArchivedFile.php @@ -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;