r69851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69850‎ | r69851 | r69852 >
Date:21:32, 24 July 2010
Author:reedy
Status:deferred
Tags:
Comment:
Remove some more unused variables
Modified paths:
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php (modified) (history)
  • /trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialCentralNotice.php (modified) (history)
  • /trunk/extensions/Cite/SpecialCite_body.php (modified) (history)
  • /trunk/extensions/LiquidThreads/api/ApiQueryLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /trunk/extensions/LiquidThreads/compat/HTMLForm.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/TalkpageView.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslations.php (modified) (history)
  • /trunk/extensions/Translate/ffs/Xliff.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/compat/HTMLForm.php
@@ -89,8 +89,6 @@
9090 }
9191
9292 function show() {
93 - $html = '';
94 -
9593 self::addJS();
9694
9795 // Load data from the request.
Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -249,9 +249,6 @@
250250 static function talkpageUrl( $title, $method = null, $operand = null,
251251 $includeFragment = true, $perpetuateOffset = true )
252252 {
253 - global $wgUser;
254 - $sk = $wgUser->getSkin();
255 -
256253 list( $title, $query ) =
257254 self::talkpageLinkData( $title, $method, $operand, $includeFragment,
258255 $perpetuateOffset );
@@ -1286,9 +1283,6 @@
12871284 }
12881285
12891286 function showThreadToolbar( $thread ) {
1290 - global $wgLang;
1291 -
1292 - $sk = $this->user->getSkin();
12931287 $html = '';
12941288
12951289 $headerParts = array();
@@ -1445,8 +1439,7 @@
14461440 }
14471441
14481442 function threadSignature( $thread ) {
1449 - global $wgUser, $wgLang;
1450 - $sk = $wgUser->getSkin();
 1443+ global $wgLang;
14511444
14521445 $signature = $thread->signature();
14531446 $signature = LqtView::parseSignature( $signature );
@@ -1618,8 +1611,6 @@
16191612
16201613 /** Shows a deleted thread. Returns true to show the thread body */
16211614 function showDeletedThread( $thread ) {
1622 - $sk = $this->user->getSkin();
1623 -
16241615 if ( $this->user->isAllowed( 'deletedhistory' ) ) {
16251616 $this->output->addWikiMsg( 'lqt_thread_deleted_for_sysops' );
16261617 return true;
@@ -1895,7 +1886,6 @@
18961887 ) );
18971888 $replyTo = $this->methodAppliesToThread( 'reply', $thread );
18981889
1899 - $sk = $this->user->getSkin();
19001890 $html = '';
19011891
19021892 if ( wfRunHooks( 'EditPageBeforeEditToolbar', array( $html ) ) ) {
Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -64,8 +64,6 @@
6565 $type = Threads::TYPE_NORMAL, $subject = '',
6666 $summary = '', $bump = null, $signature = null ) {
6767
68 - $dbw = wfGetDB( DB_MASTER );
69 -
7068 $thread = new Thread( null );
7169
7270 if ( !in_array( $type, self::$VALID_TYPES ) ) {
@@ -80,8 +78,6 @@
8179
8280 global $wgUser;
8381
84 - $timestamp = wfTimestampNow();
85 -
8682 $thread->setAuthor( $wgUser );
8783
8884 if ( is_object( $root ) ) {
Index: trunk/extensions/LiquidThreads/pages/SpecialMoveThread.php
@@ -39,7 +39,7 @@
4040
4141 global $wgUser;
4242 $sk = $wgUser->getSkin();
43 - $page = $article_name = $this->mThread->getTitle()->getPrefixedText();
 43+ $page = $this->mThread->getTitle()->getPrefixedText();
4444
4545 $edit_text = wfMsgExt( 'lqt_move_torename_edit', 'parseinline' );
4646 $edit_link = $sk->link(
Index: trunk/extensions/LiquidThreads/pages/TalkpageHistoryView.php
@@ -33,7 +33,6 @@
3434 function customizeTabs( $skin, &$links ) {
3535 TalkpageView::customizeTalkpageTabs( $skin, $links, $this );
3636
37 - $tabid = $this->article->getTitle()->getNamespaceKey();
3837 $links['history']['class'] = 'selected';
3938 }
4039
Index: trunk/extensions/LiquidThreads/pages/TalkpageView.php
@@ -111,8 +111,6 @@
112112
113113 wfLoadExtensionMessages( 'LiquidThreads' );
114114
115 - $sk = $this->user->getSkin();
116 -
117115 $html = '';
118116
119117 $h2_header = Xml::tags( 'h2', null, wfMsgExt( 'lqt_contents_title', 'parseinline' ) );
@@ -182,8 +180,6 @@
183181
184182 if ( $article->exists() ) {
185183 $form_action_url = $this->talkpageUrl( $this->title, 'talkpage_sort_order' );
186 - $go = wfMsg( 'go' );
187 -
188184 $html = '';
189185
190186 $html .= Xml::label( wfMsg( 'lqt_sorting_order' ), 'lqt_sort_select' ) . ' ';
Index: trunk/extensions/LiquidThreads/api/ApiQueryLQTThreads.php
@@ -93,7 +93,6 @@
9494 $threads = Threads::loadFromResult( $res, $this->getDB() );
9595 }
9696
97 -
9897 $ids = array();
9998 $count = 0;
10099 foreach ( $res as $row )
Index: trunk/extensions/CentralNotice/SpecialCentralNotice.php
@@ -23,9 +23,6 @@
2424 // Begin output
2525 $this->setHeaders();
2626
27 - // Get current skin
28 - $sk = $wgUser->getSkin();
29 -
3027 // Check permissions
3128 $this->editable = $wgUser->isAllowed( 'centralnotice-admin' );
3229
Index: trunk/extensions/Cite/SpecialCite_body.php
@@ -110,7 +110,7 @@
111111 }
112112
113113 function execute() {
114 - global $wgOut, $wgUser, $wgParser, $wgHooks, $wgCiteDefaultText;
 114+ global $wgOut, $wgParser, $wgHooks, $wgCiteDefaultText;
115115
116116 $wgHooks['ParserGetVariableValueTs'][] = array( $this, 'timestamp' );
117117
Index: trunk/extensions/CentralAuth/SpecialGlobalGroupPermissions.php
@@ -70,8 +70,6 @@
7171 function buildMainView() {
7272 global $wgOut, $wgUser, $wgScript;
7373
74 - $sk = $wgUser->getSkin();
75 -
7674 $groups = CentralAuthUser::availableGlobalGroups();
7775
7876 // Existing groups
@@ -228,7 +226,7 @@
229227 }
230228
231229 function doSubmit( $group ) {
232 - global $wgRequest, $wgOut, $wgScript, $wgUser;
 230+ global $wgRequest, $wgOut, $wgUser;
233231
234232 // Paranoia -- the edit token shouldn't match anyway
235233 if ( !$this->userCanEdit( $wgUser ) )
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewList.php
@@ -45,7 +45,7 @@
4646 function showList( $conds = array( 'af_deleted' => 0 ), $optarray = array() ) {
4747 global $wgOut, $wgUser;
4848
49 - $sk = $this->mSkin = $wgUser->getSkin();
 49+ $this->mSkin = $wgUser->getSkin();
5050
5151 $output = '';
5252 $output .= Xml::element( 'h2', null,
Index: trunk/extensions/Translate/SpecialTranslations.php
@@ -228,7 +228,7 @@
229229 }
230230
231231 private static function includeAssets() {
232 - global $wgOut, $wgScript;
 232+ global $wgOut;
233233
234234 TranslateUtils::injectCSS();
235235 $wgOut->addScriptFile( TranslateUtils::assetPath( 'js/quickedit.js' ) );
Index: trunk/extensions/Translate/ffs/Xliff.php
@@ -30,7 +30,6 @@
3131 * Writes very minimalistic header that validates XLIFF schema.
3232 */
3333 protected function header( XMLWriter $w, $handle, $code ) {
34 - $header = '';
3534 $w->startDocument( '1.0', 'UTF-8' );
3635
3736 // http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#Specs_XMLDecl

Status & tagging log