r77819 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77818‎ | r77819 | r77820 >
Date:18:27, 5 December 2010
Author:reedy
Status:ok
Tags:
Comment:
-rakkaus/#mediawiki-i18n- [05-Dec-2010 18:22:39] PHP Fatal error: Call to private method CategoryViewer::getHTML() from context 'CategoryPage' in /www/w/includes/CategoryPage.php on line 74

Partial revert of r77809, remove making of methods private, but don't reinstate the comments. They're seemingly wrong, and useless.
Modified paths:
  • /trunk/phase3/includes/CategoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/CategoryPage.php
@@ -102,7 +102,7 @@
103103 *
104104 * @return string HTML output
105105 */
106 - private function getHTML() {
 106+ function getHTML() {
107107 global $wgOut, $wgCategoryMagicGallery, $wgContLang;
108108 wfProfileIn( __METHOD__ );
109109
@@ -418,7 +418,7 @@
419419 * @param $cutoff Int
420420 * @return String
421421 */
422 - private function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
 422+ function formatList( $articles, $articles_start_char, $cutoff = 6 ) {
423423 if ( count ( $articles ) > $cutoff ) {
424424 return self::columnList( $articles, $articles_start_char );
425425 } elseif ( count( $articles ) > 0 ) {
@@ -442,7 +442,7 @@
443443 * @param $articles_start_char Array
444444 * @return String
445445 */
446 - private static function columnList( $articles, $articles_start_char ) {
 446+ static function columnList( $articles, $articles_start_char ) {
447447 $columns = array_combine( $articles, $articles_start_char );
448448 # Split into three columns
449449 $columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
@@ -493,7 +493,7 @@
494494 * @param $articles_start_char Array
495495 * @return String
496496 */
497 - private static function shortList( $articles, $articles_start_char ) {
 497+ static function shortList( $articles, $articles_start_char ) {
498498 $r = '<h3>' . htmlspecialchars( $articles_start_char[0] ) . "</h3>\n";
499499 $r .= '<ul><li>' . $articles[0] . '</li>';
500500 for ( $index = 1; $index < count( $articles ); $index++ )

Follow-up revisions

RevisionCommit summaryAuthorDate
r77891Per Hashar, r77819, @private comment. Explicit public method definitionreedy17:07, 6 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77809Swap @private for setting function definition to privatereedy16:15, 5 December 2010

Status & tagging log