From d849cf0a1c4f75a2bf14b4a945b0eae1ef4fa5be Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 3 May 2005 18:27:40 +0000 Subject: [PATCH] * Fixed a small bug ($names wasn't being declared) * Using inline XHTML rather than XHTML in a system message --- includes/SpecialAllpages.php | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index feef77f940..87a24d6ea2 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -18,19 +18,19 @@ function wfSpecialAllpages( $par=NULL ) { $namespace = $wgRequest->getInt( 'namespace' ); $invert = $wgRequest->getBool( 'invert' ); - $namespaces = array_keys($wgContLang->getNamespaces()); + $namespaces = $wgContLang->getNamespaces(); - if( !in_array($namespace, $namespaces) ) + if( !in_array($namespace, array_keys($namespaces)) ) $namespace = 0; if ($invert) { $wgOut->setPagetitle( $namespace > 0 ? - wfMsg( 'allnotinnamespace', $names[$namespace] ) : + wfMsg( 'allnotinnamespace', $namespaces[$namespace] ) : wfMsg( 'allnonarticles' ) ); } else { $wgOut->setPagetitle( $namespace > 0 ? - wfMsg( 'allinnamespace', $names[$namespace] ) : + wfMsg( 'allinnamespace', $namespaces[$namespace] ) : wfMsg( 'allarticles' ) ); } @@ -54,7 +54,7 @@ function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert ) { global $wgContLang, $wgScript; $t = Title::makeTitle( NS_SPECIAL, "Allpages" ); - $namespaceselect = '"; $arr = $wgContLang->getFormattedNamespaces(); foreach ( $arr as $ns => $name ) { if ($ns < NS_MAIN) @@ -65,17 +65,32 @@ function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert ) { } $namespaceselect .= ''; - $frombox = ''; $submitbutton = ''; - $invertbox = "'; + $invertbox = "'; $out = "
"; $out .= ''; - $out .= wfMsg ( 'allpagesformtext', $frombox, $namespaceselect, $submitbutton, $invertbox ); + $out .= " + + + + + + + + + + + + + +
" . wfMsg('allpagesfrom') . "
$namespaceselect $submitbutton
$invertbox
+"; $out .= '
'; - return $out; + return $out; } /** -- 2.20.1