r75520 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75519‎ | r75520 | r75521 >
Date:11:43, 27 October 2010
Author:reedy
Status:deferred
Tags:
Comment:
Kill some unused variables. Fix minor typo from r75515
Modified paths:
  • /trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/NewMessagesController.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/ParserFunctions.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Thread.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/ThreadHistoryPager.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /trunk/extensions/LiquidThreads/compat/HTMLForm.php (modified) (history)
  • /trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/compat/HTMLForm.php
@@ -485,7 +485,7 @@
486486 static function flattenOptions( $options ) {
487487 $flatOpts = array();
488488
489 - foreach ( $options as $key => $value ) {
 489+ foreach ( $options as $value ) {
490490 if ( is_array( $value ) ) {
491491 $flatOpts = array_merge( $flatOpts, self::flattenOptions( $value ) );
492492 } else {
Index: trunk/extensions/LiquidThreads/classes/View.php
@@ -824,7 +824,6 @@
825825 }
826826 }
827827
828 - $signature = null;
829828 if ( isset( $data['signature'] ) ) {
830829 $signature = $data['signature'];
831830 } else {
@@ -921,7 +920,6 @@
922921 }
923922 }
924923
925 - $signature = null;
926924 if ( isset( $data['signature'] ) ) {
927925 $signature = $data['signature'];
928926 } else {
@@ -984,7 +982,6 @@
985983 $error = $ot->moveTo( $nt, true, "Changed thread subject: $reason" );
986984 if ( $error !== true ) {
987985 throw new MWException( "Got error $error trying to move pages." );
988 - return false;
989986 }
990987
991988 # Move the talk page if relevant, if it exists, and if we've been told to
@@ -1395,8 +1392,6 @@
13961393 }
13971394 }
13981395
1399 - $thisCommand = '';
1400 -
14011396 if ( $enabled ) {
14021397 $thisCommand = Xml::tags( 'a', array( 'href' => $href, 'title' => $tooltip ),
14031398 $label );
Index: trunk/extensions/LiquidThreads/classes/NewMessagesController.php
@@ -160,11 +160,9 @@
161161 // Pull users to update the message state for, including whether or not a
162162 // user_message_state row exists for them, and whether or not to send an email
163163 // notification.
164 - $dbr = wfGetDB( DB_SLAVE );
165 -
166164 $userIds = array();
167165 $notifyUsers = array();
168 - $obj = self::getRowsObject( $t );
 166+ $res = self::getRowsObject( $t );
169167 foreach( $res as $row ) {
170168 // Don't notify yourself
171169 if ( $changeUser->getId() == $row->wl_user )
Index: trunk/extensions/LiquidThreads/classes/ParserFunctions.php
@@ -25,8 +25,6 @@
2626 * most of the page can be cached, but the LiquidThreads dynamicism still works.
2727 * Thanks to Tim for the idea. */
2828 static function lqtTalkPage( $parser, $args, $parser, $frame ) {
29 - global $wgStyleVersion;
30 -
3129 $pout = $parser->getOutput();
3230
3331 // Prepare information.
@@ -62,8 +60,6 @@
6361 }
6462
6563 static function lqtThread( $parser, $args, $parser, $frame ) {
66 - global $wgStyleVersion;
67 -
6864 $pout = $parser->getOutput();
6965
7066 // Prepare information.
@@ -157,7 +153,6 @@
158154 $out->mLqtReplacements = array();
159155 }
160156
161 - $processedReplacements = array();
162157 foreach( $pout->mLqtReplacements as $text => $details ) {
163158 $result = '';
164159
Index: trunk/extensions/LiquidThreads/classes/Thread.php
@@ -563,7 +563,6 @@
564564 // Load a list of threads in bulk, including all subthreads.
565565 static function bulkLoad( $rows ) {
566566 // Preload subthreads
567 - $all_thread_ids = array();
568567 $top_thread_ids = array();
569568 $all_thread_rows = $rows;
570569 $pageIds = array();
@@ -725,8 +724,6 @@
726725 }
727726 }
728727
729 - $userIds = array_keys( $userIds );
730 -
731728 // Pull link batch data.
732729 $linkBatch->execute();
733730
Index: trunk/extensions/LiquidThreads/classes/ThreadHistoryPager.php
@@ -76,8 +76,6 @@
7777
7878 $row = $this->mCurrentRow;
7979
80 - $formatted = '';
81 -
8280 switch( $name ) {
8381 case 'th_timestamp':
8482 $formatted = $wgLang->timeanddate( $value );
Index: trunk/extensions/LiquidThreads/pages/ThreadPermalinkView.php
@@ -145,12 +145,12 @@
146146 $sk = $this->user->getSkin();
147147 $fragment = '#' . $this->anchorName( $this->thread );
148148
149 - if ( $this->thread->isHistorical() ) {
150 - // TODO: Point to the relevant part of the archive.
151 - $query = '';
152 - } else {
153 - $query = '';
154 - }
 149+ //if ( $this->thread->isHistorical() ) {
 150+ / // TODO: Point to the relevant part of the archive.
 151+ // $query = '';
 152+ //} else {
 153+ // $query = '';
 154+ //}
155155
156156 $talkpage = $this->thread->getTitle();
157157 $talkpage->setFragment( $fragment );
Index: trunk/extensions/LiquidThreads/api/ApiFeedLQTThreads.php
@@ -128,8 +128,6 @@
129129 // What's included?
130130 $types = (array)$params['type'];
131131
132 - $msg = '';
133 -
134132 if ( !count( array_diff( array( 'replies', 'newthreads' ), $types ) ) ) {
135133 $msg = 'lqt-feed-title-all';
136134 } elseif ( in_array( 'replies', $types ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r75522Remove leading slash from r75520reedy12:01, 27 October 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75515Remove a lot of the deprecated wfLoadExtension calls. Calls to Xml::hidden to...reedy11:33, 27 October 2010

Status & tagging log