http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73377
Revision: 73377
Author: reedy
Date: 2010-09-20 14:32:38 +0000 (Mon, 20 Sep 2010)
Log Message:
-----------
Remove some unused variables
Add some braces
Modified Paths:
--------------
trunk/phase3/includes/ProfilerStub.php
trunk/phase3/includes/api/ApiProtect.php
trunk/phase3/includes/api/ApiQueryAllmessages.php
trunk/phase3/includes/api/ApiQueryUserInfo.php
trunk/phase3/includes/api/ApiUndelete.php
trunk/phase3/includes/specials/SpecialNewimages.php
trunk/phase3/includes/specials/SpecialTags.php
trunk/phase3/maintenance/convertLinks.php
trunk/phase3/maintenance/reassignEdits.php
trunk/phase3/maintenance/storage/storageTypeStats.php
Modified: trunk/phase3/includes/ProfilerStub.php
===================================================================
--- trunk/phase3/includes/ProfilerStub.php 2010-09-20 14:29:52 UTC (rev
73376)
+++ trunk/phase3/includes/ProfilerStub.php 2010-09-20 14:32:38 UTC (rev
73377)
@@ -30,12 +30,15 @@
*/
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
- if( !$haveProctitle )
+ if( !$haveProctitle ) {
return;
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
array_pop( $hackwhere );
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
setproctitle( $hackwhere[count( $hackwhere )-1] . "
[$wgDBname]" );
+ }
}
/**
Modified: trunk/phase3/includes/api/ApiProtect.php
===================================================================
--- trunk/phase3/includes/api/ApiProtect.php 2010-09-20 14:29:52 UTC (rev
73376)
+++ trunk/phase3/includes/api/ApiProtect.php 2010-09-20 14:32:38 UTC (rev
73377)
@@ -42,8 +42,6 @@
global $wgUser, $wgRestrictionLevels;
$params = $this->extractRequestParams();
- $titleObj = null;
-
$titleObj = Title::newFromText( $params['title'] );
if ( !$titleObj ) {
$this->dieUsageMsg( array( 'invalidtitle',
$params['title'] ) );
Modified: trunk/phase3/includes/api/ApiQueryAllmessages.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryAllmessages.php 2010-09-20 14:29:52 UTC
(rev 73376)
+++ trunk/phase3/includes/api/ApiQueryAllmessages.php 2010-09-20 14:32:38 UTC
(rev 73377)
@@ -54,7 +54,6 @@
$prop = array_flip( (array)$params['prop'] );
// Determine which messages should we print
- $messages_target = array();
if ( in_array( '*', $params['messages'] ) ) {
$message_names = array_keys( Language::getMessagesFor(
'en' ) );
sort( $message_names );
Modified: trunk/phase3/includes/api/ApiQueryUserInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryUserInfo.php 2010-09-20 14:29:52 UTC
(rev 73376)
+++ trunk/phase3/includes/api/ApiQueryUserInfo.php 2010-09-20 14:32:38 UTC
(rev 73377)
@@ -43,13 +43,13 @@
public function execute() {
$params = $this->extractRequestParams();
$result = $this->getResult();
- $r = array();
if ( !is_null( $params['prop'] ) ) {
$this->prop = array_flip( $params['prop'] );
} else {
$this->prop = array();
}
+
$r = $this->getCurrentUserInfo();
$result->addValue( 'query', $this->getModuleName(), $r );
}
Modified: trunk/phase3/includes/api/ApiUndelete.php
===================================================================
--- trunk/phase3/includes/api/ApiUndelete.php 2010-09-20 14:29:52 UTC (rev
73376)
+++ trunk/phase3/includes/api/ApiUndelete.php 2010-09-20 14:32:38 UTC (rev
73377)
@@ -42,8 +42,6 @@
global $wgUser;
$params = $this->extractRequestParams();
- $titleObj = null;
-
if ( !$wgUser->isAllowed( 'undelete' ) ) {
$this->dieUsageMsg( array( 'permdenied-undelete' ) );
}
Modified: trunk/phase3/includes/specials/SpecialNewimages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialNewimages.php 2010-09-20 14:29:52 UTC
(rev 73376)
+++ trunk/phase3/includes/specials/SpecialNewimages.php 2010-09-20 14:32:38 UTC
(rev 73377)
@@ -68,7 +68,6 @@
} else {
$ts = false;
}
- $sql = '';
# If we were clever, we'd use this to cache.
$latestTimestamp = wfTimestamp( TS_MW, $ts );
@@ -100,7 +99,7 @@
$where[] = "img_timestamp >= '" . $dbr->timestamp( $from ) .
"'";
$invertSort = true;
}
- $sql='SELECT img_size, img_name, img_user, img_user_text,'.
+ $sql = 'SELECT img_size, img_name, img_user, img_user_text,'.
"img_description,img_timestamp FROM $image";
if( $hidebotsql ) {
Modified: trunk/phase3/includes/specials/SpecialTags.php
===================================================================
--- trunk/phase3/includes/specials/SpecialTags.php 2010-09-20 14:29:52 UTC
(rev 73376)
+++ trunk/phase3/includes/specials/SpecialTags.php 2010-09-20 14:32:38 UTC
(rev 73377)
@@ -42,7 +42,6 @@
$wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>",
'tags-intro' );
// Write the headers
- $html = '';
$html = Xml::tags( 'tr', null, Xml::tags( 'th', null, wfMsgExt(
'tags-tag', 'parseinline' ) ) .
Xml::tags( 'th', null, wfMsgExt(
'tags-display-header', 'parseinline' ) ) .
Xml::tags( 'th', null, wfMsgExt(
'tags-description-header', 'parseinline' ) ) .
Modified: trunk/phase3/maintenance/convertLinks.php
===================================================================
--- trunk/phase3/maintenance/convertLinks.php 2010-09-20 14:29:52 UTC (rev
73376)
+++ trunk/phase3/maintenance/convertLinks.php 2010-09-20 14:32:38 UTC (rev
73377)
@@ -53,7 +53,7 @@
global $wgContLang;
- $tuplesAdded = $numBadLinks = $curRowsRead = 0; # counters etc
+ $numBadLinks = $curRowsRead = 0; # counters etc
$totalTuplesInserted = 0; # total tuples INSERTed into
links_temp
$reportCurReadProgress = true; # whether or not to give
progress reports while reading IDs from cur table
Modified: trunk/phase3/maintenance/reassignEdits.php
===================================================================
--- trunk/phase3/maintenance/reassignEdits.php 2010-09-20 14:29:52 UTC (rev
73376)
+++ trunk/phase3/maintenance/reassignEdits.php 2010-09-20 14:32:38 UTC (rev
73377)
@@ -47,8 +47,9 @@
$report = $this->hasOption( 'report' );
$count = $this->doReassignEdits( $from, $to,
!$this->hasOption( 'norc' ), $report );
# If reporting, and there were items, advise
the user to run without --report
- if ( $report )
+ if ( $report ) {
$this->output( "Run the script again
without --report to update.\n" );
+ }
} else {
$ton = $to->getName();
$this->error( "User '{$ton}' not found." );
Modified: trunk/phase3/maintenance/storage/storageTypeStats.php
===================================================================
--- trunk/phase3/maintenance/storage/storageTypeStats.php 2010-09-20
14:29:52 UTC (rev 73376)
+++ trunk/phase3/maintenance/storage/storageTypeStats.php 2010-09-20
14:32:38 UTC (rev 73377)
@@ -12,7 +12,6 @@
exit( 1 );
}
- $rangeStart = 0;
$binSize = intval( pow( 10, floor( log10( $endId ) ) - 3 ) );
if ( $binSize < 100 ) {
$binSize = 100;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs