Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -345,7 +345,6 @@ |
346 | 346 | // If an edit was hidden from a page give a review link to the history |
347 | 347 | } else if( self::typeAction($row,array('delete','suppress'),'revision','deleterevision') ) { |
348 | 348 | if( count($paramArray) >= 2 ) { |
349 | | - $revdel = SpecialPage::getTitleFor( 'Revisiondelete' ); |
350 | 349 | // Different revision types use different URL params... |
351 | 350 | $key = $paramArray[0]; |
352 | 351 | // $paramArray[1] is a CSV of the IDs |
— | — | @@ -353,21 +352,37 @@ |
354 | 353 | $query = $paramArray[1]; |
355 | 354 | $revert = array(); |
356 | 355 | // Diff link for single rev deletions |
357 | | - if( ( $key === 'oldid' || $key == 'revision' ) && count($Ids) == 1 ) { |
358 | | - $revert[] = $this->skin->link( |
359 | | - $title, |
360 | | - $this->message['diff'], |
361 | | - array(), |
362 | | - array( |
363 | | - 'diff' => intval( $Ids[0] ), |
364 | | - 'unhide' => 1 |
365 | | - ), |
366 | | - array( 'known', 'noclasses' ) |
367 | | - ); |
| 356 | + if( count($Ids) == 1 ) { |
| 357 | + // Live revision diffs... |
| 358 | + if( in_array($key, array('oldid','revision')) ) { |
| 359 | + $revert[] = $this->skin->link( |
| 360 | + $title, |
| 361 | + $this->message['diff'], |
| 362 | + array(), |
| 363 | + array( |
| 364 | + 'diff' => intval( $Ids[0] ), |
| 365 | + 'unhide' => 1 |
| 366 | + ), |
| 367 | + array( 'known', 'noclasses' ) |
| 368 | + ); |
| 369 | + // Deleted revision diffs... |
| 370 | + } else if( in_array($key, array('artimestamp','archive')) ) { |
| 371 | + $revert[] = $this->skin->link( |
| 372 | + SpecialPage::getTitleFor( 'Undelete' ), |
| 373 | + $this->message['diff'], |
| 374 | + array(), |
| 375 | + array( |
| 376 | + 'target' => $title->getPrefixedDBKey(), |
| 377 | + 'diff' => 'prev', |
| 378 | + 'timestamp' => $Ids[0] |
| 379 | + ), |
| 380 | + array( 'known', 'noclasses' ) |
| 381 | + ); |
| 382 | + } |
368 | 383 | } |
369 | 384 | // View/modify link... |
370 | 385 | $revert[] = $this->skin->link( |
371 | | - $revdel, |
| 386 | + SpecialPage::getTitleFor( 'Revisiondelete' ), |
372 | 387 | $this->message['revdel-restore'], |
373 | 388 | array(), |
374 | 389 | array( |
— | — | @@ -377,7 +392,6 @@ |
378 | 393 | ), |
379 | 394 | array( 'known', 'noclasses' ) |
380 | 395 | ); |
381 | | - |
382 | 396 | // Pipe links |
383 | 397 | $revert = wfMsg( 'parentheses', $wgLang->pipeList( $revert ) ); |
384 | 398 | } |