From 98c66071a35d14a1e396e248796295f91bacf7e9 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 13 Apr 2008 05:54:20 +0000 Subject: [PATCH] * Add form to RCLinked and add to sp:specialpages * Add WLH back to the list --- includes/SpecialPage.php | 4 ++-- includes/SpecialRecentchangeslinked.php | 16 +++++++++++++--- languages/messages/MessagesEn.php | 3 ++- maintenance/language/messages.inc | 1 + 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 246f80a785..31f2b38696 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -125,8 +125,8 @@ class SpecialPage 'Specialpages' => array( 'UnlistedSpecialPage', 'Specialpages' ), 'Contributions' => array( 'SpecialPage', 'Contributions' ), 'Emailuser' => array( 'UnlistedSpecialPage', 'Emailuser' ), - 'Whatlinkshere' => array( 'UnlistedSpecialPage', 'Whatlinkshere' ), - 'Recentchangeslinked' => array( 'UnlistedSpecialPage', 'Recentchangeslinked' ), + 'Whatlinkshere' => array( 'SpecialPage', 'Whatlinkshere' ), + 'Recentchangeslinked' => array( 'SpecialPage', 'Recentchangeslinked' ), 'Movepage' => array( 'UnlistedSpecialPage', 'Movepage' ), 'Blockme' => array( 'UnlistedSpecialPage', 'Blockme' ), 'Resetpass' => array( 'UnlistedSpecialPage', 'Resetpass' ), diff --git a/includes/SpecialRecentchangeslinked.php b/includes/SpecialRecentchangeslinked.php index ee01dfa3e7..96e8a14766 100644 --- a/includes/SpecialRecentchangeslinked.php +++ b/includes/SpecialRecentchangeslinked.php @@ -14,7 +14,7 @@ require_once( 'SpecialRecentchanges.php' ); * @param string $par parent page we will look at */ function wfSpecialRecentchangeslinked( $par = NULL ) { - global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgTitle; + global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgTitle, $wgScript; $fname = 'wfSpecialRecentchangeslinked'; $days = $wgRequest->getInt( 'days' ); @@ -24,8 +24,18 @@ function wfSpecialRecentchangeslinked( $par = NULL ) { $wgOut->setPagetitle( wfMsg( 'recentchangeslinked' ) ); $sk = $wgUser->getSkin(); - if (is_null($target)) { - $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); + $wgOut->addHTML( + Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', array(), wfMsg( 'recentchangeslinked' ) ) . "\n" . + Xml::inputLabel( wfMsg( 'recentchangeslinked-page' ), 'target', 'recentchangeslinked-target', 40, $target ) . + Xml::hidden( 'title', $wgTitle->getPrefixedText() ). "\n" . + Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . + Xml::closeElement( 'fieldset' ) . + Xml::closeElement( 'form' ) . "\n" + ); + + if ( !$target ) { return; } $nt = Title::newFromURL( $target ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 2081db4ce8..78c1a6b641 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1477,10 +1477,11 @@ An unchecked box means the user is not in that group.', # Recent changes linked 'recentchangeslinked' => 'Related changes', -'recentchangeslinked-title' => 'Changes related to $1', +'recentchangeslinked-title' => 'Changes related to "$1"', 'recentchangeslinked-noresult' => 'No changes on linked pages during the given period.', 'recentchangeslinked-summary' => "This special page lists the last changes on pages who are linked. Pages on your watchlist are '''bold'''.", +'recentchangeslinked-page' => 'Page name', # Upload 'upload' => 'Upload file', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 25ae3bf243..a2ae5b1127 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -869,6 +869,7 @@ $wgMessageStructure = array( 'recentchangeslinked-title', 'recentchangeslinked-noresult', 'recentchangeslinked-summary', + 'recentchangeslinked-page', ), 'upload' => array( 'upload', -- 2.20.1