r46877 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46876‎ | r46877 | r46878 >
Date:23:03, 5 February 2009
Author:werdna
Status:deferred
Tags:
Comment:
Assorted fixup
Modified paths:
  • /trunk/extensions/DeleteQueue/DeleteQueue.i18n.php (modified) (history)
  • /trunk/extensions/DeleteQueue/DeleteQueueInterface.php (modified) (history)
  • /trunk/extensions/DeleteQueue/DeleteQueueItem.php (modified) (history)
  • /trunk/extensions/DeleteQueue/ReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DeleteQueue/DeleteQueue.i18n.php
@@ -119,6 +119,8 @@
120120
121121 A [{{fullurl:{{FULLPAGENAME}}|action=delviewvotes}} list] of endorsements and objections of this deletion is available, and the discussion itself can be found at [[$2]].
122122 Please ensure that you make a decision in accordance with the consensus on the discussion.",
 123+ 'deletequeue-review-success' => 'You have successfully reviewed the deletion of this page',
 124+ 'deletequeue-review-success-title' => 'Review complete',
123125
124126 // Deletion discussions
125127 'deletequeue-deletediscuss-discussionpage' => "This is the discussion page for the deletion of [[$1]].
Index: trunk/extensions/DeleteQueue/ReviewForm.php
@@ -27,13 +27,14 @@
2828 $action = $wgRequest->getVal( 'wpSpeedyAction' );
2929 $processed = true;
3030 $dqi = DeleteQueueItem::newFromArticle( $article );
 31+ $newQueue = $wgRequest->getVal( 'wpSpeedyRequeue' );
3132
3233 $lp = new LogPage( 'delete' );
3334 $reason = $wgRequest->getText( 'wpReason' );
3435
3536 // Check the action against the list
3637 list($enabledActions) = $this->availableActions();
37 - if (!in_array($action,$enabledActions)) {
 38+ if ( !in_array( $action,$enabledActions ) && ( $action != 'requeue' || !in_array( "requeue-$newQueue", $enabledActions ) ) ) {
3839 return wfMsg( 'deletequeue-review-actiondenied' );
3940 }
4041
@@ -59,8 +60,6 @@
6061 $processed = true;
6162 break;
6263 case 'requeue':
63 - $newQueue = $wgRequest->getVal( 'wpSpeedyRequeue' );
64 -
6564 $lp->addEntry( 'requeue', $article->mTitle, $reason, array(wfMsgForContent("deletequeue-queue-$queue"), wfMsgForContent( "deletequeue-queue-{$newQueue}" )) );
6665
6766 list($reason1,$reason2) = array($wgRequest->getText( 'wpSpeedyNewReason' ), $wgRequest->getText( 'wpSpeedyNewExtra' ) );
@@ -138,6 +137,8 @@
139138 }
140139
141140 if (($error = $this->submit( $article )) === true) {
 141+ $wgOut->setPageTitle( wfMsg( "deletequeue-review-success-title" ) );
 142+ $wgOut->addWikiMsg( "deletequeue-review-success" );
142143 return;
143144 }
144145
@@ -224,7 +225,7 @@
225226
226227 $wgOut->addHTML( $output );
227228
228 - $article->showLogExtract( $wgOut );
 229+// $article->showLogExtract( $wgOut );
229230 }
230231
231232 /** Returns the action given in enabledText, a 'disabled' message, or nothing, depending on the status of the action. */
@@ -299,7 +300,7 @@
300301 // Tell them they're involved.
301302 $disabled['delete'] = wfMsgExt( 'deletequeue-actiondisabled-involved', array( 'parseinline' ), array( $descriptiveRolesText ) );
302303 } else {
303 - // An uninvolved admin wants to delete an expired proposed deletion. Kill it.
 304+ // Allow uninvolved admins to delete expired prods
304305 $enabled[] = 'delete';
305306 }
306307 } elseif ($queue == 'deletediscuss') {
Index: trunk/extensions/DeleteQueue/DeleteQueueItem.php
@@ -362,9 +362,6 @@
363363 */
364364 public function setQueue( $queue, $reason, $timestamp = null ) {
365365
366 - if (!$this->getCaseID())
367 - return; // Case doesn't exist anymore.
368 -
369366 $dbw = wfGetDB( DB_MASTER );
370367
371368 if ($timestamp == null) {
Index: trunk/extensions/DeleteQueue/DeleteQueueInterface.php
@@ -35,7 +35,7 @@
3636
3737 if ($form) {
3838 $wgOut->addHTML( $form );
39 - $article->showLogExtract( $wgOut );
 39+// $article->showLogExtract( $wgOut );
4040 }
4141 }
4242
@@ -67,7 +67,7 @@
6868 $form = Xml::tags( 'form', array( 'action' => $article->mTitle->getLocalUrl(), 'method' => 'POST' ), $form );
6969
7070 $wgOut->addHTML( $form );
71 - $article->showLogExtract( $wgOut );
 71+// $article->showDeletionLog();
7272 }
7373
7474 /**

Status & tagging log