r109196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109195‎ | r109196 | r109197 >
Date:19:57, 17 January 2012
Author:reedy
Status:reverted (Comments)
Tags:
Comment:
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/Feed.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/Feed.php
@@ -39,33 +39,33 @@
4040 /**
4141 * @var Title
4242 */
43 - var $Title = 'Wiki';
44 - var $Description = '';
45 - var $Url = '';
46 - var $Date = '';
47 - var $Author = '';
48 - var $UniqueId = '';
49 - var $RSSIsPermalink;
 43+ var $title;
 44+ var $description;
 45+ var $url;
 46+ var $date;
 47+ var $author;
 48+ var $uniqueId;
 49+ var $comments;
 50+ var $rssIsPermalink = false;
5051
5152 /**
5253 * Constructor
5354 *
54 - * @param $Title String|Title Item's title
55 - * @param $Description String
56 - * @param $Url String: URL uniquely designating the item.
57 - * @param $Date String: Item's date
58 - * @param $Author String: Author's user name
59 - * @param $Comments String
 55+ * @param $title String|Title Item's title
 56+ * @param $description String
 57+ * @param $url String: URL uniquely designating the item.
 58+ * @param $date String: Item's date
 59+ * @param $author String: Author's user name
 60+ * @param $comments String
6061 */
61 - function __construct( $Title, $Description, $Url, $Date = '', $Author = '', $Comments = '' ) {
62 - $this->Title = $Title;
63 - $this->Description = $Description;
64 - $this->Url = $Url;
65 - $this->UniqueId = $Url;
66 - $this->RSSIsPermalink = false;
67 - $this->Date = $Date;
68 - $this->Author = $Author;
69 - $this->Comments = $Comments;
 62+ function __construct( $title, $description, $url, $date = '', $author = '', $comments = '' ) {
 63+ $this->title = $title;
 64+ $this->description = $description;
 65+ $this->url = $url;
 66+ $this->uniqueId = $url;
 67+ $this->date = $date;
 68+ $this->author = $author;
 69+ $this->comments = $comments;
7070 }
7171
7272 /**
@@ -95,8 +95,8 @@
9696 * @return String
9797 */
9898 public function getUniqueId() {
99 - if ( $this->UniqueId ) {
100 - return $this->xmlEncode( $this->UniqueId );
 99+ if ( $this->uniqueId ) {
 100+ return $this->xmlEncode( $this->uniqueId );
101101 }
102102 }
103103
@@ -104,11 +104,11 @@
105105 * set the unique id of an item
106106 *
107107 * @param $uniqueId String: unique id for the item
108 - * @param $RSSisPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
 108+ * @param $rssIsPermalink Boolean: set to true if the guid (unique id) is a permalink (RSS feeds only)
109109 */
110 - public function setUniqueId($uniqueId, $RSSisPermalink = false) {
111 - $this->UniqueId = $uniqueId;
112 - $this->RSSIsPermalink = $RSSisPermalink;
 110+ public function setUniqueId( $uniqueId, $rssIsPermalink = false ) {
 111+ $this->uniqueId = $uniqueId;
 112+ $this->rssIsPermalink = $rssIsPermalink;
113113 }
114114
115115 /**
@@ -117,7 +117,7 @@
118118 * @return String
119119 */
120120 public function getTitle() {
121 - return $this->xmlEncode( $this->Title );
 121+ return $this->xmlEncode( $this->title );
122122 }
123123
124124 /**
@@ -136,7 +136,7 @@
137137 * @return String
138138 */
139139 public function getUrl() {
140 - return $this->xmlEncode( $this->Url );
 140+ return $this->xmlEncode( $this->url );
141141 }
142142
143143 /**
@@ -145,7 +145,7 @@
146146 * @return String
147147 */
148148 public function getDescription() {
149 - return $this->xmlEncode( $this->Description );
 149+ return $this->xmlEncode( $this->description );
150150 }
151151
152152 /**
@@ -164,7 +164,7 @@
165165 * @return String
166166 */
167167 public function getDate() {
168 - return $this->Date;
 168+ return $this->date;
169169 }
170170
171171 /**
@@ -173,7 +173,7 @@
174174 * @return String
175175 */
176176 public function getAuthor() {
177 - return $this->xmlEncode( $this->Author );
 177+ return $this->xmlEncode( $this->author );
178178 }
179179
180180 /**
@@ -182,7 +182,7 @@
183183 * @return String
184184 */
185185 public function getComments() {
186 - return $this->xmlEncode( $this->Comments );
 186+ return $this->xmlEncode( $this->comments );
187187 }
188188
189189 /**
@@ -325,7 +325,7 @@
326326 <item>
327327 <title><?php print $item->getTitle() ?></title>
328328 <link><?php print wfExpandUrl( $item->getUrl(), PROTO_CURRENT ) ?></link>
329 - <guid<?php if( !$item->RSSIsPermalink ) print ' isPermaLink="false"' ?>><?php print $item->getUniqueId() ?></guid>
 329+ <guid<?php if( !$item->rssIsPermalink ) print ' isPermaLink="false"' ?>><?php print $item->getUniqueId() ?></guid>
330330 <description><?php print $item->getDescription() ?></description>
331331 <?php if( $item->getDate() ) { ?><pubDate><?php print $this->formatTime( $item->getDate() ) ?></pubDate><?php } ?>
332332 <?php if( $item->getAuthor() ) { ?><dc:creator><?php print $item->getAuthor() ?></dc:creator><?php }?>
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
333333 Merged /trunk/phase3/includes:r102851,102861
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
334334 Merged /trunk/phase3:r102851,102861

Follow-up revisions

RevisionCommit summaryAuthorDate
r109621Revert r109196, code style fixes backported with no rationaledemon15:54, 20 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102851* Renamed member variables to begin with a lower case...ialex09:57, 12 November 2011
r102861Per Nikerabbit, fix undefined variable notice from r102851ialex12:13, 12 November 2011

Comments

#Comment by Nikerabbit (talk | contribs)   20:32, 17 January 2012

Is this needed in 1.18? Without release notes?

Status & tagging log