Index: trunk/phase3/includes/SpecialAllpages.php |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | # GET values |
19 | 19 | $from = $wgRequest->getVal( 'from' ); |
20 | 20 | $namespace = $wgRequest->getInt( 'namespace' ); |
21 | | - $invert = $wgRequest->getInt( 'invert' ); |
| 21 | + $invert = $wgRequest->getBool( 'invert' ); |
22 | 22 | |
23 | 23 | $names = $wgContLang->getNamespaces(); |
24 | 24 | |
— | — | @@ -50,8 +50,9 @@ |
51 | 51 | * HTML for the top form |
52 | 52 | * @param integer $namespace A namespace constant (default NS_MAIN). |
53 | 53 | * @param string $from Article name we are starting listing at. |
| 54 | + * @param bool $invert true if we want the namespaces inverted (default false) |
54 | 55 | */ |
55 | | -function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = 0) { |
| 56 | +function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = false) { |
56 | 57 | global $wgContLang, $wgScript; |
57 | 58 | $t = Title::makeTitle( NS_SPECIAL, "Allpages" ); |
58 | 59 | |
— | — | @@ -70,7 +71,7 @@ |
71 | 72 | . htmlspecialchars ( $from ) . '"/>'; |
72 | 73 | $submitbutton = '<input type="submit" value="' . wfMsg( 'allpagessubmit' ) . '" />'; |
73 | 74 | |
74 | | - $invertbox = "<input type='checkbox' name='invert' value='1'" . ( $invert == 1 ? ' checked="checked"' : '' ) . ' />'; |
| 75 | + $invertbox = "<input type='checkbox' name='invert' value='1'" . ( $invert ? ' checked="checked"' : '' ) . ' />'; |
75 | 76 | |
76 | 77 | $out = "<div class='namespaceselector'><form method='get' action='{$wgScript}'>"; |
77 | 78 | $out .= '<input type="hidden" name="title" value="'.$t->getPrefixedText().'" />'; |
— | — | @@ -80,8 +81,8 @@ |
81 | 82 | } |
82 | 83 | |
83 | 84 | /** |
84 | | - * @todo Document |
85 | 85 | * @param integer $namespace (default NS_MAIN) |
| 86 | + * @param bool $invert true if we want the namespaces inverted (default false) |
86 | 87 | */ |
87 | 88 | function indexShowToplevel ( $namespace = NS_MAIN, $invert = 0 ) { |
88 | 89 | global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser; |
— | — | @@ -209,6 +210,11 @@ |
210 | 211 | return '<tr><td align="right">'.$out.'</td></tr>'; |
211 | 212 | } |
212 | 213 | |
| 214 | +/** |
| 215 | + * @param integer $namespace (Default NS_MAIN) |
| 216 | + * @param string $from list all pages from this name (default FALSE) |
| 217 | + * @param bool $invert true if we want the namespaces inverted (default false) |
| 218 | + */ |
213 | 219 | function indexShowChunk( $namespace = NS_MAIN, $from, $invert ) { |
214 | 220 | global $wgOut, $wgUser, $indexMaxperpage, $wgContLang; |
215 | 221 | $sk = $wgUser->getSkin(); |