r78112 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78111‎ | r78112 | r78113 >
Date:02:41, 9 December 2010
Author:reedy
Status:deferred
Tags:
Comment:
Whitespace and indenting
Modified paths:
  • /trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GoogleNewsSitemap/GoogleNewsSitemap_body.php
@@ -384,7 +384,6 @@
385385 $str = substr( $str, 2 ); # to remove leading ', '
386386 return $str;
387387 }
388 -
389388 }
390389
391390 /**
@@ -403,50 +402,48 @@
404403 var $priority = '';
405404
406405 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;
412411 }
413412
414413 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 );
418417 }
419418
420419 public function getUrl() {
421 - return $this->url;
 420+ return $this->url;
422421 }
423422
424423 public function getPriority() {
425 - return $this->priority;
 424+ return $this->priority;
426425 }
427426
428427 public function getLastMod() {
429 - return $this->lastMod;
 428+ return $this->lastMod;
430429 }
431430
432431 public function getKeywords () {
433 - return $this->xmlEncode( $this->keywords );
 432+ return $this->xmlEncode( $this->keywords );
434433 }
435434
436435 public function getPubDate() {
437 - return $this->pubDate;
 436+ return $this->pubDate;
438437 }
439438
440439 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 ) );
443442 }
444 -
445443 }
446444
447445 class SitemapFeed extends feedSMItem {
448446 private $writer;
449447
450 -
451448 function __construct() {
452449 global $wgOut;
453450 $this->writer = new XMLWriter();
@@ -514,5 +511,4 @@
515512 $this->writer->endDocument();
516513 $this->writer->flush();
517514 }
518 -
519515 }

Status & tagging log