r103193 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103192‎ | r103193 | r103194 >
Date:16:55, 15 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r103142

[apply] PHP Parse error: syntax error, unexpected T_VARIABLE in /var/lib/jenkins/jobs/MediaWiki-lint/workspace/mw-extensions/FlaggedRevs/frontend/specialpages/reports/StablePages_body.php on line 3
[apply] Errors parsing /var/lib/jenkins/jobs/MediaWiki-lint/workspace/mw-extensions/FlaggedRevs/frontend/specialpages/reports/StablePages_body.php

Aaron seems to have stripped a lot of comments at the start of lines

Bad Aaron
Modified paths:
  • /trunk/extensions/FlaggedRevs/frontend/specialpages/reports/StablePages_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/frontend/specialpages/reports/StablePages_body.php
@@ -1,6 +1,6 @@
22 <?php
33
4 - Assumes $wgFlaggedRevsProtection is on
 4+// Assumes $wgFlaggedRevsProtection is on
55 class StablePages extends SpecialPage {
66 protected $pager = null;
77
@@ -31,15 +31,15 @@
3232 $this->getLang()->formatNum( $this->pager->getNumRows() ) );
3333
3434 $fields = array();
35 - Namespace selector
 35+ // Namespace selector
3636 if ( count( FlaggedRevs::getReviewNamespaces() ) > 1 ) {
3737 $fields[] = FlaggedRevsXML::getNamespaceMenu( $this->namespace, '' );
3838 }
39 - Restriction level selector
 39+ // Restriction level selector
4040 if ( FlaggedRevs::getRestrictionLevels() ) {
4141 $fields[] = FlaggedRevsXML::getRestrictionFilterMenu( $this->autoreview );
4242 }
43 - $fields[] = Xml::checkLabel( wfMsg( 'stablepages-indef' ), 'indef',
 43+ $fields[] = Xml::checkLabel( wfMsg( 'stablepages-indef' ), 'indef',
4444 'stablepages-indef', $this->indef );
4545
4646 $form = Html::openElement( 'form',
@@ -63,7 +63,7 @@
6464 } else {
6565 $out->addWikiMsg( 'stablepages-none' );
6666 }
67 - Purge expired entries on one in every 10 queries
 67+ // Purge expired entries on one in every 10 queries
6868 if ( !mt_rand( 0, 10 ) ) {
6969 FRPageConfig::purgeExpiredConfigurations();
7070 }
@@ -71,9 +71,9 @@
7272
7373 public function formatRow( $row ) {
7474 $title = Title::makeTitle( $row->page_namespace, $row->page_title );
75 - Link to page
 75+ // Link to page
7676 $link = Linker::link( $title );
77 - Helpful utility links
 77+ // Helpful utility links
7878 $utilLinks = array();
7979 $utilLinks[] = Linker::link( $title,
8080 wfMsgHtml( 'stablepages-config' ),
@@ -84,13 +84,13 @@
8585 $utilLinks[] = Linker::link( SpecialPage::getTitleFor( 'Log', 'stable' ),
8686 wfMsgHtml( 'stable-logpage' ),
8787 array(), array( 'page' => $title->getPrefixedText() ), 'known' );
88 - Autoreview/review restriction level
 88+ // Autoreview/review restriction level
8989 $restr = '';
9090 if ( $row->fpc_level != '' ) {
9191 $restr = 'autoreview=' . htmlspecialchars( $row->fpc_level );
9292 $restr = "[$restr]";
9393 }
94 - When these configuration settings expire
 94+ // When these configuration settings expire
9595 if ( $row->fpc_expiry != 'infinity' && strlen( $row->fpc_expiry ) ) {
9696 $expiry_description = " (" . wfMsgForContent(
9797 'protect-expiring',
@@ -112,13 +112,15 @@
113113 class StablePagesPager extends AlphabeticPager {
114114 public $mForm, $mConds, $namespace, $override;
115115
116 - @param int $namespace (null for "all")
117 - @param string $autoreview ('' for "all", 'none' for no restriction)
 116+ /**
 117+ * @param int $namespace (null for "all")
 118+ * @param string $autoreview ('' for "all", 'none' for no restriction)
 119+ */
118120 function __construct( $form, $conds = array(), $namespace, $autoreview, $indef ) {
119121 $this->mForm = $form;
120122 $this->mConds = $conds;
121123 $this->indef = $indef;
122 - Must be content pages...
 124+ // Must be content pages...
123125 $validNS = FlaggedRevs::getReviewNamespaces();
124126 if ( is_integer( $namespace ) ) {
125127 if ( !in_array( $namespace, $validNS ) ) {
@@ -149,7 +151,7 @@
150152 $conds['fpc_level'] = $this->autoreview;
151153 }
152154 $conds['page_namespace'] = $this->namespace;
153 - Be sure not to include expired items
 155+ // Be sure not to include expired items
154156 if( $this->indef ) {
155157 $conds['fpc_expiry'] = Block::infinity();
156158 } else {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r103142* Removed skin member from special pages and use Linker class...aaron10:46, 15 November 2011

Status & tagging log