Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -1,6 +1,4 @@ |
2 | 2 | <?php |
3 | | -define( 'GS_MAIN', -2 ); |
4 | | -define( 'GS_TALK', -1 ); |
5 | 3 | /** |
6 | 4 | * Creates a sitemap for the site |
7 | 5 | * |
— | — | @@ -31,6 +29,9 @@ |
32 | 30 | require_once( dirname( __FILE__ ) . '/Maintenance.php' ); |
33 | 31 | |
34 | 32 | class GenerateSitemap extends Maintenance { |
| 33 | + const GS_MAIN = -2; |
| 34 | + const GS_TALK = -1; |
| 35 | + |
35 | 36 | /** |
36 | 37 | * The maximum amount of urls in a sitemap file |
37 | 38 | * |
— | — | @@ -153,9 +154,9 @@ |
154 | 155 | |
155 | 156 | private function setNamespacePriorities() { |
156 | 157 | // Custom main namespaces |
157 | | - $this->priorities[GS_MAIN] = '0.5'; |
| 158 | + $this->priorities[self::GS_MAIN] = '0.5'; |
158 | 159 | // Custom talk namesspaces |
159 | | - $this->priorities[GS_TALK] = '0.1'; |
| 160 | + $this->priorities[self::GS_TALK] = '0.1'; |
160 | 161 | // MediaWiki standard namespaces |
161 | 162 | $this->priorities[NS_MAIN] = '1.0'; |
162 | 163 | $this->priorities[NS_TALK] = '0.1'; |
— | — | @@ -234,7 +235,7 @@ |
235 | 236 | * @return String |
236 | 237 | */ |
237 | 238 | function guessPriority( $namespace ) { |
238 | | - return MWNamespace::isMain( $namespace ) ? $this->priorities[GS_MAIN] : $this->priorities[GS_TALK]; |
| 239 | + return MWNamespace::isMain( $namespace ) ? $this->priorities[self::GS_MAIN] : $this->priorities[self::GS_TALK]; |
239 | 240 | } |
240 | 241 | |
241 | 242 | /** |