Reedy has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/160985

Change subject: Doc param updates
......................................................................

Doc param updates

Change-Id: I418f1bf868f815dc3336787aac03ba1c2eeb81b6
---
M DynamicSidebar.body.php
1 file changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DynamicSidebar 
refs/changes/85/160985/1

diff --git a/DynamicSidebar.body.php b/DynamicSidebar.body.php
index e0084e0..656aecd 100644
--- a/DynamicSidebar.body.php
+++ b/DynamicSidebar.body.php
@@ -19,8 +19,9 @@
         * Called from SkinBuildSidebar hook. Modifies the sidebar
         * via callbacks.
         *
-        * @param $skin Skin
-        * @param $sidebar String
+        * @param Skin $skin
+        * @param array $sidebar
+        * @return bool
         */
        public static function modifySidebar( $skin, &$sidebar ) {
                global $wgDynamicSidebarUseGroups, 
$wgDynamicSidebarUseUserpages;
@@ -132,6 +133,10 @@
                return $text;
        }
 
+       /**
+        * @param Title $title
+        * @return string
+        */
        private static function doPageCategorySidebar( $title ) {
                return self::doCategorySidebar( $title->getParentCategories() );
        }
@@ -139,7 +144,7 @@
        /**
         * Grabs the sidebar for the current user's categories
         *
-        * @access private
+        * @param array|null $categories
         * @return string
         */
        private static function doCategorySidebar( $categories = null ) {
@@ -147,11 +152,11 @@
 
                self::printDebug( "User name: {$wgUser->getName()}" );
                if( $categories === null ) {
-               $categories = $wgUser->getUserPage()->getParentCategories();
+                       $categories = 
$wgUser->getUserPage()->getParentCategories();
                }
 
                // Did we find any categories?
-               if ( !is_array( $categories) || count( $categories ) == 0 ) {
+               if ( !is_array( $categories ) || count( $categories ) == 0 ) {
                        // Remove this sidebar if not.
                        return '';
                }
@@ -188,7 +193,6 @@
         *
         * @param string $debugText
         * @param array $debugArr
-        * @access private
         */
        private static function printDebug( $debugText, $debugArr = null ) {
                if ( isset( $debugArr ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I418f1bf868f815dc3336787aac03ba1c2eeb81b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DynamicSidebar
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>

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

Reply via email to