X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialRecentchangeslinked.php;h=f1df7c26cb933e8a575bba202d9b6318c7ee068d;hb=4e19e889aa6461b31514543d21248551e5c2f993;hp=5b56a91ced35a31b6336f72ff305a0d5e21b8c27;hpb=41c8b7bf722b603d77b07ec2184b3a9fe8b7c2c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index 5b56a91ced..f1df7c26cb 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -1,10 +1,22 @@ getInt( 'days' ); $target = $wgRequest->getText( 'target' ); @@ -16,33 +28,33 @@ function wfSpecialRecentchangeslinked( $par = NULL ) if( $par ) { $target = $par; } - if ( "" == $target ) { - $wgOut->errorpage( "notargettitle", "notargettext" ); + if ( $target == '') { + $wgOut->errorpage( 'notargettitle', 'notargettext' ); return; } $nt = Title::newFromURL( $target ); if( !$nt ) { - $wgOut->errorpage( "notargettitle", "notargettext" ); + $wgOut->errorpage( 'notargettitle', 'notargettext' ); return; } $id = $nt->getArticleId(); - $wgOut->setSubtitle( wfMsg( "rclsub", $nt->getPrefixedText() ) ); + $wgOut->setSubtitle( wfMsg( 'rclsub', $nt->getPrefixedText() ) ); if ( ! $days ) { - $days = $wgUser->getOption( "rcdays" ); + $days = $wgUser->getOption( 'rcdays' ); if ( ! $days ) { $days = 7; } } $days = (int)$days; - list( $limit, $offset ) = wfCheckLimits( 100, "rclimit" ); + list( $limit, $offset ) = wfCheckLimits( 100, 'rclimit' ); $dbr =& wfGetDB( DB_SLAVE ); $cutoff = $dbr->timestamp( time() - ( $days * 86400 ) ); $hideminor = ($hideminor ? 1 : 0); if ( $hideminor ) { - $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Recentchangeslinked" ), - WfMsg( "show" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) . + $mlink = $sk->makeKnownLink( $wgLang->specialPage( 'Recentchangeslinked' ), + WfMsg( 'show' ), 'target=' . htmlspecialchars( $nt->getPrefixedURL() ) . "&days={$days}&limit={$limit}&hideminor=0" ); } else { $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Recentchangeslinked" ), @@ -50,15 +62,16 @@ function wfSpecialRecentchangeslinked( $par = NULL ) "&days={$days}&limit={$limit}&hideminor=1" ); } if ( $hideminor ) { - $cmq = "AND cur_minor_edit=0"; - } else { $cmq = ""; } + $cmq = 'AND cur_minor_edit=0'; + } else { $cmq = ''; } extract( $dbr->tableNames( 'cur', 'links' ) ); $sql = "SELECT cur_id,cur_namespace,cur_title,cur_user,cur_comment," . "cur_user_text,cur_timestamp,cur_minor_edit,cur_is_new FROM $links, $cur " . "WHERE cur_timestamp > '{$cutoff}' {$cmq} AND l_to=cur_id AND l_from=$id " . - "GROUP BY cur_id ORDER BY inverse_timestamp LIMIT {$limit}"; + "GROUP BY cur_id,cur_namespace,cur_title,cur_user,cur_comment,cur_user_text," . + "cur_timestamp,cur_minor_edit,cur_is_new,inverse_timestamp ORDER BY inverse_timestamp LIMIT {$limit}"; $res = $dbr->query( $sql, $fname ); $wgOut->addHTML("< ".$sk->makeKnownLinkObj($nt, "", "redirect=no" )."
\n"); @@ -69,7 +82,7 @@ function wfSpecialRecentchangeslinked( $par = NULL ) "target=" . $nt->getPrefixedURL() . "&hideminor={$hideminor}", false, $mlink ); - $wgOut->addHTML( "{$note}\n" ); + $wgOut->addHTML( $note."\n" ); $s = $sk->beginRecentChangesList(); $count = $dbr->numRows( $res );