dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Collapse some unnecessary else conditions"
[lhc/web/wiklou.git]
/
includes
/
specialpage
/
SpecialPageFactory.php
diff --git
a/includes/specialpage/SpecialPageFactory.php
b/includes/specialpage/SpecialPageFactory.php
index
e136ce0
..
013ceb2
100644
(file)
--- a/
includes/specialpage/SpecialPageFactory.php
+++ b/
includes/specialpage/SpecialPageFactory.php
@@
-408,16
+408,14
@@
class SpecialPageFactory {
if ( $page instanceof SpecialPage ) {
return $page;
if ( $page instanceof SpecialPage ) {
return $page;
- } else {
- // It's not a classname, nor a callback, nor a legacy constructor array,
- // nor a special page object. Give up.
- wfLogWarning( "Cannot instantiate special page $realName: bad spec!" );
- return null;
}
}
- } else {
- return null;
+ // It's not a classname, nor a callback, nor a legacy constructor array,
+ // nor a special page object. Give up.
+ wfLogWarning( "Cannot instantiate special page $realName: bad spec!" );
}
}
+
+ return null;
}
/**
}
/**
@@
-554,9
+552,9
@@
class SpecialPageFactory {
$context->getOutput()->redirect( $url );
return $title;
$context->getOutput()->redirect( $url );
return $title;
- } else {
- $context->setTitle( $page->getPageTitle( $par ) );
}
}
+
+ $context->setTitle( $page->getPageTitle( $par ) );
} elseif ( !$page->isIncludable() ) {
return false;
}
} elseif ( !$page->isIncludable() ) {
return false;
}
@@
-703,8
+701,8
@@
class SpecialPageFactory {
list( $name, $subpage ) = $this->resolveAlias( $alias );
if ( $name != null ) {
return SpecialPage::getTitleFor( $name, $subpage );
list( $name, $subpage ) = $this->resolveAlias( $alias );
if ( $name != null ) {
return SpecialPage::getTitleFor( $name, $subpage );
- } else {
- return null;
}
}
+
+ return null;
}
}
}
}