-<?
+<?php
include_once( "SpecialRecentchanges.php" );
function wfSpecialRecentchangeslinked( $par = NULL )
{
- global $wgUser, $wgOut, $wgLang, $wgTitle;
- global $days, $target, $hideminor; # From query string
+ global $wgUser, $wgOut, $wgLang, $wgTitle, $wgRequest;
$fname = "wfSpecialRecentchangeslinked";
+ $days = $wgRequest->getInt( 'days' );
+ $target = $wgRequest->getText( 'target' );
+ $hideminor = $wgRequest->getBool( 'hideminor' ) ? 1 : 0;
+
$wgOut->setPagetitle( wfMsg( "recentchanges" ) );
$sk = $wgUser->getSkin();
return;
}
$nt = Title::newFromURL( $target );
+ if( !$nt ) {
+ $wgOut->errorpage( "notargettitle", "notargettext" );
+ return;
+ }
+ $id = $nt->getArticleId();
+
$wgOut->setSubtitle( wfMsg( "rclsub", $nt->getPrefixedText() ) );
if ( ! $days ) {
$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='" .
- wfStrencode( $nt->getPrefixedDBkey() ) . "' GROUP BY cur_id " .
- "ORDER BY inverse_timestamp LIMIT {$limit}";
+ "WHERE cur_timestamp > '{$cutoff}' {$cmq} AND l_to=cur_id AND l_from=$id " .
+ "GROUP BY cur_id ORDER BY inverse_timestamp LIMIT {$limit}";
$res = wfQuery( $sql, DB_READ, $fname );
$note = wfMsg( "rcnote", $limit, $days );