Per Hashar, r77819, @private comment. Explicit public method definition
[lhc/web/wiklou.git] / includes / CategoryPage.php
index 8213e6e..5fcad49 100644 (file)
@@ -23,11 +23,13 @@ class CategoryPage extends Article {
                $diff = $wgRequest->getVal( 'diff' );
                $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
 
-               if ( isset( $diff ) && $diffOnly )
+               if ( isset( $diff ) && $diffOnly ) {
                        return parent::view();
+               }
 
-               if ( !wfRunHooks( 'CategoryPageView', array( &$this ) ) )
+               if ( !wfRunHooks( 'CategoryPageView', array( &$this ) ) ) {
                        return;
+               }
 
                if ( NS_CATEGORY == $this->mTitle->getNamespace() ) {
                        $this->openShowCategory();
@@ -99,9 +101,8 @@ class CategoryViewer {
         * Format the category data list.
         *
         * @return string HTML output
-        * @private
         */
-       function getHTML() {
+       public function getHTML() {
                global $wgOut, $wgCategoryMagicGallery, $wgContLang;
                wfProfileIn( __METHOD__ );
 
@@ -420,10 +421,10 @@ class CategoryViewer {
         */
        function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
                if ( count ( $articles ) > $cutoff ) {
-                       return $this->columnList( $articles, $articles_start_char );
+                       return self::columnList( $articles, $articles_start_char );
                } elseif ( count( $articles ) > 0 ) {
                        // for short lists of articles in categories.
-                       return $this->shortList( $articles, $articles_start_char );
+                       return self::shortList( $articles, $articles_start_char );
                }
                return '';
        }
@@ -587,8 +588,8 @@ class CategoryViewer {
 
                # Check if there's a "from" or "until" for anything
                $fromOrUntil = false;
-               foreach ( array( 'page', 'subcat', 'file' ) as $type ) {
-                       if ( $this->from[$type] !== null || $this->until[$type] !== null ) {
+               foreach ( array( 'page', 'subcat', 'file' ) as $t ) {
+                       if ( $this->from[$t] !== null || $this->until[$t] !== null ) {
                                $fromOrUntil = true;
                                break;
                        }