- if( count($paramArray) >= 2 ) {
- // Different revision types use different URL params...
- $key = $paramArray[0];
- // $paramArray[1] is a CSV of the IDs
- $Ids = explode( ',', $paramArray[1] );
- $query = $paramArray[1];
- $revert = array();
- // Diff link for single rev deletions
- if( count($Ids) == 1 ) {
- // Live revision diffs...
- if( in_array( $key, array( 'oldid', 'revision' ) ) ) {
- $revert[] = $this->skin->link(
- $title,
- $this->message['diff'],
- array(),
- array(
- 'diff' => intval( $Ids[0] ),
- 'unhide' => 1
- ),
- array( 'known', 'noclasses' )
- );
- // Deleted revision diffs...
- } else if( in_array( $key, array( 'artimestamp','archive' ) ) ) {
- $revert[] = $this->skin->link(
- SpecialPage::getTitleFor( 'Undelete' ),
- $this->message['diff'],
- array(),
- array(
- 'target' => $title->getPrefixedDBKey(),
- 'diff' => 'prev',
- 'timestamp' => $Ids[0]
- ),
- array( 'known', 'noclasses' )
- );
- }
- }
- // View/modify link...
- $revert[] = $this->skin->link(
- SpecialPage::getTitleFor( 'Revisiondelete' ),
- $this->message['revdel-restore'],
- array(),
- array(
- 'target' => $title->getPrefixedText(),
- 'type' => $key,
- 'ids' => $query
- ),
- array( 'known', 'noclasses' )
- );
- // Pipe links
- $revert = wfMsg( 'parentheses', $wgLang->pipeList( $revert ) );
- }