r72584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72583‎ | r72584 | r72585 >
Date:12:23, 8 September 2010
Author:questpc
Status:deferred
Tags:
Comment:
Fixed warnings in E_STRICT mode
Modified paths:
  • /trunk/extensions/CategoryBrowser/CategoryBrowser.php (modified) (history)
  • /trunk/extensions/CategoryBrowser/CategoryBrowserView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryBrowser/CategoryBrowserView.php
@@ -146,7 +146,8 @@
147147 $result = '';
148148 if ( !empty( $pager_row->cl_sortkey ) &&
149149 $title_obj->getText() != $pager_row->cl_sortkey ) {
150 - $this->sortkey_hint = '(' . CategoryViewer::getSubcategorySortChar( $title_obj, $pager_row->cl_sortkey ) . ')';
 150+ $cv = new CategoryViewer( $title_obj );
 151+ $this->sortkey_hint = '(' . $cv->getSubcategorySortChar( $title_obj, $pager_row->cl_sortkey ) . ')';
151152 $result = CB_XML::toText( $this->sortkey_hint_tpl );
152153 }
153154 return $result;
Index: trunk/extensions/CategoryBrowser/CategoryBrowser.php
@@ -90,7 +90,9 @@
9191 global $wgAjaxExportList;
9292
9393 self::$ExtDir = str_replace( "\\", "/", dirname( __FILE__ ) );
94 - $top_dir = array_pop( explode( '/', self::$ExtDir ) );
 94+ // next expression splitted into two separate lines due to warning in E_STRICT mode
 95+ $top_dir = explode( '/', self::$ExtDir );
 96+ $top_dir = array_pop( $top_dir );
9597 self::$ScriptPath = $wgScriptPath . '/extensions' . ( ( $top_dir == 'extensions' ) ? '' : '/' . $top_dir );
9698 $wgExtensionMessagesFiles['CategoryBrowser'] = self::$ExtDir . '/CategoryBrowser.i18n.php';
9799
@@ -165,11 +167,11 @@
166168 }
167169 }
168170
169 - static function entities( &$s ) {
 171+ static function entities( $s ) {
170172 return htmlentities( $s, ENT_COMPAT, 'UTF-8' );
171173 }
172174
173 - static function specialchars( &$s ) {
 175+ static function specialchars( $s ) {
174176 return htmlspecialchars( $s, ENT_COMPAT, 'UTF-8' );
175177 }
176178

Status & tagging log