* (bug 9009) Add username entry field to Special:Contributions
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 6 Mar 2007 13:25:56 +0000 (13:25 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 6 Mar 2007 13:25:56 +0000 (13:25 +0000)
  based on a patch of Sui Min

RELEASE-NOTES
includes/SpecialContributions.php
includes/SpecialPage.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index d6ae979..9150d56 100644 (file)
@@ -248,7 +248,8 @@ lighter making things easier to read.
 * (bug 9155) Allow footer info to wrap in Monobook
 * (bug 8847) Strip spurious #fragments from request URI to fix redirect
   loops on some server configurations
-
+* (bug 9118) Show deletion log on confirmdelete
+* (bug 9009) Add username entry field to Special:Contributions
 
 == Languages updated ==
 
index 0a2ac33..a9db719 100644 (file)
@@ -199,13 +199,13 @@ function wfSpecialContributions( $par = null ) {
 
        $target = isset( $par ) ? $par : $wgRequest->getVal( 'target' );
        if ( !strlen( $target ) ) {
-               $wgOut->showErrorPage( 'notargettitle', 'notargettext' );
+               $wgOut->addHTML( contributionsForm( '' ) );
                return;
        }
 
        $nt = Title::newFromURL( $target );
        if ( !$nt ) {
-               $wgOut->showErrorPage( 'notargettitle', 'notargettext' );
+               $wgOut->addHTML( contributionsForm( '' ) );
                return;
        }
 
@@ -379,23 +379,20 @@ function contributionsForm( $options ) {
 
        $options['title'] = $wgTitle->getPrefixedText();
 
-       $f = "<form method='get' action=\"$wgScript\">\n";
+       $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
+
        foreach ( $options as $name => $value ) {
                if( $name === 'namespace') continue;
-               $f .= "\t" . wfElement( 'input', array(
-                       'name' => $name,
-                       'type' => 'hidden',
-                       'value' => $value ) ) . "\n";
+               $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
        }
 
-       $f .= '<p>' . wfMsgHtml( 'namespace' ) . ' ' .
-       HTMLnamespaceselector( $options['namespace'], '' ) .
-       wfElement( 'input', array(
-                       'type' => 'submit',
-                       'value' => wfMsg( 'allpagessubmit' ) )
-       ) .
-       "</p></form>\n";
-
+       $f .= '<fieldset>' .
+               Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
+               Xml::inputLabel( wfMsg( 'sp-contributions-username' ), 'target', 'target', 20 , $options['target']) . ' ' .
+               wfMsgHtml( 'namespace' ) . ' ' .
+               Xml::namespaceSelector( $options['namespace'], '' ) .
+               Xml::submitButton( wfMsg( 'ipblocklist-submit' ) ) .
+               '</fieldset></form>\n';
        return $f;
 }
 
index c184c06..9950715 100644 (file)
@@ -112,7 +112,7 @@ class SpecialPage
                'Prefixindex'               => array( 'IncludableSpecialPage', 'Prefixindex' ) ,
                'Ipblocklist'               => array( 'SpecialPage', 'Ipblocklist' ),
                'Specialpages'              => array( 'UnlistedSpecialPage', 'Specialpages' ),
-               'Contributions'             => array( 'UnlistedSpecialPage', 'Contributions' ),
+               'Contributions'             => array( 'SpecialPage', 'Contributions' ),
                'Emailuser'                 => array( 'UnlistedSpecialPage', 'Emailuser' ),
                'Whatlinkshere'             => array( 'UnlistedSpecialPage', 'Whatlinkshere' ),
                'Recentchangeslinked'       => array( 'UnlistedSpecialPage', 'Recentchangeslinked' ),
index f0ded3b..7c403c4 100644 (file)
@@ -1408,7 +1408,7 @@ Im [[Special:Log/delete|Lösch-Logbuch]] finden Sie eine Übersicht der kürzlic
 'contributions' => 'Benutzerbeiträge',
 'mycontris'     => 'Eigene Beiträge',
 'contribsub'    => 'Für $1',
-'nocontribs'    => 'Es wurden keine Änderungen für diese Kriterien gefunden.',
+'nocontribs'    => 'Es wurden keine Benutzerbeiträge mit diesen Kriterien gefunden.',
 'ucnote'        => 'Dies sind die letzten <b>$1</b> Beiträge des Benutzers in den letzten <b>$2</b> Tagen.',
 'uclinks'       => 'Zeige die letzten $1 Beiträge; zeige die letzten $2 Tage.',
 'uctop'         => ' (aktuell)',
@@ -1420,6 +1420,9 @@ Im [[Special:Log/delete|Lösch-Logbuch]] finden Sie eine Übersicht der kürzlic
 'sp-contributions-older'       => 'Ältere $1',
 'sp-contributions-newbies-sub' => 'Für Neulinge',
 'sp-contributions-blocklog'    => 'Sperrlogbuch',
+'sp-contributions-search'      => 'Suche nach Benutzerbeiträgen',
+'sp-contributions-username'    => 'IP-Adresse oder Benutzername:',
+'sp-contributions-submit'      => 'Suche',
 
 'sp-newimages-showfrom' => 'Zeige neue Dateien ab $1',
 
index 1066ae1..8853737 100644 (file)
@@ -1844,12 +1844,15 @@ Consult the [[Special:Log/delete|deletion log]] for a record of recent deletions
 'uctop'         => ' (top)' ,
 'newbies'       => 'newbies',
 
-'sp-contributions-newest' => 'Newest',
-'sp-contributions-oldest' => 'Oldest',
-'sp-contributions-newer'  => 'Newer $1',
-'sp-contributions-older'  => 'Older $1',
+'sp-contributions-newest'      => 'Newest',
+'sp-contributions-oldest'      => 'Oldest',
+'sp-contributions-newer'       => 'Newer $1',
+'sp-contributions-older'       => 'Older $1',
 'sp-contributions-newbies-sub' => 'For newbies',
 'sp-contributions-blocklog'    => 'Block log',
+'sp-contributions-search'      => 'Search for contributions',
+'sp-contributions-username'    => 'IP Address or username:',
+'sp-contributions-submit'      => 'Search',
 
 'sp-newimages-showfrom' => 'Show new images starting from $1',
 
index c3a2b5b..0007412 100644 (file)
@@ -1185,6 +1185,9 @@ $wgMessageStructure = array(
                'sp-contributions-older',
                'sp-contributions-newbies-sub',
                'sp-contributions-blocklog',
+               'sp-contributions-search',
+               'sp-contributions-username',
+               'sp-contributions-submit',
        ),
        'newimages-showfrom' => array(
                'sp-newimages-showfrom',