https://www.mediawiki.org/wiki/Special:Code/MediaWiki/110083

Revision: 110083
Author:   reedy
Date:     2012-01-26 21:04:32 +0000 (Thu, 26 Jan 2012)
Log Message:
-----------
Fix/add documentation

Fix whitespace

Modified Paths:
--------------
    trunk/extensions/ConditionalShowSection/ConditionalShowSection.php
    trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php
    trunk/extensions/NewestPages/NewestPages.page.php
    trunk/extensions/wikihiero/wikihiero.php

Modified: trunk/extensions/ConditionalShowSection/ConditionalShowSection.php
===================================================================
--- trunk/extensions/ConditionalShowSection/ConditionalShowSection.php  
2012-01-26 21:01:11 UTC (rev 110082)
+++ trunk/extensions/ConditionalShowSection/ConditionalShowSection.php  
2012-01-26 21:04:32 UTC (rev 110083)
@@ -34,11 +34,21 @@
 
 $wgHooks['ParserFirstCallInit'][] = 'wfConditionalShowSection';
 
+/**
+ * @param $parser Parser
+ * @return bool
+ */
 function wfConditionalShowSection( $parser ) {
-    $parser->setHook( "cshow", "ConditionalShowSection" );
-    return true;
+       $parser->setHook( "cshow", "ConditionalShowSection" );
+       return true;
 }
 
+/**
+ * @param $input
+ * @param $argv
+ * @param $parser Parser
+ * @return string
+ */
 function ConditionalShowSection( $input, $argv, &$parser ) {
        #
        # By default, the section is HIDDEN unless the following conditions are 
met:
@@ -63,7 +73,6 @@
        global $wgUser;
 
        $userReqLogged = null;   # default is "don't care"
-       $userReqGroup  = "" ;    # assuming no group membership required
        $output = "";            # assuming the section is hidden by default.
 
        $cond1 = false;
@@ -96,7 +105,7 @@
                $cond1 = true;
        }
        # if both conditions are met, then SHOW else HIDE
-       if ( ( $cond1 === true ) and ( $cond2 === true ) ) {
+       if ( ( $cond1 === true ) && ( $cond2 === true ) ) {
                $output = $parser->recursiveTagParse( $input );
        }
 

Modified: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php
===================================================================
--- trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php       2012-01-26 
21:01:11 UTC (rev 110082)
+++ trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php       2012-01-26 
21:04:32 UTC (rev 110083)
@@ -9,7 +9,7 @@
         */
        public static function getFeeds( $langCode ) {
                global $wgMemc, $wgContLang;
-               
+
                if ( !$langCode ) {
                        $langCode = $wgContLang->getCode();
                }

Modified: trunk/extensions/NewestPages/NewestPages.page.php
===================================================================
--- trunk/extensions/NewestPages/NewestPages.page.php   2012-01-26 21:01:11 UTC 
(rev 110082)
+++ trunk/extensions/NewestPages/NewestPages.page.php   2012-01-26 21:04:32 UTC 
(rev 110083)
@@ -24,8 +24,6 @@
        public function execute( $par ) {
                global $wgRequest, $wgOut, $wgContLang, $wgLang;
 
-               
-
                # Decipher input passed to the page
                $this->decipherParams( $par );
                $this->setOptions( $wgRequest );

Modified: trunk/extensions/wikihiero/wikihiero.php
===================================================================
--- trunk/extensions/wikihiero/wikihiero.php    2012-01-26 21:01:11 UTC (rev 
110082)
+++ trunk/extensions/wikihiero/wikihiero.php    2012-01-26 21:04:32 UTC (rev 
110083)
@@ -70,13 +70,22 @@
 
 $wgCompiledFiles[] = MWInit::extCompiledPath( 'wikihiero/data/tables.php' );
 
-// Because <hiero> tag is used rarely, we don't need to load its body on every 
hook call,
-// so we keep our simple hook handlers here.
+/**
+ * Because <hiero> tag is used rarely, we don't need to load its body on every 
hook call,
+ * so we keep our simple hook handlers here.
+ *
+ * @param $parser Parser
+ * @return bool
+ */
 function wfRegisterWikiHiero( &$parser ) {
        $parser->setHook( 'hiero', 'WikiHiero::parserHook' );
        return true;
 }
 
+/**
+ * @param $out OutputPage
+ * @return bool
+ */
 function wfHieroBeforePageDisplay( $out ) {
        $out->addModuleStyles( 'ext.wikihiero' );
        return true;


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to