From 0f8197c0310fab5de264fe4fa4696315136fc56f Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 30 Apr 2012 13:48:13 +0200 Subject: [PATCH] spaces -> tabs --- includes/LinksUpdate.php | 88 ++++++++++++++++---------------- includes/SecondaryDataUpdate.php | 28 +++++----- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/includes/LinksUpdate.php b/includes/LinksUpdate.php index 1973d95943..40970556e7 100644 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@ -25,9 +25,9 @@ class LinksUpdate extends SecondaryDBDataUpdate { * @private */ var $mId, //!< Page ID of the article linked from - $mTitle, //!< Title object of the article linked from - $mParserOutput, //!< Whether to queue jobs for recursive update - $mLinks, //!< Map of title strings to IDs for the links in the document + $mTitle, //!< Title object of the article linked from + $mParserOutput, //!< Whether to queue jobs for recursive update + $mLinks, //!< Map of title strings to IDs for the links in the document $mImages, //!< DB keys of the images used, in the array key only $mTemplates, //!< Map of title strings to IDs for the template references, including broken ones $mExternals, //!< URLs of external links, array key only @@ -45,21 +45,21 @@ class LinksUpdate extends SecondaryDBDataUpdate { * @param $recursive Boolean: queue jobs for recursive updates? */ function __construct( $title, $parserOutput, $recursive = true ) { - parent::__construct( ); + parent::__construct( ); - if ( !is_object( $title ) ) { - throw new MWException( "The calling convention to LinksUpdate::LinksUpdate() has changed. " . - "Please see Article::editUpdates() for an invocation example.\n" ); - } + if ( !is_object( $title ) ) { + throw new MWException( "The calling convention to LinksUpdate::LinksUpdate() has changed. " . + "Please see Article::editUpdates() for an invocation example.\n" ); + } - if ( !is_object( $title ) ) { - throw new MWException( "The calling convention to LinksUpdate::__construct() has changed. " . + if ( !is_object( $title ) ) { + throw new MWException( "The calling convention to LinksUpdate::__construct() has changed. " . "Please see WikiPage::doEditUpdates() for an invocation example.\n" ); - } - $this->mTitle = $title; - $this->mId = $title->getArticleID(); + } + $this->mTitle = $title; + $this->mId = $title->getArticleID(); - $this->mParserOutput = $parserOutput; + $this->mParserOutput = $parserOutput; $this->mLinks = $parserOutput->getLinks(); $this->mImages = $parserOutput->getImages(); @@ -276,20 +276,20 @@ class LinksUpdate extends SecondaryDBDataUpdate { $this->invalidatePages( NS_FILE, array_keys( $images ) ); } - /** - * @param $table - * @param $insertions - * @param $fromField - */ - private function dumbTableUpdate( $table, $insertions, $fromField ) { - $this->mDb->delete( $table, array( $fromField => $this->mId ), __METHOD__ ); - if ( count( $insertions ) ) { - # The link array was constructed without FOR UPDATE, so there may - # be collisions. This may cause minor link table inconsistencies, - # which is better than crippling the site with lock contention. - $this->mDb->insert( $table, $insertions, __METHOD__, array( 'IGNORE' ) ); - } - } + /** + * @param $table + * @param $insertions + * @param $fromField + */ + private function dumbTableUpdate( $table, $insertions, $fromField ) { + $this->mDb->delete( $table, array( $fromField => $this->mId ), __METHOD__ ); + if ( count( $insertions ) ) { + # The link array was constructed without FOR UPDATE, so there may + # be collisions. This may cause minor link table inconsistencies, + # which is better than crippling the site with lock contention. + $this->mDb->insert( $table, $insertions, __METHOD__, array( 'IGNORE' ) ); + } + } /** * Update a table by doing a delete query then an insert query @@ -755,22 +755,22 @@ class LinksUpdate extends SecondaryDBDataUpdate { return $arr; } - /** - * Return the title object of the page being updated - * @return Title - */ - public function getTitle() { - return $this->mTitle; - } - - /** - * Returns parser output - * @since 1.19 - * @return ParserOutput - */ - public function getParserOutput() { - return $this->mParserOutput; - } + /** + * Return the title object of the page being updated + * @return Title + */ + public function getTitle() { + return $this->mTitle; + } + + /** + * Returns parser output + * @since 1.19 + * @return ParserOutput + */ + public function getParserOutput() { + return $this->mParserOutput; + } /** * Return the list of images used as generated by the parser diff --git a/includes/SecondaryDataUpdate.php b/includes/SecondaryDataUpdate.php index eeee42f884..43e7497583 100644 --- a/includes/SecondaryDataUpdate.php +++ b/includes/SecondaryDataUpdate.php @@ -25,8 +25,8 @@ abstract class SecondaryDataUpdate { /** * Constructor */ - public function __construct( ) { - # noop + public function __construct( ) { + # noop } /** @@ -34,18 +34,18 @@ abstract class SecondaryDataUpdate { */ public abstract function doUpdate(); - /** - * Conveniance method, calls doUpdate() on every element in the array. - * - * @static - * @param $updates array - */ - public static function runUpdates( $updates ) { - if ( empty( $updates ) ) return; # nothing to do + /** + * Conveniance method, calls doUpdate() on every element in the array. + * + * @static + * @param $updates array + */ + public static function runUpdates( $updates ) { + if ( empty( $updates ) ) return; # nothing to do - foreach ( $updates as $update ) { - $update->doUpdate(); - } - } + foreach ( $updates as $update ) { + $update->doUpdate(); + } + } } -- 2.20.1