aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api
diff options
context:
space:
mode:
authorSam Reed <reedy@users.mediawiki.org>2010-01-23 22:52:40 +0000
committerSam Reed <reedy@users.mediawiki.org>2010-01-23 22:52:40 +0000
commitb15f2c8c46c6bbc83ac0bbb4e8e4a87f330bf56a (patch)
tree4dfe053752d23f7d09c8fb58cae2eaac3dfb19c2 /includes/api
parentb739e97341be4b70b53aa732c336ae383ad46c78 (diff)
downloadmediawikicore-b15f2c8c46c6bbc83ac0bbb4e8e4a87f330bf56a.tar.gz
mediawikicore-b15f2c8c46c6bbc83ac0bbb4e8e4a87f330bf56a.zip
Normalise comment usage (# --> //)
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/61444
Diffstat (limited to 'includes/api')
-rw-r--r--includes/api/ApiBase.php8
-rw-r--r--includes/api/ApiDelete.php6
-rw-r--r--includes/api/ApiEditPage.php40
-rw-r--r--includes/api/ApiFormatBase.php2
-rw-r--r--includes/api/ApiFormatDbg.php6
-rw-r--r--includes/api/ApiFormatTxt.php6
-rw-r--r--includes/api/ApiFormatYaml_spyc.php6
-rw-r--r--includes/api/ApiMain.php2
-rw-r--r--includes/api/ApiMove.php8
-rw-r--r--includes/api/ApiPageSet.php8
-rw-r--r--includes/api/ApiParse.php2
-rw-r--r--includes/api/ApiQuery.php6
-rw-r--r--includes/api/ApiQueryBase.php6
-rw-r--r--includes/api/ApiQueryBlocks.php2
-rw-r--r--includes/api/ApiQueryCategories.php2
-rw-r--r--includes/api/ApiQueryCategoryMembers.php4
-rw-r--r--includes/api/ApiQueryExternalLinks.php2
-rw-r--r--includes/api/ApiQueryImageInfo.php12
-rw-r--r--includes/api/ApiQueryImages.php2
-rw-r--r--includes/api/ApiQueryInfo.php2
-rw-r--r--includes/api/ApiQueryLangLinks.php2
-rw-r--r--includes/api/ApiQueryLinks.php10
-rw-r--r--includes/api/ApiQueryRandom.php6
-rw-r--r--includes/api/ApiQueryRevisions.php8
-rw-r--r--includes/api/ApiQuerySiteinfo.php4
-rw-r--r--includes/api/ApiQueryWatchlist.php2
-rw-r--r--includes/api/ApiRollback.php2
27 files changed, 83 insertions, 83 deletions
diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 2ad41065aec2..1455d1b3c8b2 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -175,12 +175,12 @@ abstract class ApiBase {
$data = $this->getResult()->getData();
if ( isset( $data['warnings'][$this->getModuleName()] ) )
{
- # Don't add duplicate warnings
+ // Don't add duplicate warnings
$warn_regex = preg_quote( $warning, '/' );
if ( preg_match( "/{$warn_regex}(\\n|$)/", $data['warnings'][$this->getModuleName()]['*'] ) )
return;
$oldwarning = $data['warnings'][$this->getModuleName()]['*'];
- # If there is a warning already, append it to the existing one
+ // If there is a warning already, append it to the existing one
$warning = "$oldwarning\n$warning";
$this->getResult()->unsetValue( 'warnings', $this->getModuleName() );
}
@@ -668,7 +668,7 @@ abstract class ApiBase {
}
if ( is_array( $allowedValues ) ) {
- # Check for unknown values
+ // Check for unknown values
$unknown = array_diff( $valuesList, $allowedValues );
if ( count( $unknown ) )
{
@@ -681,7 +681,7 @@ abstract class ApiBase {
else
$this->dieUsage( "Unrecognized value for parameter '$valueName': {$valuesList[0]}", "unknown_$valueName" );
}
- # Now throw them out
+ // Now throw them out
$valuesList = array_intersect( $valuesList, $allowedValues );
}
diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php
index 35365fafd2ce..a539928155ee 100644
--- a/includes/api/ApiDelete.php
+++ b/includes/api/ApiDelete.php
@@ -126,8 +126,8 @@ class ApiDelete extends ApiBase {
// Auto-generate a summary, if necessary
if ( is_null( $reason ) )
{
- # Need to pass a throwaway variable because generateReason expects
- # a reference
+ // Need to pass a throwaway variable because generateReason expects
+ // a reference
$hasHistory = false;
$reason = $article->generateReason( $hasHistory );
if ( $reason === false )
@@ -162,7 +162,7 @@ class ApiDelete extends ApiBase {
if ( !FileDeleteForm::haveDeletableFile( $file, $oldfile, $oldimage ) )
return self::delete( new Article( $title ), $token, $reason );
- if ( is_null( $reason ) ) # Log and RC don't like null reasons
+ if ( is_null( $reason ) ) // Log and RC don't like null reasons
$reason = '';
$status = FileDeleteForm::doDelete( $title, $file, $oldimage, $reason, $suppress );
diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index 27d07c22144d..a0978d751a97 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -138,7 +138,7 @@ class ApiEditPage extends ApiBase {
$params['summary'] = wfMsgForContent( 'undo-summary', $params['undo'], $undoRev->getUserText() );
}
- # See if the MD5 hash checks out
+ // See if the MD5 hash checks out
if ( !is_null( $params['md5'] ) && md5( $toMD5 ) !== $params['md5'] )
$this->dieUsageMsg( array( 'hashcheckfailed' ) );
@@ -153,8 +153,8 @@ class ApiEditPage extends ApiBase {
if ( !is_null( $params['summary'] ) )
$reqArr['wpSummary'] = $params['summary'];
- # Watch out for basetimestamp == ''
- # wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
+ // Watch out for basetimestamp == ''
+ // wfTimestamp() treats it as NOW, almost certainly causing an edit conflict
if ( !is_null( $params['basetimestamp'] ) && $params['basetimestamp'] != '' )
$reqArr['wpEdittime'] = wfTimestamp( TS_MW, $params['basetimestamp'] );
else
@@ -163,7 +163,7 @@ class ApiEditPage extends ApiBase {
if ( !is_null( $params['starttimestamp'] ) && $params['starttimestamp'] != '' )
$reqArr['wpStarttime'] = wfTimestamp( TS_MW, $params['starttimestamp'] );
else
- $reqArr['wpStarttime'] = $reqArr['wpEdittime']; # Fake wpStartime
+ $reqArr['wpStarttime'] = $reqArr['wpEdittime']; // Fake wpStartime
if ( $params['minor'] || ( !$params['notminor'] && $wgUser->getOption( 'minordefault' ) ) )
$reqArr['wpMinoredit'] = '';
@@ -212,8 +212,8 @@ class ApiEditPage extends ApiBase {
$req = new FauxRequest( $reqArr, true );
$ep->importFormData( $req );
- # Run hooks
- # Handle CAPTCHA parameters
+ // Run hooks
+ // Handle CAPTCHA parameters
global $wgRequest;
if ( !is_null( $params['captchaid'] ) )
$wgRequest->setVal( 'wpCaptchaId', $params['captchaid'] );
@@ -233,11 +233,11 @@ class ApiEditPage extends ApiBase {
$this->dieUsageMsg( array( 'hookaborted' ) );
}
- # Do the actual save
+ // Do the actual save
$oldRevId = $articleObj->getRevIdFetched();
$result = null;
- # Fake $wgRequest for some hooks inside EditPage
- # FIXME: This interface SUCKS
+ // Fake $wgRequest for some hooks inside EditPage
+ // FIXME: This interface SUCKS
$oldRequest = $wgRequest;
$wgRequest = $req;
@@ -293,7 +293,7 @@ class ApiEditPage extends ApiBase {
case EditPage::AS_CONFLICT_DETECTED:
$this->dieUsageMsg( array( 'editconflict' ) );
- # case EditPage::AS_SUMMARY_NEEDED: Can't happen since we set wpIgnoreBlankSummary
+ // case EditPage::AS_SUMMARY_NEEDED: Can't happen since we set wpIgnoreBlankSummary
case EditPage::AS_TEXTBOX_EMPTY:
$this->dieUsageMsg( array( 'emptynewsection' ) );
@@ -303,10 +303,10 @@ class ApiEditPage extends ApiBase {
$r['result'] = "Success";
$r['pageid'] = intval( $titleObj->getArticleID() );
$r['title'] = $titleObj->getPrefixedText();
- # HACK: We create a new Article object here because getRevIdFetched()
- # refuses to be run twice, and because Title::getLatestRevId()
- # won't fetch from the master unless we select for update, which we
- # don't want to do.
+ // HACK: We create a new Article object here because getRevIdFetched()
+ // refuses to be run twice, and because Title::getLatestRevId()
+ // won't fetch from the master unless we select for update, which we
+ // don't want to do.
$newArticle = new Article( $titleObj );
$newRevId = $newArticle->getRevIdFetched();
if ( $newRevId == $oldRevId )
@@ -321,13 +321,13 @@ class ApiEditPage extends ApiBase {
break;
case EditPage::AS_END:
- # This usually means some kind of race condition
- # or DB weirdness occurred. Fall through to throw an unknown
- # error.
+ // This usually means some kind of race condition
+ // or DB weirdness occurred. Fall through to throw an unknown
+ // error.
- # This needs fixing higher up, as Article::doEdit should be
- # used rather than Article::updateArticle, so that specific
- # error conditions can be returned
+ // This needs fixing higher up, as Article::doEdit should be
+ // used rather than Article::updateArticle, so that specific
+ // error conditions can be returned
default:
$this->dieUsageMsg( array( 'unknownerror', $retval ) );
}
diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 364408dcafc3..7803d8c633aa 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -243,7 +243,7 @@ See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
$text = preg_replace( '/\&lt;(!--.*?--|.*?)\&gt;/', '<span style="color:blue;">&lt;\1&gt;</span>', $text );
// identify URLs
$protos = implode( "|", $wgUrlProtocols );
- # This regex hacks around bug 13218 (&quot; included in the URL)
+ // This regex hacks around bug 13218 (&quot; included in the URL)
$text = preg_replace( "#(($protos).*?)(&quot;)?([ \\'\"<>\n]|&lt;|&gt;|&quot;)#", '<a href="\\1">\\1</a>\\3\\4', $text );
// identify requests to api.php
$text = preg_replace( "#api\\.php\\?[^ \\()<\n\t]+#", '<a href="\\0">\\0</a>', $text );
diff --git a/includes/api/ApiFormatDbg.php b/includes/api/ApiFormatDbg.php
index 9600fa5fb72e..597184a6c724 100644
--- a/includes/api/ApiFormatDbg.php
+++ b/includes/api/ApiFormatDbg.php
@@ -38,9 +38,9 @@ class ApiFormatDbg extends ApiFormatBase {
}
public function getMimeType() {
- # This looks like it should be text/plain, but IE7 is so
- # brain-damaged it tries to parse text/plain as HTML if it
- # contains HTML tags. Using MIME text/text works around this bug
+ // This looks like it should be text/plain, but IE7 is so
+ // brain-damaged it tries to parse text/plain as HTML if it
+ // contains HTML tags. Using MIME text/text works around this bug
return 'text/text';
}
diff --git a/includes/api/ApiFormatTxt.php b/includes/api/ApiFormatTxt.php
index 52bdf8e71eb7..dcb3d28095d9 100644
--- a/includes/api/ApiFormatTxt.php
+++ b/includes/api/ApiFormatTxt.php
@@ -38,9 +38,9 @@ class ApiFormatTxt extends ApiFormatBase {
}
public function getMimeType() {
- # This looks like it should be text/plain, but IE7 is so
- # brain-damaged it tries to parse text/plain as HTML if it
- # contains HTML tags. Using MIME text/text works around this bug
+ // This looks like it should be text/plain, but IE7 is so
+ // brain-damaged it tries to parse text/plain as HTML if it
+ // contains HTML tags. Using MIME text/text works around this bug
return 'text/text';
}
diff --git a/includes/api/ApiFormatYaml_spyc.php b/includes/api/ApiFormatYaml_spyc.php
index 3f375eb5c209..d148fbb0cab4 100644
--- a/includes/api/ApiFormatYaml_spyc.php
+++ b/includes/api/ApiFormatYaml_spyc.php
@@ -151,9 +151,9 @@ class Spyc {
* @return bool
*/
function _needLiteral( $value ) {
- # Check whether the string contains # or : or begins with any of:
- # [ - ? , [ ] { } ! * & | > ' " % @ ` ]
- # or is a number or contains newlines
+ // Check whether the string contains # or : or begins with any of:
+ // [ - ? , [ ] { } ! * & | > ' " % @ ` ]
+ // or is a number or contains newlines
return (bool)( gettype( $value ) == "string" &&
( is_numeric( $value ) ||
strpos( $value, "\n" ) ||
diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index f4b1b484df0d..928aa7a577a6 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -284,7 +284,7 @@ class ApiMain extends ApiBase {
if ( $this->mSquidMaxage == - 1 )
{
- # Nobody called setCacheMaxAge(), use the (s)maxage parameters
+ // Nobody called setCacheMaxAge(), use the (s)maxage parameters
$smaxage = $this->getParameter( 'smaxage' );
$maxage = $this->getParameter( 'maxage' );
}
diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php
index 8d0f94b8f0e6..e1ba7226993d 100644
--- a/includes/api/ApiMove.php
+++ b/includes/api/ApiMove.php
@@ -84,7 +84,7 @@ class ApiMove extends ApiBase {
}
}
- # Move the page
+ // Move the page
$hookErr = null;
$retval = $fromTitle->moveTo( $toTitle, true, $params['reason'], !$params['noredirect'] );
if ( $retval !== true )
@@ -94,7 +94,7 @@ class ApiMove extends ApiBase {
if ( !$params['noredirect'] || !$wgUser->isAllowed( 'suppressredirect' ) )
$r['redirectcreated'] = '';
- # Move the talk page
+ // Move the talk page
if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() )
{
$retval = $fromTalk->moveTo( $toTalk, true, $params['reason'], !$params['noredirect'] );
@@ -112,7 +112,7 @@ class ApiMove extends ApiBase {
}
}
- # Move subpages
+ // Move subpages
if ( $params['movesubpages'] )
{
$r['subpages'] = $this->moveSubpages( $fromTitle, $toTitle,
@@ -126,7 +126,7 @@ class ApiMove extends ApiBase {
}
}
- # Watch pages
+ // Watch pages
if ( $params['watch'] || $wgUser->getOption( 'watchmoves' ) )
{
$wgUser->addWatch( $fromTitle );
diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index 2386d9ed70bd..e6dd7f2e940a 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -600,14 +600,14 @@ class ApiPageSet extends ApiQueryBase {
$db->freeResult( $res );
if ( $this->mPendingRedirectIDs )
{
- # We found pages that aren't in the redirect table
- # Add them
+ // We found pages that aren't in the redirect table
+ // Add them
foreach ( $this->mPendingRedirectIDs as $id => $title )
{
$article = new Article( $title );
$rt = $article->insertRedirect();
if ( !$rt )
- # What the hell. Let's just ignore this
+ // What the hell. Let's just ignore this
continue;
$lb->addObj( $rt );
$this->mRedirectTitles[$title->getPrefixedText()] = $rt->getPrefixedText();
@@ -635,7 +635,7 @@ class ApiPageSet extends ApiQueryBase {
$titleObj = is_string( $title ) ? Title :: newFromText( $title ) : $title;
if ( !$titleObj )
{
- # Handle invalid titles gracefully
+ // Handle invalid titles gracefully
$this->mAllpages[0][$title] = $this->mFakePageId;
$this->mInvalidTitles[$this->mFakePageId] = $title;
$this->mFakePageId--;
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index ff133e5a8a68..3ad4f5a3a5a3 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -60,7 +60,7 @@ class ApiParse extends ApiBase {
{
if ( !is_null( $oldid ) )
{
- # Don't use the parser cache
+ // Don't use the parser cache
$rev = Revision::newFromID( $oldid );
if ( !$rev )
$this->dieUsage( "There is no revision ID $oldid", 'missingrev' );
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index f4253599639b..a9fc9ca00a99 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -264,9 +264,9 @@ class ApiQuery extends ApiBase {
$pageSet = $this->getPageSet();
$result = $this->getResult();
- # We don't check for a full result set here because we can't be adding
- # more than 380K. The maximum revision size is in the megabyte range,
- # and the maximum result size must be even higher than that.
+ // We don't check for a full result set here because we can't be adding
+ // more than 380K. The maximum revision size is in the megabyte range,
+ // and the maximum result size must be even higher than that.
// Title normalizations
$normValues = array ();
diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php
index 96c766b09894..d44a2f303f2b 100644
--- a/includes/api/ApiQueryBase.php
+++ b/includes/api/ApiQueryBase.php
@@ -365,7 +365,7 @@ abstract class ApiQueryBase extends ApiBase {
* @return string Page title with underscores
*/
public function titleToKey( $title ) {
- # Don't throw an error if we got an empty string
+ // Don't throw an error if we got an empty string
if ( trim( $title ) == '' )
return '';
$t = Title::newFromText( $title );
@@ -380,11 +380,11 @@ abstract class ApiQueryBase extends ApiBase {
* @return string Page title with spaces
*/
public function keyToTitle( $key ) {
- # Don't throw an error if we got an empty string
+ // Don't throw an error if we got an empty string
if ( trim( $key ) == '' )
return '';
$t = Title::newFromDbKey( $key );
- # This really shouldn't happen but we gotta check anyway
+ // This really shouldn't happen but we gotta check anyway
if ( !$t )
$this->dieUsageMsg( array( 'invalidtitle', $key ) );
return $t->getPrefixedText();
diff --git a/includes/api/ApiQueryBlocks.php b/includes/api/ApiQueryBlocks.php
index cc0e5fd7e0cc..c43143eea688 100644
--- a/includes/api/ApiQueryBlocks.php
+++ b/includes/api/ApiQueryBlocks.php
@@ -100,7 +100,7 @@ class ApiQueryBlocks extends ApiQueryBase {
list( $ip, $range ) = IP::parseCIDR( $params['ip'] );
if ( $ip && $range )
{
- # We got a CIDR range
+ // We got a CIDR range
if ( $range < 16 )
$this->dieUsage( 'CIDR ranges broader than /16 are not accepted', 'cidrtoobroad' );
$lower = wfBaseConvert( $ip, 10, 16, 8, false );
diff --git a/includes/api/ApiQueryCategories.php b/includes/api/ApiQueryCategories.php
index ca0d6d9fcafc..d45895df58e4 100644
--- a/includes/api/ApiQueryCategories.php
+++ b/includes/api/ApiQueryCategories.php
@@ -114,7 +114,7 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
}
$this->addOption( 'USE INDEX', array( 'categorylinks' => 'cl_from' ) );
- # Don't order by cl_from if it's constant in the WHERE clause
+ // Don't order by cl_from if it's constant in the WHERE clause
if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
$this->addOption( 'ORDER BY', 'cl_to' );
else
diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php
index 8d6f98a64767..0c2ba7f258f5 100644
--- a/includes/api/ApiQueryCategoryMembers.php
+++ b/includes/api/ApiQueryCategoryMembers.php
@@ -83,8 +83,8 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
$this->addWhere( 'cl_from=page_id' );
$this->setContinuation( $params['continue'], $params['dir'] );
$this->addWhereFld( 'cl_to', $categoryTitle->getDBkey() );
- # Scanning large datasets for rare categories sucks, and I already told
- # how to have efficient subcategory access :-) ~~~~ (oh well, domas)
+ // Scanning large datasets for rare categories sucks, and I already told
+ // how to have efficient subcategory access :-) ~~~~ (oh well, domas)
global $wgMiserMode;
$miser_ns = array();
if ( $wgMiserMode ) {
diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php
index b2410c3afb24..6a36b2a6ad7b 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -52,7 +52,7 @@ class ApiQueryExternalLinks extends ApiQueryBase {
$this->addTables( 'externallinks' );
$this->addWhereFld( 'el_from', array_keys( $this->getPageSet()->getGoodTitles() ) );
- # Don't order by el_from if it's constant in the WHERE clause
+ // Don't order by el_from if it's constant in the WHERE clause
if ( count( $this->getPageSet()->getGoodTitles() ) != 1 )
$this->addOption( 'ORDER BY', 'el_from' );
diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php
index 5569f5b90a24..30da6b0628ed 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -95,11 +95,11 @@ class ApiQueryImageInfo extends ApiQueryBase {
if ( !$fit )
{
if ( count( $pageIds[NS_IMAGE] ) == 1 )
- # The user is screwed. imageinfo can't be solely
- # responsible for exceeding the limit in this case,
- # so set a query-continue that just returns the same
- # thing again. When the violating queries have been
- # out-continued, the result will get through
+ // The user is screwed. imageinfo can't be solely
+ // responsible for exceeding the limit in this case,
+ // so set a query-continue that just returns the same
+ // thing again. When the violating queries have been
+ // out-continued, the result will get through
$this->setContinueEnumParameter( 'start',
wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
else
@@ -119,7 +119,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
if ( !$fit )
{
if ( count( $pageIds[NS_IMAGE] ) == 1 )
- # See the 'the user is screwed' comment above
+ // See the 'the user is screwed' comment above
$this->setContinueEnumParameter( 'start',
wfTimestamp( TS_ISO_8601, $img->getTimestamp() ) );
else
diff --git a/includes/api/ApiQueryImages.php b/includes/api/ApiQueryImages.php
index 3f403305df79..b57971c8a5c2 100644
--- a/includes/api/ApiQueryImages.php
+++ b/includes/api/ApiQueryImages.php
@@ -72,7 +72,7 @@ class ApiQueryImages extends ApiQueryGeneratorBase {
"il_to >= '$ilto')" );
}
- # Don't order by il_from if it's constant in the WHERE clause
+ // Don't order by il_from if it's constant in the WHERE clause
if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
$this->addOption( 'ORDER BY', 'il_to' );
else
diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index a8df91c70bbb..13474d5d8d9d 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -354,7 +354,7 @@ class ApiQueryInfo extends ApiQueryBase {
$a['cascade'] = '';
$this->protections[$row->page_namespace][$row->page_title][] = $a;
- # Also check old restrictions
+ // Also check old restrictions
if ( $this->pageRestrictions[$row->pr_page] ) {
$restrictions = explode( ':', trim( $this->pageRestrictions[$row->pr_page] ) );
foreach ( $restrictions as $restrict ) {
diff --git a/includes/api/ApiQueryLangLinks.php b/includes/api/ApiQueryLangLinks.php
index 9180c00f4feb..acc4f82749f6 100644
--- a/includes/api/ApiQueryLangLinks.php
+++ b/includes/api/ApiQueryLangLinks.php
@@ -64,7 +64,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
"ll_lang >= '$lllang')" );
}
- # Don't order by ll_from if it's constant in the WHERE clause
+ // Don't order by ll_from if it's constant in the WHERE clause
if ( count( $this->getPageSet()->getGoodTitles() ) == 1 )
$this->addOption( 'ORDER BY', 'll_lang' );
else
diff --git a/includes/api/ApiQueryLinks.php b/includes/api/ApiQueryLinks.php
index 7f8ceec7569a..a55737734b69 100644
--- a/includes/api/ApiQueryLinks.php
+++ b/includes/api/ApiQueryLinks.php
@@ -100,11 +100,11 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
"{$this->prefix}_title >= '$pltitle')))" );
}
- # Here's some MySQL craziness going on: if you use WHERE foo='bar'
- # and later ORDER BY foo MySQL doesn't notice the ORDER BY is pointless
- # but instead goes and filesorts, because the index for foo was used
- # already. To work around this, we drop constant fields in the WHERE
- # clause from the ORDER BY clause
+ // Here's some MySQL craziness going on: if you use WHERE foo='bar'
+ // and later ORDER BY foo MySQL doesn't notice the ORDER BY is pointless
+ // but instead goes and filesorts, because the index for foo was used
+ // already. To work around this, we drop constant fields in the WHERE
+ // clause from the ORDER BY clause
$order = array();
if ( count( $this->getPageSet()->getGoodTitles() ) != 1 )
$order[] = "{$this->prefix}_from";
diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php
index 1f2130ab42ff..5bf9cbbe8933 100644
--- a/includes/api/ApiQueryRandom.php
+++ b/includes/api/ApiQueryRandom.php
@@ -77,9 +77,9 @@ if ( !defined( 'MEDIAWIKI' ) ) {
array( 'query', $this->getModuleName() ),
null, $this->extractRowInfo( $row ) );
if ( !$fit )
- # We can't really query-continue a random list.
- # Return an insanely high value so
- # $count < $limit is false
+ // We can't really query-continue a random list.
+ // Return an insanely high value so
+ // $count < $limit is false
return 1E9;
$this->pageIDs[] = $row->page_id;
}
diff --git a/includes/api/ApiQueryRevisions.php b/includes/api/ApiQueryRevisions.php
index 8a2a34f38b6f..bc1c53cc74ba 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -396,9 +396,9 @@ class ApiQueryRevisions extends ApiQueryBase {
if ( $this->fld_content || !is_null( $this->difftotext ) ) {
global $wgParser;
$text = $revision->getText();
- # Expand templates after getting section content because
- # template-added sections don't count and Parser::preprocess()
- # will have less input
+ // Expand templates after getting section content because
+ // template-added sections don't count and Parser::preprocess()
+ // will have less input
if ( $this->section !== false ) {
$text = $wgParser->getSection( $text, $this->section, false );
if ( $text === false )
@@ -541,7 +541,7 @@ class ApiQueryRevisions extends ApiQueryBase {
' 1) Get data about a set of pages (last revision), by setting titles or pageids parameter.',
' 2) Get revisions for one given page, by using titles/pageids with start/end/limit params.',
' 3) Get data about a set of revisions by setting their IDs with revids parameter.',
- '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).'
);
}
diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php
index dc2cfe42f80d..18532bbb4ce5 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -91,8 +91,8 @@ class ApiQuerySiteinfo extends ApiQueryBase {
}
if ( !$fit )
{
- # Abuse siprop as a query-continue parameter
- # and set it to all unprocessed props
+ // Abuse siprop as a query-continue parameter
+ // and set it to all unprocessed props
$this->setContinueEnumParameter( 'prop', implode( '|',
array_diff( $params['prop'], $done ) ) );
break;
diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php
index b75ce6b68af9..4f817349710a 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -183,7 +183,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
$this->addWhere( 'rc_user_text != ' . $this->getDB()->addQuotes( $params['excludeuser'] ) );
- # This is an index optimization for mysql, as done in the Special:Watchlist page
+ // This is an index optimization for mysql, as done in the Special:Watchlist page
$this->addWhereIf( "rc_timestamp > ''", !isset ( $params['start'] ) && !isset ( $params['end'] ) && $wgDBtype == 'mysql' );
$this->addOption( 'LIMIT', $params['limit'] + 1 );
diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php
index 0f938bcea227..3e8ea3162768 100644
--- a/includes/api/ApiRollback.php
+++ b/includes/api/ApiRollback.php
@@ -53,7 +53,7 @@ class ApiRollback extends ApiBase {
if ( !$titleObj->exists() )
$this->dieUsageMsg( array( 'notanarticle' ) );
- # We need to be able to revert IPs, but getCanonicalName rejects them
+ // We need to be able to revert IPs, but getCanonicalName rejects them
$username = User::isIP( $params['user'] )
? $params['user']
: User::getCanonicalName( $params['user'] );