remove inverse_timestamp wherever it is found and disable wfInvertTimestamp()
[lhc/web/wiklou.git] / includes / SpecialContributions.php
index 2467158..bda7a3c 100644 (file)
@@ -58,7 +58,7 @@ function wfSpecialContributions( $par = '' ) {
        }
        $talk = $nt->getTalkPage();
        if( $talk ) {
-               $ul .= ' (' . $sk->makeLinkObj( $talk, $wgLang->getNsText(Namespace::getTalk(0)) ) . ')';
+               $ul .= ' (' . $sk->makeLinkObj( $talk, $wgLang->getNsText( NS_TALK ) ) . ')';
        }
 
 
@@ -97,12 +97,14 @@ function wfSpecialContributions( $par = '' ) {
                $index = 'user_timestamp';
        }
 
+
+       $use_index = $dbr->useIndexClause( $index );
        $sql = "SELECT
                page_namespace,page_title,page_is_new,page_latest,
                rev_id,rev_timestamp,rev_comment,rev_minor_edit,rev_user_text
-               FROM $page,$revision USE INDEX($index)
+               FROM $page,$revision $use_index
                WHERE page_id=rev_page AND $condition $minorQuery " .
-         "ORDER BY inverse_timestamp LIMIT {$querylimit}";
+         "ORDER BY rev_timestamp DESC LIMIT {$querylimit}";
        $res = $dbr->query( $sql, $fname );
        $numRows = $dbr->numRows( $res );
 
@@ -140,15 +142,6 @@ function wfSpecialContributions( $par = '' ) {
        }
        $wgOut->addHTML( "</ul>\n" );
 
-       # Validations
-       global $wgUseValidation;
-       if( $wgUseValidation ) {
-               require_once( 'SpecialValidate.php' );
-               $val = new Validation ;
-               $val = $val->countUserValidations ( $id ) ;
-               $wgOut->addHTML( wfMsg ( 'val_user_validations', $val ) );
-       }
-
        $wgOut->addHTML( "<br />{$sl} ($shm)\n");
 }
 
@@ -194,6 +187,8 @@ function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew, $t
                
                if( $wgUser->isAllowed('rollback') ) {
                        $extraRollback = $wgRequest->getBool( 'bot' ) ? '&bot=1' : '';
+                       $extraRollback .= '&token=' . urlencode(
+                               $wgUser->editToken( array( $page->getPrefixedText(), $target ) ) );
                        # $target = $wgRequest->getText( 'target' );
                        $topmarktext .= ' ['. $sk->makeKnownLinkObj( $page,
                                $messages['rollbacklink'],