r79855 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79854‎ | r79855 | r79856 >
Date:01:33, 8 January 2011
Author:reedy
Status:ok
Tags:
Comment:
Fixup a few bits of documentation
Modified paths:
  • /trunk/extensions/RSS/RSSHooks.php (modified) (history)
  • /trunk/extensions/RSS/RSSParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RSS/RSSHooks.php
@@ -3,7 +3,7 @@
44 class RSSHooks {
55 /**
66 * Tell the parser how to handle <rss> elements
7 - * @param Parser Object
 7+ * @param $parser Parser Object
88 */
99 static function parserInit( $parser ) {
1010 # Install parser hook for <rss> tags
@@ -16,6 +16,7 @@
1717 * @param $input String: text inside the tags.
1818 * @param $args Array: value associative list of the element attributes and
1919 * their values.
 20+ * @param $parser Parser
2021 * @param $frame Frame parser context
2122 */
2223 static function renderRss( $input, $args, $parser, $frame ) {
Index: trunk/extensions/RSS/RSSParser.php
@@ -84,7 +84,7 @@
8585 * If there is an HTTP error while fetching an RSS object, the cached version
8686 * will be returned, if it exists.
8787 *
88 - * @return boolean Status object
 88+ * @return Status object
8989 */
9090 function fetch() {
9191 if ( !isset( $this->url ) ) {
@@ -238,7 +238,7 @@
239239 *
240240 * @param $item Array: an array produced by RSSData where keys are the
241241 * names of the RSS elements
242 - * @param $parser the parser param to pass to recursiveTagParse()
 242+ * @param $parser Parser the parser param to pass to recursiveTagParse()
243243 * @param $frame the frame param to pass to recursiveTagParse()
244244 */
245245 protected function renderItem( $item, $parser, $frame ) {
@@ -296,14 +296,13 @@
297297 * invocation.
298298 */
299299 protected function escapeTemplateParameter( $text ) {
300 - $text = str_replace(
 300+ return str_replace(
301301 array( '[', '|', ']', '\'', 'ISBN ',
302302 'RFC ', '://', "\n=", '{{', '}}' ),
303303 array( '&#91;', '&#124;', '&#93;', '&#39;', 'ISBN&#32;',
304304 'RFC&#32;', '&#58;//', "\n&#61;", '&#123;&#123;', '&#125;&#125;' ),
305305 htmlspecialchars( $text )
306306 );
307 - return $text;
308307 }
309308
310309 /**

Status & tagging log