* Add form to RCLinked and add to sp:specialpages
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 13 Apr 2008 05:54:20 +0000 (05:54 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 13 Apr 2008 05:54:20 +0000 (05:54 +0000)
* Add WLH back to the list

includes/SpecialPage.php
includes/SpecialRecentchangeslinked.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 246f80a..31f2b38 100644 (file)
@@ -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' ),
index ee01dfa..96e8a14 100644 (file)
@@ -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 );
index 2081db4..78c1a6b 100644 (file)
@@ -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',
index 25ae3bf..a2ae5b1 100644 (file)
@@ -869,6 +869,7 @@ $wgMessageStructure = array(
                'recentchangeslinked-title',
                'recentchangeslinked-noresult',
                'recentchangeslinked-summary',
+               'recentchangeslinked-page',
        ),
        'upload' => array(
                'upload',