r61444 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61443‎ | r61444 | r61445 >
Date:22:52, 23 January 2010
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Normalise comment usage (# --> //)
Modified paths:
  • /trunk/phase3/includes/api/ApiBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiDelete.php (modified) (history)
  • /trunk/phase3/includes/api/ApiEditPage.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatDbg.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatTxt.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatYaml_spyc.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMove.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPageSet.php (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuery.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryBlocks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategories.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryExternalLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImageInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryImages.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryInfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLangLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLinks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRandom.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRevisions.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQuerySiteinfo.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiRollback.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQuery.php
@@ -264,9 +264,9 @@
265265 $pageSet = $this->getPageSet();
266266 $result = $this->getResult();
267267
268 - # We don't check for a full result set here because we can't be adding
269 - # more than 380K. The maximum revision size is in the megabyte range,
270 - # and the maximum result size must be even higher than that.
 268+ // We don't check for a full result set here because we can't be adding
 269+ // more than 380K. The maximum revision size is in the megabyte range,
 270+ // and the maximum result size must be even higher than that.
271271
272272 // Title normalizations
273273 $normValues = array ();
Index: trunk/phase3/includes/api/ApiFormatDbg.php
@@ -38,9 +38,9 @@
3939 }
4040
4141 public function getMimeType() {
42 - # This looks like it should be text/plain, but IE7 is so
43 - # brain-damaged it tries to parse text/plain as HTML if it
44 - # contains HTML tags. Using MIME text/text works around this bug
 42+ // This looks like it should be text/plain, but IE7 is so
 43+ // brain-damaged it tries to parse text/plain as HTML if it
 44+ // contains HTML tags. Using MIME text/text works around this bug
4545 return 'text/text';
4646 }
4747
Index: trunk/phase3/includes/api/ApiMove.php
@@ -84,7 +84,7 @@
8585 }
8686 }
8787
88 - # Move the page
 88+ // Move the page
8989 $hookErr = null;
9090 $retval = $fromTitle->moveTo( $toTitle, true, $params['reason'], !$params['noredirect'] );
9191 if ( $retval !== true )
@@ -94,7 +94,7 @@
9595 if ( !$params['noredirect'] || !$wgUser->isAllowed( 'suppressredirect' ) )
9696 $r['redirectcreated'] = '';
9797
98 - # Move the talk page
 98+ // Move the talk page
9999 if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() )
100100 {
101101 $retval = $fromTalk->moveTo( $toTalk, true, $params['reason'], !$params['noredirect'] );
@@ -112,7 +112,7 @@
113113 }
114114 }
115115
116 - # Move subpages
 116+ // Move subpages
117117 if ( $params['movesubpages'] )
118118 {
119119 $r['subpages'] = $this->moveSubpages( $fromTitle, $toTitle,
@@ -126,7 +126,7 @@
127127 }
128128 }
129129
130 - # Watch pages
 130+ // Watch pages
131131 if ( $params['watch'] || $wgUser->getOption( 'watchmoves' ) )
132132 {
133133 $wgUser->addWatch( $fromTitle );
Index: trunk/phase3/includes/api/ApiQueryLinks.php
@@ -100,11 +100,11 @@
101101 "{$this->prefix}_title >= '$pltitle')))" );
102102 }
103103
104 - # Here's some MySQL craziness going on: if you use WHERE foo='bar'
105 - # and later ORDER BY foo MySQL doesn't notice the ORDER BY is pointless
106 - # but instead goes and filesorts, because the index for foo was used
107 - # already. To work around this, we drop constant fields in the WHERE
108 - # clause from the ORDER BY clause
 104+ // Here's some MySQL craziness going on: if you use WHERE foo='bar'
 105+ // and later ORDER BY foo MySQL doesn't notice the ORDER BY is pointless
 106+ // but instead goes and filesorts, because the index for foo was used
 107+ // already. To work around this, we drop constant fields in the WHERE
 108+ // clause from the ORDER BY clause
109109 $order = array();
110110 if ( count( $this->getPageSet()->getGoodTitles() ) != 1 )
111111 $order[] = "{$this->prefix}_from";
Index: trunk/phase3/includes/api/ApiFormatYaml_spyc.php
@@ -151,9 +151,9 @@
152152 * @return bool
153153 */
154154 function _needLiteral( $value ) {
155 - # Check whether the string contains # or : or begins with any of:
156 - # [ - ? , [ ] { } ! * & | > ' " % @ ` ]
157 - # or is a number or contains newlines
 155+ // Check whether the string contains # or : or begins with any of:
 156+ // [ - ? , [ ] { } ! * & | > ' " % @ ` ]
 157+ // or is a number or contains newlines
158158 return (bool)( gettype( $value ) == "string" &&
159159 ( is_numeric( $value ) ||
160160 strpos( $value, "\n" ) ||
Index: trunk/phase3/includes/api/ApiPageSet.php
@@ -600,14 +600,14 @@
601601 $db->freeResult( $res );
602602 if ( $this->mPendingRedirectIDs )
603603 {
604 - # We found pages that aren't in the redirect table
605 - # Add them
 604+ // We found pages that aren't in the redirect table
 605+ // Add them
606606 foreach ( $this->mPendingRedirectIDs as $id => $title )
607607 {
608608 $article = new Article( $title );
609609 $rt = $article->insertRedirect();
610610 if ( !$rt )
611 - # What the hell. Let's just ignore this
 611+ // What the hell. Let's just ignore this
612612 continue;
613613 $lb->addObj( $rt );
614614 $this->mRedirectTitles[$title->getPrefixedText()] = $rt->getPrefixedText();
@@ -635,7 +635,7 @@
636636 $titleObj = is_string( $title ) ? Title :: newFromText( $title ) : $title;
637637 if ( !$titleObj )
638638 {
639 - # Handle invalid titles gracefully
 639+ // Handle invalid titles gracefully
640640 $this->mAllpages[0][$title] = $this->mFakePageId;
641641 $this->mInvalidTitles[$this->mFakePageId] = $title;
642642 $this->mFakePageId--;
Index: trunk/phase3/includes/api/ApiRollback.php
@@ -53,7 +53,7 @@
5454 if ( !$titleObj->exists() )
5555 $this->dieUsageMsg( array( 'notanarticle' ) );
5656
57 - # We need to be able to revert IPs, but getCanonicalName rejects them
 57+ // We need to be able to revert IPs, but getCanonicalName rejects them
5858 $username = User::isIP( $params['user'] )
5959 ? $params['user']
6060 : User::getCanonicalName( $params['user'] );
Index: trunk/phase3/includes/api/ApiDelete.php
@@ -126,8 +126,8 @@
127127 // Auto-generate a summary, if necessary
128128 if ( is_null( $reason ) )
129129 {
130 - # Need to pass a throwaway variable because generateReason expects
131 - # a reference
 130+ // Need to pass a throwaway variable because generateReason expects
 131+ // a reference
132132 $hasHistory = false;
133133 $reason = $article->generateReason( $hasHistory );
134134 if ( $reason === false )
@@ -162,7 +162,7 @@
163163
164164 if ( !FileDeleteForm::haveDeletableFile( $file, $oldfile, $oldimage ) )
165165 return self::delete( new Article( $title ), $token, $reason );
166 - if ( is_null( $reason ) ) # Log and RC don't like null reasons
 166+ if ( is_null( $reason ) ) // Log and RC don't like null reasons
167167 $reason = '';
168168 $status = FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress );
169169
Index: trunk/phase3/includes/api/ApiQueryCategories.php
@@ -114,7 +114,7 @@
115115 }
116116
117117 $this->addOption( 'USE INDEX', array( 'categorylinks' => 'cl_from' ) );
118 - # Don't order by cl_from if it's constant in the WHERE clause
 118+ // Don't order by cl_from if it's constant in the WHERE clause
119119 if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
120120 $this->addOption( 'ORDER BY', 'cl_to' );
121121 else
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -83,8 +83,8 @@
8484 $this->addWhere( 'cl_from=page_id' );
8585 $this->setContinuation( $params['continue'], $params['dir'] );
8686 $this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() );
87 - # Scanning large datasets for rare categories sucks, and I already told
88 - # how to have efficient subcategory access :-) ~~~~ (oh well, domas)
 87+ // Scanning large datasets for rare categories sucks, and I already told
 88+ // how to have efficient subcategory access :-) ~~~~ (oh well, domas)
8989 global $wgMiserMode;
9090 $miser_ns = array();
9191 if ( $wgMiserMode ) {
Index: trunk/phase3/includes/api/ApiQueryInfo.php
@@ -354,7 +354,7 @@
355355 $a['cascade'] = '';
356356 $this->protections[$row->page_namespace][$row->page_title][] = $a;
357357
358 - # Also check old restrictions
 358+ // Also check old restrictions
359359 if ( $this->pageRestrictions[$row->pr_page] ) {
360360 $restrictions = explode( ':', trim( $this->pageRestrictions[$row->pr_page] ) );
361361 foreach ( $restrictions as $restrict ) {
Index: trunk/phase3/includes/api/ApiEditPage.php
@@ -138,7 +138,7 @@
139139 $params['summary'] = wfMsgForContent( 'undo-summary', $params['undo'], $undoRev->getUserText() );
140140 }
141141
142 - # See if the MD5 hash checks out
 142+ // See if the MD5 hash checks out
143143 if ( !is_null( $params['md5'] ) && md5( $toMD5 ) !== $params['md5'] )
144144 $this->dieUsageMsg( array( 'hashcheckfailed' ) );
145145
@@ -153,8 +153,8 @@
154154 if ( !is_null( $params['summary'] ) )
155155 $reqArr['wpSummary'] = $params['summary'];
156156
157 - # Watch out for basetimestamp == ''
158 - # wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
 157+ // Watch out for basetimestamp == ''
 158+ // wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
159159 if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' )
160160 $reqArr['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] );
161161 else
@@ -163,7 +163,7 @@
164164 if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' )
165165 $reqArr['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] );
166166 else
167 - $reqArr['wpStarttime'] = $reqArr['wpEdittime']; # Fake wpStartime
 167+ $reqArr['wpStarttime'] = $reqArr['wpEdittime']; // Fake wpStartime
168168
169169 if ( $params['minor'] || ( !$params['notminor'] && $wgUser->getOption( 'minordefault' ) ) )
170170 $reqArr['wpMinoredit'] = '';
@@ -212,8 +212,8 @@
213213 $req = new FauxRequest( $reqArr, true );
214214 $ep->importFormData( $req );
215215
216 - # Run hooks
217 - # Handle CAPTCHA parameters
 216+ // Run hooks
 217+ // Handle CAPTCHA parameters
218218 global $wgRequest;
219219 if ( !is_null( $params['captchaid'] ) )
220220 $wgRequest->setVal( 'wpCaptchaId', $params['captchaid'] );
@@ -233,11 +233,11 @@
234234 $this->dieUsageMsg( array( 'hookaborted' ) );
235235 }
236236
237 - # Do the actual save
 237+ // Do the actual save
238238 $oldRevId = $articleObj->getRevIdFetched();
239239 $result = null;
240 - # Fake $wgRequest for some hooks inside EditPage
241 - # FIXME: This interface SUCKS
 240+ // Fake $wgRequest for some hooks inside EditPage
 241+ // FIXME: This interface SUCKS
242242 $oldRequest = $wgRequest;
243243 $wgRequest = $req;
244244
@@ -293,7 +293,7 @@
294294 case EditPage::AS_CONFLICT_DETECTED:
295295 $this->dieUsageMsg( array( 'editconflict' ) );
296296
297 - # case EditPage::AS_SUMMARY_NEEDED: Can't happen since we set wpIgnoreBlankSummary
 297+ // case EditPage::AS_SUMMARY_NEEDED: Can't happen since we set wpIgnoreBlankSummary
298298 case EditPage::AS_TEXTBOX_EMPTY:
299299 $this->dieUsageMsg( array( 'emptynewsection' ) );
300300
@@ -303,10 +303,10 @@
304304 $r['result'] = "Success";
305305 $r['pageid'] = intval( $titleObj->getArticleID() );
306306 $r['title'] = $titleObj->getPrefixedText();
307 - # HACK: We create a new Article object here because getRevIdFetched()
308 - # refuses to be run twice, and because Title::getLatestRevId()
309 - # won't fetch from the master unless we select for update, which we
310 - # don't want to do.
 307+ // HACK: We create a new Article object here because getRevIdFetched()
 308+ // refuses to be run twice, and because Title::getLatestRevId()
 309+ // won't fetch from the master unless we select for update, which we
 310+ // don't want to do.
311311 $newArticle = new Article( $titleObj );
312312 $newRevId = $newArticle->getRevIdFetched();
313313 if ( $newRevId == $oldRevId )
@@ -321,13 +321,13 @@
322322 break;
323323
324324 case EditPage::AS_END:
325 - # This usually means some kind of race condition
326 - # or DB weirdness occurred. Fall through to throw an unknown
327 - # error.
 325+ // This usually means some kind of race condition
 326+ // or DB weirdness occurred. Fall through to throw an unknown
 327+ // error.
328328
329 - # This needs fixing higher up, as Article::doEdit should be
330 - # used rather than Article::updateArticle, so that specific
331 - # error conditions can be returned
 329+ // This needs fixing higher up, as Article::doEdit should be
 330+ // used rather than Article::updateArticle, so that specific
 331+ // error conditions can be returned
332332 default:
333333 $this->dieUsageMsg( array( 'unknownerror', $retval ) );
334334 }
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -243,7 +243,7 @@
244244 $text = preg_replace( '/\&lt;(!--.*?--|.*?)\&gt;/', '<span style="color:blue;">&lt;\1&gt;</span>', $text );
245245 // identify URLs
246246 $protos = implode( "|", $wgUrlProtocols );
247 - # This regex hacks around bug 13218 (&quot; included in the URL)
 247+ // This regex hacks around bug 13218 (&quot; included in the URL)
248248 $text = preg_replace( "#(($protos).*?)(&quot;)?([ \\'\"<>\n]|&lt;|&gt;|&quot;)#", '<a href="\\1">\\1</a>\\3\\4', $text );
249249 // identify requests to api.php
250250 $text = preg_replace( "#api\\.php\\?[^ \\()<\n\t]+#", '<a href="\\0">\\0</a>', $text );
Index: trunk/phase3/includes/api/ApiQueryImages.php
@@ -72,7 +72,7 @@
7373 "il_to >= '$ilto')" );
7474 }
7575
76 - # Don't order by il_from if it's constant in the WHERE clause
 76+ // Don't order by il_from if it's constant in the WHERE clause
7777 if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
7878 $this->addOption( 'ORDER BY', 'il_to' );
7979 else
Index: trunk/phase3/includes/api/ApiQueryRandom.php
@@ -77,9 +77,9 @@
7878 array( 'query', $this->getModuleName() ),
7979 null, $this->extractRowInfo( $row ) );
8080 if ( !$fit )
81 - # We can't really query-continue a random list.
82 - # Return an insanely high value so
83 - # $count < $limit is false
 81+ // We can't really query-continue a random list.
 82+ // Return an insanely high value so
 83+ // $count < $limit is false
8484 return 1E9;
8585 $this->pageIDs[] = $row->page_id;
8686 }
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php
@@ -91,8 +91,8 @@
9292 }
9393 if ( !$fit )
9494 {
95 - # Abuse siprop as a query-continue parameter
96 - # and set it to all unprocessed props
 95+ // Abuse siprop as a query-continue parameter
 96+ // and set it to all unprocessed props
9797 $this->setContinueEnumParameter( 'prop', implode( '|',
9898 array_diff( $params['prop'], $done ) ) );
9999 break;
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php
@@ -64,7 +64,7 @@
6565 "ll_lang >= '$lllang')" );
6666 }
6767
68 - # Don't order by ll_from if it's constant in the WHERE clause
 68+ // Don't order by ll_from if it's constant in the WHERE clause
6969 if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
7070 $this->addOption( 'ORDER BY', 'll_lang' );
7171 else
Index: trunk/phase3/includes/api/ApiParse.php
@@ -60,7 +60,7 @@
6161 {
6262 if ( !is_null( $oldid ) )
6363 {
64 - # Don't use the parser cache
 64+ // Don't use the parser cache
6565 $rev = Revision::newFromID( $oldid );
6666 if ( !$rev )
6767 $this->dieUsage( "There is no revision ID $oldid", 'missingrev' );
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php
@@ -95,11 +95,11 @@
9696 if ( !$fit )
9797 {
9898 if ( count( $pageIds[NS_IMAGE] ) == 1 )
99 - # The user is screwed. imageinfo can't be solely
100 - # responsible for exceeding the limit in this case,
101 - # so set a query-continue that just returns the same
102 - # thing again. When the violating queries have been
103 - # out-continued, the result will get through
 99+ // The user is screwed. imageinfo can't be solely
 100+ // responsible for exceeding the limit in this case,
 101+ // so set a query-continue that just returns the same
 102+ // thing again. When the violating queries have been
 103+ // out-continued, the result will get through
104104 $this->setContinueEnumParameter( 'start',
105105 wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
106106 else
@@ -119,7 +119,7 @@
120120 if ( !$fit )
121121 {
122122 if ( count( $pageIds[NS_IMAGE] ) == 1 )
123 - # See the 'the user is screwed' comment above
 123+ // See the 'the user is screwed' comment above
124124 $this->setContinueEnumParameter( 'start',
125125 wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
126126 else
Index: trunk/phase3/includes/api/ApiMain.php
@@ -284,7 +284,7 @@
285285
286286 if ( $this->mSquidMaxage == - 1 )
287287 {
288 - # Nobody called setCacheMaxAge(), use the (s)maxage parameters
 288+ // Nobody called setCacheMaxAge(), use the (s)maxage parameters
289289 $smaxage = $this->getParameter( 'smaxage' );
290290 $maxage = $this->getParameter( 'maxage' );
291291 }
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -183,7 +183,7 @@
184184 $this->addWhere( 'rc_user_text != ' . $this->getDB()->addQuotes( $params['excludeuser'] ) );
185185
186186
187 - # This is an index optimization for mysql, as done in the Special:Watchlist page
 187+ // This is an index optimization for mysql, as done in the Special:Watchlist page
188188 $this->addWhereIf( "rc_timestamp > ''", !isset ( $params['start'] ) && !isset ( $params['end'] ) && $wgDBtype == 'mysql' );
189189
190190 $this->addOption( 'LIMIT', $params['limit'] + 1 );
Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -365,7 +365,7 @@
366366 * @return string Page title with underscores
367367 */
368368 public function titleToKey( $title ) {
369 - # Don't throw an error if we got an empty string
 369+ // Don't throw an error if we got an empty string
370370 if ( trim( $title ) == '' )
371371 return '';
372372 $t = Title::newFromText( $title );
@@ -380,11 +380,11 @@
381381 * @return string Page title with spaces
382382 */
383383 public function keyToTitle( $key ) {
384 - # Don't throw an error if we got an empty string
 384+ // Don't throw an error if we got an empty string
385385 if ( trim( $key ) == '' )
386386 return '';
387387 $t = Title::newFromDbKey( $key );
388 - # This really shouldn't happen but we gotta check anyway
 388+ // This really shouldn't happen but we gotta check anyway
389389 if ( !$t )
390390 $this->dieUsageMsg( array( 'invalidtitle', $key ) );
391391 return $t->getPrefixedText();
Index: trunk/phase3/includes/api/ApiQueryBlocks.php
@@ -100,7 +100,7 @@
101101 list( $ip, $range ) = IP::parseCIDR( $params['ip'] );
102102 if ( $ip && $range )
103103 {
104 - # We got a CIDR range
 104+ // We got a CIDR range
105105 if ( $range < 16 )
106106 $this->dieUsage( 'CIDR ranges broader than /16 are not accepted', 'cidrtoobroad' );
107107 $lower = wfBaseConvert( $ip, 10, 16, 8, false );
Index: trunk/phase3/includes/api/ApiQueryRevisions.php
@@ -396,9 +396,9 @@
397397 if ( $this->fld_content || !is_null( $this->difftotext ) ) {
398398 global $wgParser;
399399 $text = $revision->getText();
400 - # Expand templates after getting section content because
401 - # template-added sections don't count and Parser::preprocess()
402 - # will have less input
 400+ // Expand templates after getting section content because
 401+ // template-added sections don't count and Parser::preprocess()
 402+ // will have less input
403403 if ( $this->section !== false ) {
404404 $text = $wgParser->getSection( $text, $this->section, false );
405405 if ( $text === false )
@@ -541,7 +541,7 @@
542542 ' 1) Get data about a set of pages (last revision), by setting titles or pageids parameter.',
543543 ' 2) Get revisions for one given page, by using titles/pageids with start/end/limit params.',
544544 ' 3) Get data about a set of revisions by setting their IDs with revids parameter.',
545 - 'All parameters marked as (enum) may only be used with a single page (#2).'
 545+ 'All parameters marked as (enum) may only be used with a single page (//2).'
546546 );
547547 }
548548
Index: trunk/phase3/includes/api/ApiQueryExternalLinks.php
@@ -52,7 +52,7 @@
5353 $this->addTables( 'externallinks' );
5454 $this->addWhereFld( 'el_from', array_keys( $this->getPageSet()->getGoodTitles() ) );
5555
56 - # Don't order by el_from if it's constant in the WHERE clause
 56+ // Don't order by el_from if it's constant in the WHERE clause
5757 if ( count( $this->getPageSet()->getGoodTitles() ) != 1 )
5858 $this->addOption( 'ORDER BY', 'el_from' );
5959
Index: trunk/phase3/includes/api/ApiBase.php
@@ -175,12 +175,12 @@
176176 $data = $this->getResult()->getData();
177177 if ( isset( $data['warnings'][$this->getModuleName()] ) )
178178 {
179 - # Don't add duplicate warnings
 179+ // Don't add duplicate warnings
180180 $warn_regex = preg_quote( $warning, '/' );
181181 if ( preg_match( "/{$warn_regex}(\\n|$)/", $data['warnings'][$this->getModuleName()]['*'] ) )
182182 return;
183183 $oldwarning = $data['warnings'][$this->getModuleName()]['*'];
184 - # If there is a warning already, append it to the existing one
 184+ // If there is a warning already, append it to the existing one
185185 $warning = "$oldwarning\n$warning";
186186 $this->getResult()->unsetValue( 'warnings', $this->getModuleName() );
187187 }
@@ -668,7 +668,7 @@
669669 }
670670
671671 if ( is_array( $allowedValues ) ) {
672 - # Check for unknown values
 672+ // Check for unknown values
673673 $unknown = array_diff( $valuesList, $allowedValues );
674674 if ( count( $unknown ) )
675675 {
@@ -681,7 +681,7 @@
682682 else
683683 $this->dieUsage( "Unrecognized value for parameter '$valueName': {$valuesList[0]}", "unknown_$valueName" );
684684 }
685 - # Now throw them out
 685+ // Now throw them out
686686 $valuesList = array_intersect( $valuesList, $allowedValues );
687687 }
688688
Index: trunk/phase3/includes/api/ApiFormatTxt.php
@@ -38,9 +38,9 @@
3939 }
4040
4141 public function getMimeType() {
42 - # This looks like it should be text/plain, but IE7 is so
43 - # brain-damaged it tries to parse text/plain as HTML if it
44 - # contains HTML tags. Using MIME text/text works around this bug
 42+ // This looks like it should be text/plain, but IE7 is so
 43+ // brain-damaged it tries to parse text/plain as HTML if it
 44+ // contains HTML tags. Using MIME text/text works around this bug
4545 return 'text/text';
4646 }
4747

Follow-up revisions

RevisionCommit summaryAuthorDate
r61651Fix careless errors in r61442 and r61444.tstarling00:51, 29 January 2010

Comments

#Comment by Tim Starling (talk | contribs)   00:45, 29 January 2010
-			'All parameters marked as (enum) may only be used with a single page (#2).'
+			'All parameters marked as (enum) may only be used with a single page (//2).'

I don't think this kind of carelessness is acceptable.

Status & tagging log