From: Ævar Arnfjörð Bjarmason Date: Fri, 1 Apr 2005 11:57:44 +0000 (+0000) Subject: * Changed the $invert datatype from 'integer' to 'bool' X-Git-Tag: 1.5.0alpha1~434 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=90fad19dee6b1fddf44f527ecc30d20a0c6d0fa7;p=lhc%2Fweb%2Fwiklou.git * Changed the $invert datatype from 'integer' to 'bool' * Documented --- diff --git a/includes/SpecialAllpages.php b/includes/SpecialAllpages.php index 99e457ff15..cfd9fc01fb 100644 --- a/includes/SpecialAllpages.php +++ b/includes/SpecialAllpages.php @@ -17,7 +17,7 @@ function wfSpecialAllpages( $par=NULL ) { # GET values $from = $wgRequest->getVal( 'from' ); $namespace = $wgRequest->getInt( 'namespace' ); - $invert = $wgRequest->getInt( 'invert' ); + $invert = $wgRequest->getBool( 'invert' ); $names = $wgContLang->getNamespaces(); @@ -50,8 +50,9 @@ function wfSpecialAllpages( $par=NULL ) { * HTML for the top form * @param integer $namespace A namespace constant (default NS_MAIN). * @param string $from Article name we are starting listing at. + * @param bool $invert true if we want the namespaces inverted (default false) */ -function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = 0) { +function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = false) { global $wgContLang, $wgScript; $t = Title::makeTitle( NS_SPECIAL, "Allpages" ); @@ -70,7 +71,7 @@ function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = 0) { . htmlspecialchars ( $from ) . '"/>'; $submitbutton = ''; - $invertbox = "'; + $invertbox = "'; $out = "
"; $out .= ''; @@ -80,8 +81,8 @@ function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = 0) { } /** - * @todo Document * @param integer $namespace (default NS_MAIN) + * @param bool $invert true if we want the namespaces inverted (default false) */ function indexShowToplevel ( $namespace = NS_MAIN, $invert = 0 ) { global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser; @@ -209,6 +210,11 @@ function indexShowline( $inpoint, $outpoint, $namespace = NS_MAIN ) { return ''.$out.''; } +/** + * @param integer $namespace (Default NS_MAIN) + * @param string $from list all pages from this name (default FALSE) + * @param bool $invert true if we want the namespaces inverted (default false) + */ function indexShowChunk( $namespace = NS_MAIN, $from, $invert ) { global $wgOut, $wgUser, $indexMaxperpage, $wgContLang; $sk = $wgUser->getSkin();