Per my comment on r68760: Make MWfunction class, complete with call_user_func helper...
[lhc/web/wiklou.git] / includes / CategoryPage.php
index 365a255..05bc6f3 100644 (file)
@@ -102,7 +102,7 @@ class CategoryViewer {
         *
         * @return string HTML output
         */
-       private function getHTML() {
+       public function getHTML() {
                global $wgOut, $wgCategoryMagicGallery, $wgContLang;
                wfProfileIn( __METHOD__ );
 
@@ -162,9 +162,10 @@ class CategoryViewer {
         */
        function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) {
                // Subcategory; strip the 'Category' namespace from the link text.
+               $title = $cat->getTitle();
                $this->children[] = $this->getSkin()->link(
-                       $cat->getTitle(),
-                       null,
+                       $title,
+                       $title->getText(),
                        array(),
                        array(),
                        array( 'known', 'noclasses' )
@@ -417,8 +418,9 @@ class CategoryViewer {
         * @param $articles_start_char Array
         * @param $cutoff Int
         * @return String
+        * @private
         */
-       private function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
+       function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
                if ( count ( $articles ) > $cutoff ) {
                        return self::columnList( $articles, $articles_start_char );
                } elseif ( count( $articles ) > 0 ) {
@@ -441,8 +443,9 @@ class CategoryViewer {
         * @param $articles Array
         * @param $articles_start_char Array
         * @return String
+        * @private
         */
-       private static function columnList( $articles, $articles_start_char ) {
+       static function columnList( $articles, $articles_start_char ) {
                $columns = array_combine( $articles, $articles_start_char );
                # Split into three columns
                $columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
@@ -492,8 +495,9 @@ class CategoryViewer {
         * @param $articles Array
         * @param $articles_start_char Array
         * @return String
+        * @private
         */
-       private static function shortList( $articles, $articles_start_char ) {
+       static function shortList( $articles, $articles_start_char ) {
                $r = '<h3>' . htmlspecialchars( $articles_start_char[0] ) . "</h3>\n";
                $r .= '<ul><li>' . $articles[0] . '</li>';
                for ( $index = 1; $index < count( $articles ); $index++ )