From dcc32272ef6da0cf0c1c1e3b813a70472a1d296f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 24 Feb 2006 18:43:32 +0000 Subject: [PATCH] * Javascript filter for Special:Allmessages --- RELEASE-NOTES | 1 + includes/SpecialAllmessages.php | 35 +++++++++++++++++++++++++-------- languages/Messages.php | 3 +++ 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index facbf03f9d..51937e9f82 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -364,6 +364,7 @@ Special Pages: list pages with less than this number of links. Defaults to 1. * (bug 4319) Don't show a "create account" link on the login form when account creation is disabled. +* Javascript filter for Special:Allmessages Misc.: * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect diff --git a/includes/SpecialAllmessages.php b/includes/SpecialAllmessages.php index eb03f84482..f0ccda6ec6 100644 --- a/includes/SpecialAllmessages.php +++ b/includes/SpecialAllmessages.php @@ -95,7 +95,23 @@ function makeHTMLText( $messages ) { $talk = $wgLang->getNsText( NS_TALK ); $mwnspace = $wgLang->getNsText( NS_MEDIAWIKI ); $mwtalk = $wgLang->getNsText( NS_MEDIAWIKI_TALK ); - $txt = " + + $input = wfElement( 'input', array( + 'type' => 'text', + 'id' => 'allmessagesinput', + 'onkeyup' => 'allmessagesfilter()',), + ''); + $checkbox = wfElement( 'input', array( + 'type' => 'checkbox', + 'id' => 'allmessagescheckbox', + 'onclick' => 'allmessagesmodified()',), + ''); + + $txt = ''; + + $txt .= " @@ -124,6 +140,8 @@ function makeHTMLText( $messages ) { wfProfileIn( "$fname-output" ); + $i = 0; + foreach( $messages as $key => $m ) { $title = $wgLang->ucfirst( $key ); @@ -140,9 +158,9 @@ function makeHTMLText( $messages ) { #$pageLink = $sk->makeLinkObj( $titleObj, htmlspecialchars( $key ) ); #$talkLink = $sk->makeLinkObj( $talkPage, htmlspecialchars( $talk ) ); if( isset( $pageExists[NS_MEDIAWIKI][$title] ) ) { - $pageLink = $sk->makeKnownLinkObj( $titleObj, htmlspecialchars( $key ) ); + $pageLink = $sk->makeKnownLinkObj( $titleObj, "" . htmlspecialchars( $key ) . "" ); } else { - $pageLink = $sk->makeBrokenLinkObj( $titleObj, htmlspecialchars( $key ) ); + $pageLink = $sk->makeBrokenLinkObj( $titleObj, "" . htmlspecialchars( $key ) . "" ); } if( isset( $pageExists[NS_MEDIAWIKI_TALK][$title] ) ) { $talkLink = $sk->makeKnownLinkObj( $talkPage, htmlspecialchars( $talk ) ); @@ -155,22 +173,22 @@ function makeHTMLText( $messages ) { if($changed) { - $txt .= - " + $txt .= " + - + "; } else { - $txt .= - " + $txt .= " + "; } + $i++; } $txt .= "
" . wfMsgHtml('allmessagesname') . "
$anchor$pageLink
$talkLink
$message
$mw
$anchor$pageLink
$talkLink
@@ -179,6 +197,7 @@ $mw
"; wfProfileOut( "$fname-output" ); diff --git a/languages/Messages.php b/languages/Messages.php index 9efbeed789..6dc24cd4bf 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -1383,6 +1383,9 @@ In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/{{Media 'allmessagestext' => 'This is a list of system messages available in the MediaWiki: namespace.', 'allmessagesnotsupportedUI' => 'Your current interface language $1 is not supported by Special:AllMessages at this site.', 'allmessagesnotsupportedDB' => 'Special:AllMessages not supported because wgUseDatabaseMessages is off.', +'allmessagesfilter' => 'Regular expression filter:', +'allmessagesmodified' => 'Show only modified', + # Thumbnails -- 2.20.1