Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php |
— | — | @@ -384,7 +384,6 @@ |
385 | 385 | $str = substr( $str, 2 ); # to remove leading ', ' |
386 | 386 | return $str; |
387 | 387 | } |
388 | | - |
389 | 388 | } |
390 | 389 | |
391 | 390 | /** |
— | — | @@ -403,50 +402,48 @@ |
404 | 403 | var $priority = ''; |
405 | 404 | |
406 | 405 | function __construct( $url, $pubDate, $keywords = '', $lastMod = '', $priority = '' ) { |
407 | | - $this->url = $url; |
408 | | - $this->pubDate = $pubDate; |
409 | | - $this->keywords = $keywords; |
410 | | - $this->lastMod = $lastMod; |
411 | | - $this->priority = $priority; |
| 406 | + $this->url = $url; |
| 407 | + $this->pubDate = $pubDate; |
| 408 | + $this->keywords = $keywords; |
| 409 | + $this->lastMod = $lastMod; |
| 410 | + $this->priority = $priority; |
412 | 411 | } |
413 | 412 | |
414 | 413 | public function xmlEncode( $string ) { |
415 | | - $string = str_replace( "\r\n", "\n", $string ); |
416 | | - $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string ); |
417 | | - return htmlspecialchars( $string ); |
| 414 | + $string = str_replace( "\r\n", "\n", $string ); |
| 415 | + $string = preg_replace( '/[\x00-\x08\x0b\x0c\x0e-\x1f]/', '', $string ); |
| 416 | + return htmlspecialchars( $string ); |
418 | 417 | } |
419 | 418 | |
420 | 419 | public function getUrl() { |
421 | | - return $this->url; |
| 420 | + return $this->url; |
422 | 421 | } |
423 | 422 | |
424 | 423 | public function getPriority() { |
425 | | - return $this->priority; |
| 424 | + return $this->priority; |
426 | 425 | } |
427 | 426 | |
428 | 427 | public function getLastMod() { |
429 | | - return $this->lastMod; |
| 428 | + return $this->lastMod; |
430 | 429 | } |
431 | 430 | |
432 | 431 | public function getKeywords () { |
433 | | - return $this->xmlEncode( $this->keywords ); |
| 432 | + return $this->xmlEncode( $this->keywords ); |
434 | 433 | } |
435 | 434 | |
436 | 435 | public function getPubDate() { |
437 | | - return $this->pubDate; |
| 436 | + return $this->pubDate; |
438 | 437 | } |
439 | 438 | |
440 | 439 | function formatTime( $ts ) { |
441 | | - // need to use RFC 822 time format at least for rss2.0 |
442 | | - return gmdate( 'Y-m-d\TH:i:s', wfTimestamp( TS_UNIX, $ts ) ); |
| 440 | + // need to use RFC 822 time format at least for rss2.0 |
| 441 | + return gmdate( 'Y-m-d\TH:i:s', wfTimestamp( TS_UNIX, $ts ) ); |
443 | 442 | } |
444 | | - |
445 | 443 | } |
446 | 444 | |
447 | 445 | class SitemapFeed extends feedSMItem { |
448 | 446 | private $writer; |
449 | 447 | |
450 | | - |
451 | 448 | function __construct() { |
452 | 449 | global $wgOut; |
453 | 450 | $this->writer = new XMLWriter(); |
— | — | @@ -514,5 +511,4 @@ |
515 | 512 | $this->writer->endDocument(); |
516 | 513 | $this->writer->flush(); |
517 | 514 | } |
518 | | - |
519 | 515 | } |