From ae3513feae7f4764b5c79f12cc0dc349802ad936 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 6 Mar 2007 13:25:56 +0000 Subject: [PATCH] * (bug 9009) Add username entry field to Special:Contributions based on a patch of Sui Min --- RELEASE-NOTES | 3 ++- includes/SpecialContributions.php | 27 ++++++++++++--------------- includes/SpecialPage.php | 2 +- languages/messages/MessagesDe.php | 5 ++++- languages/messages/MessagesEn.php | 11 +++++++---- maintenance/language/messages.inc | 3 +++ 6 files changed, 29 insertions(+), 22 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d6ae979041..9150d56535 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index 0a2ac33198..a9db7196b9 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -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 = "
\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 .= '

' . wfMsgHtml( 'namespace' ) . ' ' . - HTMLnamespaceselector( $options['namespace'], '' ) . - wfElement( 'input', array( - 'type' => 'submit', - 'value' => wfMsg( 'allpagessubmit' ) ) - ) . - "

\n"; - + $f .= '
' . + 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' ) ) . + '
\n'; return $f; } diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index c184c06dd0..9950715f1d 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -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' ), diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index f0ded3b191..7c403c465e 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -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 $1 Beiträge des Benutzers in den letzten $2 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', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 1066ae188c..8853737e2e 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index c3a2b5b9b0..0007412298 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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', -- 2.20.1