Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -164,6 +164,13 @@ |
165 | 165 | function generateNamespaces() { |
166 | 166 | $fname = 'GenerateSitemap::generateNamespaces'; |
167 | 167 | |
| 168 | + // Only generate for specific namespaces if $wgSitemapNamespaces is an array. |
| 169 | + global $wgSitemapNamespaces; |
| 170 | + if( is_array( $wgSitemapNamespaces ) ) { |
| 171 | + $this->namespaces = $wgSitemapNamespaces; |
| 172 | + return; |
| 173 | + } |
| 174 | + |
168 | 175 | $res = $this->dbr->select( 'page', |
169 | 176 | array( 'page_namespace' ), |
170 | 177 | array(), |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -3038,3 +3038,10 @@ |
3039 | 3039 | * such as PAGESINCATEGORY. |
3040 | 3040 | */ |
3041 | 3041 | $wgExpensiveParserFunctionLimit = 100; |
| 3042 | + |
| 3043 | +/** |
| 3044 | + * Array of namespaces to generate a sitemap for when the |
| 3045 | + * maintenance/generateSitemap.php script is run, or false |
| 3046 | + * if one is to be generated for all namespaces. |
| 3047 | + */ |
| 3048 | +$wgSitemapNamespaces = false; |
\ No newline at end of file |