Index: trunk/phase3/includes/SpecialAllpages.php |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | * @param string $from Article name we are starting listing at. |
54 | 54 | * @param bool $invert true if we want the namespaces inverted (default false) |
55 | 55 | */ |
56 | | -function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert = false) { |
| 56 | +function namespaceForm ( $namespace = NS_MAIN, $from = '', $invert ) { |
57 | 57 | global $wgContLang, $wgScript; |
58 | 58 | $t = Title::makeTitle( NS_SPECIAL, "Allpages" ); |
59 | 59 | |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | * @param integer $namespace (default NS_MAIN) |
86 | 86 | * @param bool $invert true if we want the namespaces inverted (default false) |
87 | 87 | */ |
88 | | -function indexShowToplevel ( $namespace = NS_MAIN, $invert = 0 ) { |
| 88 | +function indexShowToplevel ( $namespace = NS_MAIN, $invert ) { |
89 | 89 | global $wgOut, $indexMaxperpage, $toplevelMaxperpage, $wgContLang, $wgRequest, $wgUser; |
90 | 90 | $sk = $wgUser->getSkin(); |
91 | 91 | $fname = "indexShowToplevel"; |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | while ( count ( $lines ) > 0 ) { |
152 | 152 | $inpoint = array_shift ( $lines ); |
153 | 153 | $outpoint = array_shift ( $lines ); |
154 | | - $out .= indexShowline ( $inpoint, $outpoint, $namespace ); |
| 154 | + $out .= indexShowline ( $inpoint, $outpoint, $namespace, $invert ); |
155 | 155 | } |
156 | 156 | $out .= '</table>'; |
157 | 157 | |
— | — | @@ -190,15 +190,16 @@ |
191 | 191 | * @todo Document |
192 | 192 | * @param string $from |
193 | 193 | * @param integer $namespace (Default NS_MAIN) |
| 194 | + * @param bool $invert true if we want the namespaces inverted (default false) |
194 | 195 | */ |
195 | | -function indexShowline( $inpoint, $outpoint, $namespace = NS_MAIN ) { |
| 196 | +function indexShowline( $inpoint, $outpoint, $namespace = NS_MAIN, $invert ) { |
196 | 197 | global $wgOut, $wgLang, $wgUser; |
197 | 198 | $sk = $wgUser->getSkin(); |
198 | 199 | $dbr =& wfGetDB( DB_SLAVE ); |
199 | 200 | |
200 | 201 | $inpointf = htmlspecialchars( str_replace( '_', ' ', $inpoint ) ); |
201 | 202 | $outpointf = htmlspecialchars( str_replace( '_', ' ', $outpoint ) ); |
202 | | - $queryparams = $namespace ? ('namespace='.intval($namespace)) : ''; |
| 203 | + $queryparams = ($namespace ? ('namespace='.intval($namespace)) : '') . ($invert ? "&invert=$invert" : ''); |
203 | 204 | $special = Title::makeTitle( NS_SPECIAL, 'Allpages/' . $inpoint ); |
204 | 205 | $link = $special->escapeLocalUrl( $queryparams ); |
205 | 206 | |