more cssification of diff rendering, some " -> ' in diff engine
[lhc/web/wiklou.git] / includes / SpecialContributions.php
index 6c954a3..04cca8c 100644 (file)
@@ -2,7 +2,7 @@
 
 function wfSpecialContributions( $par = "" )
 {
-       global $wgUser, $wgOut, $wgLang, $wgRequest;
+       global $wgUser, $wgOut, $wgLang, $wgRequest, $wgIsPg;
        $fname = "wfSpecialContributions";
        $sysop = $wgUser->isSysop();
 
@@ -53,13 +53,14 @@ function wfSpecialContributions( $par = "" )
                  "&offset={$offset}&limit={$limit}&hideminor=1" );
        }
 
+       $oldtable=$wgIsPg?'"old"':'old';
        if ( 0 == $id ) {
                $sql = "SELECT cur_namespace,cur_title,cur_timestamp,cur_comment,cur_minor_edit,cur_is_new FROM cur " .
                  "WHERE cur_user_text='" . wfStrencode( $nt->getText() ) . "' {$cmq} " .
                  "ORDER BY inverse_timestamp LIMIT {$querylimit}";
                $res1 = wfQuery( $sql, DB_READ, $fname );
 
-               $sql = "SELECT old_namespace,old_title,old_timestamp,old_comment,old_minor_edit FROM old " .
+               $sql = "SELECT old_namespace,old_title,old_timestamp,old_comment,old_minor_edit FROM $oldtable " .
                  "WHERE old_user_text='" . wfStrencode( $nt->getText() ) . "' {$omq} " .
                  "ORDER BY inverse_timestamp LIMIT {$querylimit}";
                $res2 = wfQuery( $sql, DB_READ, $fname );
@@ -68,7 +69,7 @@ function wfSpecialContributions( $par = "" )
                  "WHERE cur_user={$id} {$cmq} ORDER BY inverse_timestamp LIMIT {$querylimit}";
                $res1 = wfQuery( $sql, DB_READ, $fname );
 
-               $sql = "SELECT old_namespace,old_title,old_timestamp,old_comment,old_minor_edit FROM old " .
+               $sql = "SELECT old_namespace,old_title,old_timestamp,old_comment,old_minor_edit FROM $oldtable " .
                  "WHERE old_user={$id} {$omq} ORDER BY inverse_timestamp LIMIT {$querylimit}";
                $res2 = wfQuery( $sql, DB_READ, $fname );
        }
@@ -84,7 +85,7 @@ function wfSpecialContributions( $par = "" )
          ($nCur + $nOld) <= $offlimit);
 
         $shm = wfMsg( "showhideminor", $mlink );
-       $wgOut->addHTML( "<br>{$sl} ($shm) \n");
+       $wgOut->addHTML( "<br />{$sl} ($shm)</p>\n");
 
 
        if ( 0 == $nCur && 0 == $nOld ) {
@@ -149,7 +150,7 @@ TODO: This would probably look a lot nicer in a table.
 */
 function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
 {
-       global $wgLang, $wgOut, $wgUser, $wgRequest, $target;
+       global $wgLang, $wgOut, $wgUser, $wgRequest;
        $page = Title::makeName( $ns, $t );
        $link = $sk->makeKnownLink( $page, "" );
        $topmarktext="";
@@ -162,6 +163,7 @@ function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
                $sysop = $wgUser->isSysop();
                if($sysop ) {
                        $extraRollback = $wgRequest->getBool( "bot" ) ? '&bot=1' : '';
+                       $target = $wgRequest->getText( 'target' );
                        $topmarktext .= " [". $sk->makeKnownLink( $page,
                        wfMsg( "rollbacklink" ),
                        "action=rollback&from=" . urlencode( $target ) . $extraRollback ) ."]";
@@ -188,8 +190,9 @@ function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew )
 
 function ucCountLink( $lim, $d )
 {
-       global $wgUser, $wgLang, $target;
+       global $wgUser, $wgLang, $wgRequest;
 
+       $target = $wgRequest->getText( 'target' );
        $sk = $wgUser->getSkin();
        $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
          "{$lim}", "target={$target}&days={$d}&limit={$lim}" );
@@ -198,8 +201,9 @@ function ucCountLink( $lim, $d )
 
 function ucDaysLink( $lim, $d )
 {
-       global $wgUser, $wgLang, $target;
+       global $wgUser, $wgLang, $wgRequest;
 
+       $target = $wgRequest->getText( 'target' );
        $sk = $wgUser->getSkin();
        $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ),
          "{$d}", "target={$target}&days={$d}&limit={$lim}" );