jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394672 )

Change subject: Add explict var visibility
......................................................................


Add explict var visibility

Change-Id: Ia5fd505e4c6391eeaa28d05b18348c917d478311
---
M includes/PF_ParserFunctions.php
M includes/forminputs/PF_Tree.php
2 files changed, 18 insertions(+), 17 deletions(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/includes/PF_ParserFunctions.php b/includes/PF_ParserFunctions.php
index be102d1..35f8ff2 100644
--- a/includes/PF_ParserFunctions.php
+++ b/includes/PF_ParserFunctions.php
@@ -154,9 +154,9 @@
 
        // static variable to guarantee that Javascript for autocompletion
        // only gets added to the page once
-       static $num_autocompletion_inputs = 0;
+       private static $num_autocompletion_inputs = 0;
 
-       static function renderDefaultform( &$parser ) {
+       public static function renderDefaultForm( &$parser ) {
                $curTitle = $parser->getTitle();
 
                $params = func_get_args();
@@ -187,28 +187,28 @@
                // It's not a category - display nothing.
        }
 
-       static function renderFormLink ( &$parser ) {
+       public static function renderFormLink( &$parser ) {
                $params = func_get_args();
                array_shift( $params ); // We don't need the parser.
                $str = self::createFormLink( $parser, $params, 'formlink' );
                return array( $str, 'noparse' => true, 'isHTML' => true );
        }
 
-       static function renderFormRedLink ( &$parser ) {
+       public static function renderFormRedLink( &$parser ) {
                $params = func_get_args();
                array_shift( $params ); // We don't need the parser.
                $str = self::createFormLink( $parser, $params, 'formredlink' );
                return array( $str, 'noparse' => true, 'isHTML' => true );
        }
 
-       static function renderQueryFormLink ( &$parser ) {
+       public static function renderQueryFormLink( &$parser ) {
                $params = func_get_args();
                array_shift( $params ); // We don't need the parser.
                $str = self::createFormLink( $parser, $params, 'queryformlink' 
);
                return array( $str, 'noparse' => true, 'isHTML' => true );
        }
 
-       static function convertQueryString ( $queryString, $inQueryArr ) {
+       private static function convertQueryString( $queryString, $inQueryArr ) 
{
                // Change HTML-encoded ampersands directly to URL-encoded
                // ampersands, so that the string doesn't get split up on the 
'&'.
                $queryString = str_replace( '&', '%26', $queryString );
@@ -220,7 +220,7 @@
                return PFUtils::array_merge_recursive_distinct( $inQueryArr, 
$arr );
        }
 
-       static function renderFormInput( &$parser ) {
+       public static function renderFormInput( &$parser ) {
                $params = func_get_args();
                array_shift( $params ); // don't need the parser
 
@@ -382,7 +382,7 @@
        /**
         * {{#arraymap:value|delimiter|var|formula|new_delimiter}}
         */
-       static function renderArrayMap( &$parser, $frame, $args ) {
+       public static function renderArrayMap( &$parser, $frame, $args ) {
                // Set variables.
                $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) 
: '';
                $delimiter = isset( $args[1] ) ? trim( $frame->expand( $args[1] 
) ) : ',';
@@ -420,7 +420,7 @@
        /**
         * {{#arraymaptemplate:value|template|delimiter|new_delimiter}}
         */
-       static function renderArrayMapTemplate( &$parser, $frame, $args ) {
+       public static function renderArrayMapTemplate( &$parser, $frame, $args 
) {
                // Set variables.
                $value = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) 
: '';
                $template = isset( $args[1] ) ? trim( $frame->expand( $args[1] 
) ) : '';
@@ -456,7 +456,7 @@
        }
 
 
-       static function renderAutoEdit( &$parser ) {
+       public static function renderAutoEdit( &$parser ) {
                global $wgContentNamespaces;
 
                $parser->getOutput()->addModules( 'ext.pageforms.autoedit' );
@@ -600,7 +600,7 @@
                return $parser->insertStripItem( $output, $parser->mStripState 
);
        }
 
-       static function createFormLink( &$parser, $params, $parserFunctionName 
) {
+       private static function createFormLink( &$parser, $params, 
$parserFunctionName ) {
                // Set defaults.
                $inFormName = $inLinkStr = $inExistingPageLinkStr = $inLinkType 
=
                        $inTooltip = $inTargetName = '';
@@ -770,7 +770,7 @@
                return $str;
        }
 
-       static function loadScriptsForPopupForm( &$parser ) {
+       private static function loadScriptsForPopupForm( &$parser ) {
                $parser->getOutput()->addModules( 'ext.pageforms.popupformedit' 
);
                return true;
        }
diff --git a/includes/forminputs/PF_Tree.php b/includes/forminputs/PF_Tree.php
index c29378a..2802d49 100644
--- a/includes/forminputs/PF_Tree.php
+++ b/includes/forminputs/PF_Tree.php
@@ -8,14 +8,15 @@
  * @author Yaron Koren
  */
 class PFTree {
-       var $title, $children;
+       public $title;
+       public $children;
 
-       function __construct( $curTitle ) {
+       public function __construct( $curTitle ) {
                $this->title = $curTitle;
                $this->children = array();
        }
 
-       function addChild( $child ) {
+       public function addChild( $child ) {
                $this->children[] = $child;
        }
 
@@ -44,7 +45,7 @@
                return $fullTree;
        }
 
-       function getLastNodeForLevel( $level ) {
+       public function getLastNodeForLevel( $level ) {
                if ( $level <= 1 || count( $this->children ) == 0 ) {
                        return $this;
                }
@@ -56,7 +57,7 @@
         * @param $top_category String
         * @return mixed
         */
-       static function newFromTopCategory( $top_category ) {
+       public static function newFromTopCategory( $top_category ) {
                $pfTree = new PFTree( $top_category );
                $defaultDepth = 20;
                $pfTree->populateChildren( $defaultDepth );

-- 
To view, visit https://gerrit.wikimedia.org/r/394672
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5fd505e4c6391eeaa28d05b18348c917d478311
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageForms
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to