r86200 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86199‎ | r86200 | r86201 >
Date:11:28, 16 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove some unused variables/globals

Fix another unreachable statement
Modified paths:
  • /trunk/phase3/includes/Import.php (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/includes/actions/CreditsAction.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/search/SearchOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/search/SearchOracle.php
@@ -238,7 +238,6 @@
239239 * @param $text String
240240 */
241241 function update($id, $title, $text) {
242 - global $wgDBprefix;
243242 $dbw = wfGetDB(DB_MASTER);
244243 $dbw->replace('searchindex',
245244 array('si_page'),
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -1085,7 +1085,7 @@
10861086 }
10871087
10881088 public function removeIdentifierQuotes( $s ) {
1089 - return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5); ;
 1089+ return strpos($s, '/*Q*/') === FALSE ? $s : substr($s, 5);
10901090 }
10911091
10921092 public function isQuotedIdentifier( $s ) {
Index: trunk/phase3/includes/actions/CreditsAction.php
@@ -186,7 +186,7 @@
187187 * @return String: html
188188 */
189189 protected static function link( User $user ) {
190 - global $wgUser, $wgHiddenPrefs;
 190+ global $wgHiddenPrefs;
191191 if ( !in_array( 'realname', $wgHiddenPrefs ) && !$user->isAnon() ) {
192192 $real = $user->getRealName();
193193 } else {
@@ -225,7 +225,6 @@
226226 * @return String: html
227227 */
228228 protected function othersLink() {
229 - global $wgUser;
230229 return Linker::link(
231230 $this->getTitle(),
232231 wfMsgHtml( 'others' ),
Index: trunk/phase3/includes/Preferences.php
@@ -934,9 +934,6 @@
935935 'section' => 'searchoptions/advancedsearchoptions',
936936 );
937937
938 - // Searchable namespaces back-compat with old format
939 - $searchableNamespaces = SearchEngine::searchableNamespaces();
940 -
941938 $nsOptions = array();
942939
943940 foreach ( $wgContLang->getNamespaces() as $ns => $name ) {
Index: trunk/phase3/includes/Import.php
@@ -202,7 +202,6 @@
203203 public function importUpload( $revision ) {
204204 $dbw = wfGetDB( DB_MASTER );
205205 return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
206 - return false;
207206 }
208207
209208 /**

Status & tagging log