dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
fe36327
)
Remove unused variables/globals
author
Sam Reed
<reedy@users.mediawiki.org>
Thu, 26 May 2011 19:20:35 +0000
(19:20 +0000)
committer
Sam Reed
<reedy@users.mediawiki.org>
Thu, 26 May 2011 19:20:35 +0000
(19:20 +0000)
Swap while to foreach
includes/Article.php
patch
|
blob
|
history
includes/Metadata.php
patch
|
blob
|
history
includes/installer/WebInstallerPage.php
patch
|
blob
|
history
includes/parser/Parser.php
patch
|
blob
|
history
includes/revisiondelete/RevisionDelete.php
patch
|
blob
|
history
includes/specials/SpecialContributions.php
patch
|
blob
|
history
includes/specials/SpecialVersion.php
patch
|
blob
|
history
diff --git
a/includes/Article.php
b/includes/Article.php
index
807a029
..
915ee7a
100644
(file)
--- a/
includes/Article.php
+++ b/
includes/Article.php
@@
-870,7
+870,6
@@
class Article {
# @todo FIXME: This is expensive; cache this info somewhere.
$dbr = wfGetDB( DB_SLAVE );
# @todo FIXME: This is expensive; cache this info somewhere.
$dbr = wfGetDB( DB_SLAVE );
- $userTable = $dbr->tableName( 'user' );
if ( $dbr->implicitGroupby() ) {
$realNameField = 'user_real_name';
if ( $dbr->implicitGroupby() ) {
$realNameField = 'user_real_name';
diff --git
a/includes/Metadata.php
b/includes/Metadata.php
index
6439ef3
..
463b497
100644
(file)
--- a/
includes/Metadata.php
+++ b/
includes/Metadata.php
@@
-88,10
+88,11
@@
abstract class RdfMetaData {
}
protected function pageOrString( $name, $page, $str ) {
}
protected function pageOrString( $name, $page, $str ) {
- if( $page instanceof Title )
+ if( $page instanceof Title )
{
$nt = $page;
$nt = $page;
- else
+ } else {
$nt = Title::newFromText( $page );
$nt = Title::newFromText( $page );
+ }
if( !$nt || $nt->getArticleID() == 0 ){
$this->element( $name, $str );
if( !$nt || $nt->getArticleID() == 0 ){
$this->element( $name, $str );
diff --git
a/includes/installer/WebInstallerPage.php
b/includes/installer/WebInstallerPage.php
index
5cec53f
..
d450d92
100644
(file)
--- a/
includes/installer/WebInstallerPage.php
+++ b/
includes/installer/WebInstallerPage.php
@@
-731,7
+731,6
@@
class WebInstaller_Name extends WebInstallerPage {
// Validate password
$msg = false;
// Validate password
$msg = false;
- $valid = false;
$pwd = $this->getVar( '_AdminPassword' );
$user = User::newFromName( $cname );
$valid = $user && $user->getPasswordValidity( $pwd );
$pwd = $this->getVar( '_AdminPassword' );
$user = User::newFromName( $cname );
$valid = $user && $user->getPasswordValidity( $pwd );
diff --git
a/includes/parser/Parser.php
b/includes/parser/Parser.php
index
d0f97e6
..
bdb47b1
100644
(file)
--- a/
includes/parser/Parser.php
+++ b/
includes/parser/Parser.php
@@
-950,7
+950,6
@@
class Parser {
* @private
*/
function getCellAttr ( $cell, $tagName ) {
* @private
*/
function getCellAttr ( $cell, $tagName ) {
- $content = null;
$attributes = null;
$cell = trim ( $cell );
$attributes = null;
$cell = trim ( $cell );
@@
-965,8
+964,7
@@
class Parser {
}
else if ( count ( $cellData ) == 1 ) {
$content = trim ( $cellData[0] );
}
else if ( count ( $cellData ) == 1 ) {
$content = trim ( $cellData[0] );
- }
- else {
+ } else {
$attributes = $this->mStripState->unstripBoth( $cellData[0] );
$attributes = Sanitizer::fixTagAttributes( $attributes , $tagName );
$attributes = $this->mStripState->unstripBoth( $cellData[0] );
$attributes = Sanitizer::fixTagAttributes( $attributes , $tagName );
diff --git
a/includes/revisiondelete/RevisionDelete.php
b/includes/revisiondelete/RevisionDelete.php
index
5b6e63e
..
9f79837
100644
(file)
--- a/
includes/revisiondelete/RevisionDelete.php
+++ b/
includes/revisiondelete/RevisionDelete.php
@@
-53,10
+53,10
@@
class RevDel_RevisionList extends RevDel_List {
} else {
// Combine the two! Whee
$rows = array();
} else {
// Combine the two! Whee
$rows = array();
-
while ( $row = $live->fetchObject()
) {
+
foreach ( $live as $row
) {
$rows[$row->rev_id] = $row;
}
$rows[$row->rev_id] = $row;
}
-
while ( $row = $archived->fetchObject()
) {
+
foreach ( $archived as $row
) {
$rows[$row->ar_rev_id] = $row;
}
krsort( $rows );
$rows[$row->ar_rev_id] = $row;
}
krsort( $rows );
diff --git
a/includes/specials/SpecialContributions.php
b/includes/specials/SpecialContributions.php
index
6da6f87
..
f4c3905
100644
(file)
--- a/
includes/specials/SpecialContributions.php
+++ b/
includes/specials/SpecialContributions.php
@@
-319,7
+319,7
@@
class SpecialContributions extends SpecialPage {
* @return String: HTML fragment
*/
protected function getForm() {
* @return String: HTML fragment
*/
protected function getForm() {
- global $wgScript, $wgMiserMode
, $wgRCMaxAge, $wgContLang
;
+ global $wgScript, $wgMiserMode;
$this->opts['title'] = $this->getTitle()->getPrefixedText();
if( !isset( $this->opts['target'] ) ) {
$this->opts['title'] = $this->getTitle()->getPrefixedText();
if( !isset( $this->opts['target'] ) ) {
diff --git
a/includes/specials/SpecialVersion.php
b/includes/specials/SpecialVersion.php
index
53c5e87
..
f58d366
100644
(file)
--- a/
includes/specials/SpecialVersion.php
+++ b/
includes/specials/SpecialVersion.php
@@
-689,12
+689,14
@@
class SpecialVersion extends SpecialPage {
$rp .= "+(\\$i)";
}
$rp .= "+(\\$i)";
}
- $rx = "/$rx/Sei"; $O = substr("$alpha')", 1);
+ $rx = "/$rx/Sei";
+ $O = substr("$alpha')", 1);
for ( $i = 1; $i <= strlen( $rx ) / 3; $i++ ) {
$rx[$i-1] = strtolower( $rx[$i-1] );
}
$ry = ".*?(.((.)(.))).{1,3}(.)(.{1,$i})(\\4.\\3)(.).*";
for ( $i = 1; $i <= strlen( $rx ) / 3; $i++ ) {
$rx[$i-1] = strtolower( $rx[$i-1] );
}
$ry = ".*?(.((.)(.))).{1,3}(.)(.{1,$i})(\\4.\\3)(.).*";
- $ry = "/$ry/Sei"; $O = substr("$beta')", 1);
+ $ry = "/$ry/Sei";
+ $O = substr("$beta')", 1);
preg_match_all('/(?<=\$)[[:alnum:]]*/',substr($juliet, 0, $i<<1), $charlie);
foreach( $charlie[0] as $bravo ) {
$$bravo =& $xe;
preg_match_all('/(?<=\$)[[:alnum:]]*/',substr($juliet, 0, $i<<1), $charlie);
foreach( $charlie[0] as $bravo ) {
$$bravo =& $xe;