From be09a508877fb1a2441e8c7783742a84111b6851 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 28 Sep 2015 13:53:41 +0200 Subject: [PATCH] Fix 5 PHPCS warnings in WikiPage.php Change-Id: Ib7e4c3ef2b2dbc0807c3823992d2164d2c68c8cb --- includes/page/WikiPage.php | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index 424d6363cd..2fde8324c3 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -950,7 +950,6 @@ class WikiPage implements Page, IDBAccessObject { if ( $rt->isExternal() ) { if ( $rt->isLocal() ) { // Offsite wikis need an HTTP redirect. - // // This can be hard to reverse and may produce loops, // so they may be disabled in the site configuration. $source = $this->mTitle->getFullURL( 'redirect=no' ); @@ -964,10 +963,8 @@ class WikiPage implements Page, IDBAccessObject { if ( $rt->isSpecialPage() ) { // Gotta handle redirects to special pages differently: - // Fill the HTTP response "Location" header and ignore - // the rest of the page we're on. - // - // Some pages are not valid targets + // Fill the HTTP response "Location" header and ignore the rest of the page we're on. + // Some pages are not valid targets. if ( $rt->isValidRedirectTarget() ) { return $rt->getFullURL(); } else { @@ -1811,8 +1808,7 @@ class WikiPage implements Page, IDBAccessObject { } $revisionId = $revision->insertOn( $dbw ); - // Update page - // + // Update page. // We check for conflicts by comparing $oldid with the current latest revision ID. $ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect ); @@ -2817,16 +2813,18 @@ class WikiPage implements Page, IDBAccessObject { $bitfield = 'rev_deleted'; } - // For now, shunt the revision data into the archive table. - // Text is *not* removed from the text table; bulk storage - // is left intact to avoid breaking block-compression or - // immutable storage schemes. - // - // For backwards compatibility, note that some older archive - // table entries will have ar_text and ar_flags fields still. - // - // In the future, we may keep revisions and mark them with - // the rev_deleted field, which is reserved for this purpose. + /** + * For now, shunt the revision data into the archive table. + * Text is *not* removed from the text table; bulk storage + * is left intact to avoid breaking block-compression or + * immutable storage schemes. + * + * For backwards compatibility, note that some older archive + * table entries will have ar_text and ar_flags fields still. + * + * In the future, we may keep revisions and mark them with + * the rev_deleted field, which is reserved for this purpose. + */ $row = array( 'ar_namespace' => 'page_namespace', -- 2.20.1