r95402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95401‎ | r95402 | r95403 >
Date:15:31, 24 August 2011
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Followup r95396

Lowercase names passed as the name to the SpecialPage constructor
Modified paths:
  • /trunk/phase3/includes/specials/SpecialGlobalFileUsage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialGlobalTemplateUsage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialGlobalTemplateUsage.php
@@ -4,14 +4,14 @@
55 * to show the usage of a template instead of a file.
66 * Special page to show global template usage. Also contains hook functions for
77 * showing usage on an template page.
8 - *
 8+ *
99 * @author Bryan Tong Minh <bryan.tongminh@gmail.com>
1010 * @author Peter Potrowl <peter017@gmail.com>
1111 */
1212
1313 class SpecialGlobalTemplateUsage extends SpecialPage {
1414 public function __construct() {
15 - parent::__construct( 'GlobalTemplateUsage' );
 15+ parent::__construct( 'Globaltemplateusage' );
1616 }
1717
1818 /**
@@ -36,7 +36,7 @@
3737
3838 $this->showResult();
3939 }
40 -
 40+
4141 /**
4242 * Shows the search form
4343 */
@@ -57,7 +57,7 @@
5858 'type' => 'submit',
5959 'value' => wfMsg( 'globaltemplateusage-ok' )
6060 ) );
61 -
 61+
6262 // Wrap the entire form in a nice fieldset
6363 $html .= Xml::fieldSet( wfMsg( 'globaltemplateusage-text' ), $formContent ) . "\n</form>";
6464
@@ -76,7 +76,7 @@
7777 if ( $wgRequest->getText( 'from' ) ) {
7878 $query->setOffset( $wgRequest->getText( 'from' ) );
7979 } elseif ( $wgRequest->getText( 'to' ) ) {
80 - $query->setOffset( $wgRequest->getText( 'to' ), true );
 80+ $query->setOffset( $wgRequest->getText( 'to' ), true );
8181 }
8282 $query->setLimit( $wgRequest->getInt( 'limit', 50 ) );
8383
@@ -116,7 +116,7 @@
117117 // Bottom navbar
118118 $wgOut->addHtml( $navbar );
119119 }
120 -
 120+
121121 /**
122122 * Helper to format a specific item
123123 */
@@ -135,7 +135,7 @@
136136
137137 /**
138138 * Helper function to create the navbar, stolen from wfViewPrevNext
139 - *
 139+ *
140140 * @param $query GlobalTemplateUsageQuery An executed GlobalTemplateUsageQuery object
141141 * @return string Navbar HTML
142142 */
@@ -147,7 +147,7 @@
148148 $target = $this->target->getPrefixedText();
149149 $limit = $query->getLimit();
150150 $fmtLimit = $wgLang->formatNum( $limit );
151 -
 151+
152152 # Find out which strings are for the prev and which for the next links
153153 $offset = $query->getOffsetString();
154154 $continue = $query->getContinueTemplateString();
@@ -191,7 +191,7 @@
192192 $numLinks = array();
193193 foreach ( array( 20, 50, 100, 250, 500 ) as $num ) {
194194 $fmtLimit = $wgLang->formatNum( $num );
195 -
 195+
196196 $q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target );
197197 $lTitle = wfMsgExt( 'shown-title', array( 'parsemag', 'escape' ), $num );
198198 $attr = array( 'title' => $lTitle, 'class' => 'mw-numlink' );
Index: trunk/phase3/includes/specials/SpecialGlobalFileUsage.php
@@ -6,7 +6,7 @@
77
88 class SpecialGlobalFileUsage extends SpecialPage {
99 public function __construct() {
10 - parent::__construct( 'GlobalFileUsage' );
 10+ parent::__construct( 'Globalfileusage' );
1111 }
1212
1313 /**
@@ -33,7 +33,7 @@
3434
3535 $this->showResult();
3636 }
37 -
 37+
3838 /**
3939 * Shows the search form
4040 */
@@ -57,7 +57,7 @@
5858 // Filter local checkbox
5959 . "\n\t<p>" . Xml::checkLabel( wfMsg( 'globalfileusage-filterlocal' ),
6060 'filterlocal', 'mw-filterlocal', $this->filterLocal ) . '</p>';
61 -
 61+
6262 if ( !is_null( $this->target ) && wfFindFile( $this->target ) ) {
6363 // Show the image if it exists
6464 global $wgUser, $wgContLang;
@@ -69,7 +69,7 @@
7070 /* $handlerParams */ array(), /* $framed */ false,
7171 /* $thumb */ true );
7272 }
73 -
 73+
7474 // Wrap the entire form in a nice fieldset
7575 $html .= Xml::fieldSet( wfMsg( 'globalfileusage-text' ), $formContent ) . "\n</form>";
7676
@@ -147,7 +147,7 @@
148148
149149 /**
150150 * Helper function to create the navbar, stolen from wfViewPrevNext
151 - *
 151+ *
152152 * @param $query GlobalUsageQuery An executed GlobalUsageQuery object
153153 * @return string Navbar HTML
154154 */
@@ -159,7 +159,7 @@
160160 $target = $this->target->getText();
161161 $limit = $query->getLimit();
162162 $fmtLimit = $wgLang->formatNum( $limit );
163 -
 163+
164164 # Find out which strings are for the prev and which for the next links
165165 $offset = $query->getOffsetString();
166166 $continue = $query->getContinueFileString();
@@ -207,7 +207,7 @@
208208 $numLinks = array();
209209 foreach ( array( 20, 50, 100, 250, 500 ) as $num ) {
210210 $fmtLimit = $wgLang->formatNum( $num );
211 -
 211+
212212 $q = array( 'offset' => $offset, 'limit' => $num, 'target' => $target );
213213 if ( $this->filterLocal )
214214 $q['filterlocal'] = '1';

Follow-up revisions

RevisionCommit summaryAuthorDate
r96325Cleanup to r95402, r95474: "Not using CamelCase is so 2001."demon12:39, 6 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95396Merge the iwtransclusion branch back into trunk...reedy13:03, 24 August 2011

Comments

#Comment by Jack Phoenix (talk | contribs)   16:18, 24 August 2011

Not using CamelCase is so 2001. Why not to fix MessagesEn.php instead to use CamelCase?

Status & tagging log