Index: trunk/phase3/maintenance/generateSitemap.php |
— | — | @@ -221,11 +221,9 @@ |
222 | 222 | /** |
223 | 223 | * Get the priority of a given namespace |
224 | 224 | * |
225 | | - * @param int $namespace The namespace to get the priority for |
226 | | - + |
227 | | - * @return string |
| 225 | + * @param $namespace Integer: the namespace to get the priority for |
| 226 | + * @return String |
228 | 227 | */ |
229 | | - |
230 | 228 | function priority( $namespace ) { |
231 | 229 | return isset( $this->priorities[$namespace] ) ? $this->priorities[$namespace] : $this->guessPriority( $namespace ); |
232 | 230 | } |
— | — | @@ -235,9 +233,8 @@ |
236 | 234 | * default priority for the namespace, varies depending on whether it's |
237 | 235 | * a talkpage or not. |
238 | 236 | * |
239 | | - * @param int $namespace The namespace to get the priority for |
240 | | - * |
241 | | - * @return string |
| 237 | + * @param $namespace Integer: the namespace to get the priority for |
| 238 | + * @return String |
242 | 239 | */ |
243 | 240 | function guessPriority( $namespace ) { |
244 | 241 | return MWNamespace::isMain( $namespace ) ? $this->priorities[GS_MAIN] : $this->priorities[GS_TALK]; |
— | — | @@ -246,9 +243,8 @@ |
247 | 244 | /** |
248 | 245 | * Return a database resolution of all the pages in a given namespace |
249 | 246 | * |
250 | | - * @param int $namespace Limit the query to this namespace |
251 | | - * |
252 | | - * @return resource |
| 247 | + * @param $namespace Integer: limit the query to this namespace |
| 248 | + * @return Resource |
253 | 249 | */ |
254 | 250 | function getPageRes( $namespace ) { |
255 | 251 | return $this->dbr->select( 'page', |
— | — | @@ -264,10 +260,8 @@ |
265 | 261 | |
266 | 262 | /** |
267 | 263 | * Main loop |
268 | | - * |
269 | | - * @access public |
270 | 264 | */ |
271 | | - function main() { |
| 265 | + public function main() { |
272 | 266 | global $wgContLang; |
273 | 267 | |
274 | 268 | fwrite( $this->findex, $this->openIndex() ); |
— | — | @@ -323,7 +317,7 @@ |
324 | 318 | /** |
325 | 319 | * gzopen() / fopen() wrapper |
326 | 320 | * |
327 | | - * @return resource |
| 321 | + * @return Resource |
328 | 322 | */ |
329 | 323 | function open( $file, $flags ) { |
330 | 324 | return $this->compress ? gzopen( $file, $flags ) : fopen( $file, $flags ); |
— | — | @@ -352,12 +346,9 @@ |
353 | 347 | /** |
354 | 348 | * Get a sitemap filename |
355 | 349 | * |
356 | | - * @static |
357 | | - * |
358 | | - * @param int $namespace The namespace |
359 | | - * @param int $count The count |
360 | | - * |
361 | | - * @return string |
| 350 | + * @param $namespace Integer: the namespace |
| 351 | + * @param $count Integer: the count |
| 352 | + * @return String |
362 | 353 | */ |
363 | 354 | function sitemapFilename( $namespace, $count ) { |
364 | 355 | $ext = $this->compress ? '.gz' : ''; |
— | — | @@ -367,8 +358,6 @@ |
368 | 359 | /** |
369 | 360 | * Return the XML required to open an XML file |
370 | 361 | * |
371 | | - * @static |
372 | | - * |
373 | 362 | * @return string |
374 | 363 | */ |
375 | 364 | function xmlHead() { |
— | — | @@ -378,9 +367,7 @@ |
379 | 368 | /** |
380 | 369 | * Return the XML schema being used |
381 | 370 | * |
382 | | - * @static |
383 | | - * |
384 | | - * @returns string |
| 371 | + * @return String |
385 | 372 | */ |
386 | 373 | function xmlSchema() { |
387 | 374 | return 'http://www.sitemaps.org/schemas/sitemap/0.9'; |
— | — | @@ -389,7 +376,7 @@ |
390 | 377 | /** |
391 | 378 | * Return the XML required to open a sitemap index file |
392 | 379 | * |
393 | | - * @return string |
| 380 | + * @return String |
394 | 381 | */ |
395 | 382 | function openIndex() { |
396 | 383 | return $this->xmlHead() . '<sitemapindex xmlns="' . $this->xmlSchema() . '">' . "\n"; |
— | — | @@ -398,11 +385,8 @@ |
399 | 386 | /** |
400 | 387 | * Return the XML for a single sitemap indexfile entry |
401 | 388 | * |
402 | | - * @static |
403 | | - * |
404 | | - * @param string $filename The filename of the sitemap file |
405 | | - * |
406 | | - * @return string |
| 389 | + * @param $filename String: the filename of the sitemap file |
| 390 | + * @return String |
407 | 391 | */ |
408 | 392 | function indexEntry( $filename ) { |
409 | 393 | return |
— | — | @@ -415,9 +399,7 @@ |
416 | 400 | /** |
417 | 401 | * Return the XML required to close a sitemap index file |
418 | 402 | * |
419 | | - * @static |
420 | | - * |
421 | | - * @return string |
| 403 | + * @return String |
422 | 404 | */ |
423 | 405 | function closeIndex() { |
424 | 406 | return "</sitemapindex>\n"; |
— | — | @@ -426,7 +408,7 @@ |
427 | 409 | /** |
428 | 410 | * Return the XML required to open a sitemap file |
429 | 411 | * |
430 | | - * @return string |
| 412 | + * @return String |
431 | 413 | */ |
432 | 414 | function openFile() { |
433 | 415 | return $this->xmlHead() . '<urlset xmlns="' . $this->xmlSchema() . '">' . "\n"; |
— | — | @@ -435,13 +417,10 @@ |
436 | 418 | /** |
437 | 419 | * Return the XML for a single sitemap entry |
438 | 420 | * |
439 | | - * @static |
440 | | - * |
441 | | - * @param string $url An RFC 2396 compliant URL |
442 | | - * @param string $date A ISO 8601 date |
443 | | - * @param string $priority A priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize |
444 | | - * |
445 | | - * @return string |
| 421 | + * @param $url String: an RFC 2396 compliant URL |
| 422 | + * @param $date String: a ISO 8601 date |
| 423 | + * @param $priority String: a priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize |
| 424 | + * @return String |
446 | 425 | */ |
447 | 426 | function fileEntry( $url, $date, $priority ) { |
448 | 427 | return |
— | — | @@ -455,8 +434,7 @@ |
456 | 435 | /** |
457 | 436 | * Return the XML required to close sitemap file |
458 | 437 | * |
459 | | - * @static |
460 | | - * @return string |
| 438 | + * @return String |
461 | 439 | */ |
462 | 440 | function closeFile() { |
463 | 441 | return "</urlset>\n"; |