r75962 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75961‎ | r75962 | r75963 >
Date:22:38, 3 November 2010
Author:80686
Status:deferred
Tags:
Comment:
minor code cleanups
Modified paths:
  • /trunk/extensions/SelectCategory (modified) (history)
  • /trunk/extensions/SelectCategory/SelectCategoryFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SelectCategory/SelectCategoryFunctions.php
@@ -18,7 +18,7 @@
1919 }
2020
2121 ## Entry point for the hook and main worker function for editing the page:
22 -function fnSelectCategoryShowHook( $m_isUpload = false, &$m_pageObj ) {
 22+function fnSelectCategoryShowHook( $m_isUpload = false, $m_pageObj ) {
2323
2424 # check if we should do anything or sleep
2525 if ( fnSelectCategoryCheckConditions( $m_isUpload, $m_pageObj ) ) {
@@ -116,7 +116,7 @@
117117 }
118118
119119 ## Entry point for the hook and main worker function for saving the page:
120 -function fnSelectCategorySaveHook( $m_isUpload, &$m_pageObj ) {
 120+function fnSelectCategorySaveHook( $m_isUpload, $m_pageObj ) {
121121 global $wgContLang;
122122 global $wgTitle;
123123
@@ -128,7 +128,7 @@
129129
130130 # default sort key is page name with stripped namespace name,
131131 # otherwise sorting is ugly.
132 - if ($wgTitle->getNamespace() == NS_MAIN) {
 132+ if( $wgTitle->getNamespace() == NS_MAIN ) {
133133 $default_sortkey = "";
134134 } else {
135135 $default_sortkey = "|{{PAGENAME}}";
@@ -175,7 +175,7 @@
176176 $m_allCats = array();
177177
178178 # Get a database object:
179 - $m_dbObj =& wfGetDB( DB_SLAVE );
 179+ $m_dbObj = wfGetDB( DB_SLAVE );
180180 # Get table names to access them in SQL query:
181181 $m_tblCatLink = $m_dbObj->tableName( 'categorylinks' );
182182 $m_tblPage = $m_dbObj->tableName( 'page' );
@@ -206,7 +206,7 @@
207207 $m_allCats = array();
208208
209209 # Get a database object:
210 - $m_dbObj =& wfGetDB( DB_SLAVE );
 210+ $m_dbObj = wfGetDB( DB_SLAVE );
211211 # Get table names to access them in SQL query:
212212 $m_tblCatLink = $m_dbObj->tableName( 'categorylinks' );
213213 $m_tblPage = $m_dbObj->tableName( 'page' );
@@ -284,7 +284,7 @@
285285 }
286286
287287 # Function that checks if we meet the run conditions of the extension
288 -function fnSelectCategoryCheckConditions ($m_isUpload, &$m_pageObj ) {
 288+function fnSelectCategoryCheckConditions ($m_isUpload, $m_pageObj ) {
289289 global $wgSelectCategoryNamespaces;
290290 global $wgSelectCategoryEnableSubpages;
291291 global $wgTitle;
@@ -299,7 +299,7 @@
300300 }
301301
302302 $ns = $wgTitle->getNamespace();
303 - if (array_key_exists ($ns, $wgSelectCategoryNamespaces)) {
 303+ if( array_key_exists( $ns, $wgSelectCategoryNamespaces ) ) {
304304 $enabledForNamespace = $wgSelectCategoryNamespaces[$ns];
305305 } else {
306306 $enabledForNamespace = false;
Property changes on: trunk/extensions/SelectCategory
___________________________________________________________________
Added: svn:mergeinfo
307307 Merged /branches/REL1_16/extensions/SelectCategory/SelectCategory:r75959
308308 Merged /branches/REL1_16/extensions/SelectCategory:r62820-75960

Status & tagging log