Просмотр исходного кода

#53 - get rid of unused params and variables, based on phpmd output

Alex Trofimov 12 лет назад
Родитель
Сommit
00eb3ee9e5
33 измененных файлов с 27 добавлено и 90 удалено
  1. 0 1
      inc/classes/BxDolAcl.php
  2. 2 2
      inc/classes/BxDolCmts.php
  3. 1 1
      inc/classes/BxDolCmtsQuery.php
  4. 1 1
      inc/classes/BxDolConnection.php
  5. 1 1
      inc/classes/BxDolDb.php
  6. 0 1
      inc/classes/BxDolForm.php
  7. 0 2
      inc/classes/BxDolImageResize.php
  8. 2 3
      inc/classes/BxDolRssFactory.php
  9. 1 1
      inc/classes/BxDolSocialSharing.php
  10. 0 1
      inc/classes/BxDolTemplate.php
  11. 3 3
      inc/classes/BxDolView.php
  12. 2 2
      inc/classes/BxDolVote.php
  13. 1 1
      inc/prof.inc.php
  14. 1 1
      inc/profiles.inc.php
  15. 2 23
      inc/utils.inc.php
  16. 1 1
      modules/base/general/classes/BxBaseModGeneralModule.php
  17. 0 9
      modules/base/general/classes/BxBaseModGeneralRequest.php
  18. 0 2
      modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php
  19. 1 1
      modules/boonex/antispam/classes/BxAntispamIP.php
  20. 1 1
      modules/boonex/convos/classes/BxCnvCmts.php
  21. 4 12
      modules/boonex/sites/request.php
  22. 0 2
      modules/boonex/timeline/classes/BxTimelineModule.php
  23. 0 5
      modules/boonex/timeline/classes/BxTimelineTemplate.php
  24. 0 1
      samples/connections.php
  25. 0 2
      search_home.php
  26. 1 2
      template/scripts/BxBaseCmts.php
  27. 1 1
      template/scripts/BxBaseConfig.php
  28. 0 1
      template/scripts/BxBaseGrid.php
  29. 0 1
      template/scripts/BxBaseMenuSubmenu.php
  30. 0 1
      template/scripts/BxBaseSearchResult.php
  31. 0 1
      template/scripts/BxBaseServiceProfiles.php
  32. 0 2
      template/scripts/BxBaseVote.php
  33. 1 1
      upgrade/classes/BxDolUpgradeDb.php

+ 0 - 1
inc/classes/BxDolAcl.php

@@ -190,7 +190,6 @@ class BxDolAcl extends BxDol implements iBxDolSingleton {
      * when performing the action (like the number of profiles to show in search result)
     */
     function checkAction($iProfileId, $iActionId, $bPerformAction = false) {
-    	global $logged;
 
     	$aResult = array();
     	$aLangFileParams = array();

+ 2 - 2
inc/classes/BxDolCmts.php

@@ -266,7 +266,7 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
                 bx_import($sClassName);
         }
 
-        $o = new $sClassName($sSys, $iId, true);
+        $o = new $sClassName($sSys, $iId, $iInit);
         return ($GLOBALS['bxDolClasses']['BxDolCmts!' . $sSys . $iId] = $o);
     }
 
@@ -497,7 +497,7 @@ class BxDolCmts extends BxDol implements iBxDolReplaceable
 
     public function getCommentRow ($iCmtId)
     {
-        return $this->_oQuery->getComment ($this->getId(), $iCmtId, $this->_getAuthorId());
+        return $this->_oQuery->getComment ($this->getId(), $iCmtId);
     }
 
     public function onObjectDelete ($iObjectId = 0)

+ 1 - 1
inc/classes/BxDolCmtsQuery.php

@@ -128,7 +128,7 @@ class BxDolCmtsQuery extends BxDolDb
         return $this->getAll($sQuery);
     }
 
-    function getComment ($iId, $iCmtId, $iAuthorId = 0)
+    function getComment ($iId, $iCmtId)
     {
         $sFields = $sJoin = "";
 

+ 1 - 1
inc/classes/BxDolConnection.php

@@ -333,7 +333,7 @@ class BxDolConnection extends BxDol implements iBxDolFactoryObject {
      * Similar to getConnectionsAsArray, but for getCommonContentAsSQLParts, getConnectedContentAsSQLParts or getConnectedInitiatorsAsSQLParts methods
      * @see getConnectionsAsArray
      */    
-    public function getConnectionsAsSQLParts ($sContentType, $sContentTable, $sContentField, $iId1, $iId2, $isMutual = false, $iStart = 0, $iLimit = BX_CONNECTIONS_LIST_LIMIT, $iOrder = BX_CONNECTIONS_ORDER_NONE)
+    public function getConnectionsAsSQLParts ($sContentType, $sContentTable, $sContentField, $iId1, $iId2, $isMutual = false)
     {
         if (BX_CONNECTIONS_CONTENT_TYPE_COMMON == $sContentType)
             return $this->getCommonContentAsSQLParts($sContentTable, $sContentField, $iId1, $iId2, $isMutual);

+ 1 - 1
inc/classes/BxDolDb.php

@@ -371,7 +371,7 @@ class BxDolDb extends BxDol implements iBxDolSingleton {
     /**
      * execute sql query and return table of records as result
      */
-    function getPairs($query, $sFieldKey, $sFieldValue, $arr_type = MYSQL_ASSOC)
+    function getPairs($query, $sFieldKey, $sFieldValue)
     {
         if(!$query)
             return array();

+ 0 - 1
inc/classes/BxDolForm.php

@@ -1192,7 +1192,6 @@ class BxDolFormChecker {
     // db functions
     function serializeDbValues (&$aInputs, &$aValsToAdd, &$aTrackTextFieldsChanges = null) {
         $oDb = BxDolDb::getInstance();
-        $oChecker = $this->_oChecker;
         $aValsToUpdate = array();
         $s = '';
         

+ 0 - 2
inc/classes/BxDolImageResize.php

@@ -187,7 +187,6 @@ class BxDolImageResize extends BxDol implements iBxDolSingleton {
 
         $iErr = 0;
         $src_im =& $this->_createGDImage($sSrcImage, $size, $iErr);
-        $sizeOrig = $size;
 
         if ($iErr)
             return $iErr;
@@ -378,7 +377,6 @@ class BxDolImageResize extends BxDol implements iBxDolSingleton {
         {
             $cmd = "{$GLOBALS['MOGRIFY']} -geometry {$this->w}\">\"x{$this->h}\">\" \"$sSrcImage\"";
             @exec( $cmd );
-            $ext = strrchr($sSrcImage, '.');
             $nameWithoutExt = substr( $sSrcImage, 0, strrpos($sSrcImage, '.') );
             if ( file_exists( "{$nameWithoutExt}.mgk" ) )
                 rename( "{$nameWithoutExt}.mgk", $sSrcImage );

+ 2 - 3
inc/classes/BxDolRssFactory.php

@@ -51,7 +51,6 @@ class BxDolRssFactory extends BxDol {
      *  Photo
      */
     function GenRssByCustomData($aRssData, $sUnitTitleC, $sMainLink, $aFields, $sImage = '', $iPID = 0) {
-        $sUnits = '';
         $sRSSLast = '';
         if (isset($aRssData[0]))
             $sRSSLast = bx_time_utc($aRssData[0][$aFields['DateTimeUTS']]);
@@ -62,11 +61,11 @@ class BxDolRssFactory extends BxDol {
         $iUnitLimitChars = 2000;//(int)getParam('max_blog_preview');
         $sUnitRSSFeed = '';
         if ($aRssData) {
-            foreach ($aRssData as $iUnitID => $aUnitInfo) {
+            foreach ($aRssData as $aUnitInfo) {
                 $sUnitUrl = $aUnitInfo[$aFields['Link']];
                 $sUnitGuid = $aUnitInfo[$aFields['Guid']];
 
-                $sUnitTitle = strmaxwordlen(strip_tags($aUnitInfo[$aFields['Title']]), 100);
+                $sUnitTitle = strip_tags($aUnitInfo[$aFields['Title']]);
                 $sUnitDate = bx_time_utc($aUnitInfo[$aFields['DateTimeUTS']]);
 
                 $sLinkMore = '';

+ 1 - 1
inc/classes/BxDolSocialSharing.php

@@ -81,7 +81,7 @@ class BxDolSocialSharing extends BxDol implements iBxDolSingleton
      */ 
     protected function _replaceMarkers ($mixed, $aMarkers) {
         if (empty($mixed) || empty($aMarkers) || !is_array($aMarkers))
-            return $s;
+            return $mixed;
         return bx_replace_markers($mixed, $aMarkers);
     }
 

+ 0 - 1
inc/classes/BxDolTemplate.php

@@ -882,7 +882,6 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton {
      * @return string value associated with the key.
      */
     function parseSystemKey($sKey, $mixedKeyWrapperHtml = null, $bProcessInjection = true) {
-        global $logged;
 
         $aKeyWrappers = $this->_getKeyWrappers($mixedKeyWrapperHtml);
 

+ 3 - 3
inc/classes/BxDolView.php

@@ -52,7 +52,7 @@ class BxDolView extends BxDolObject
     /**
      * Constructor
      */
-    function BxDolView($sSystem, $iId, $iInit = 1)
+    function BxDolView($sSystem, $iId, $iInit = true)
     {
     	parent::__construct($sSystem, $iId, $iInit);
 		if(empty($this->_sSystem))
@@ -68,7 +68,7 @@ class BxDolView extends BxDolObject
      * @param $iInit perform initialization
      * @return null on error, or ready to use class instance
      */
-    public static function getObjectInstance($sSys, $iId, $isMakeView = true) 
+    public static function getObjectInstance($sSys, $iId, $iInit = true) 
     {
     	if(isset($GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId]))
             return $GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId];
@@ -87,7 +87,7 @@ class BxDolView extends BxDolObject
                 bx_import($sClassName);
         }
 
-        $o = new $sClassName($sSys, $iId, true);
+        $o = new $sClassName($sSys, $iId, $iInit);
         return ($GLOBALS['bxDolClasses']['BxDolView!' . $sSys . $iId] = $o);
     }
 

+ 2 - 2
inc/classes/BxDolVote.php

@@ -88,7 +88,7 @@ define('BX_DOL_VOTE_USAGE_DEFAULT', BX_DOL_VOTE_USAGE_BLOCK);
 
 class BxDolVote extends BxDolObject
 {
-    public function __construct($sSystem, $iId, $iInit = 1)
+    public function __construct($sSystem, $iId, $iInit = true)
     {
         parent::__construct($sSystem, $iId, $iInit);
         if(empty($this->_sSystem))
@@ -123,7 +123,7 @@ class BxDolVote extends BxDolObject
                 bx_import($sClassName);
         }
 
-        $o = new $sClassName($sSys, $iId, true);
+        $o = new $sClassName($sSys, $iId, $iInit);
         return ($GLOBALS['bxDolClasses']['BxDolVote!' . $sSys . $iId] = $o);
     }
 

+ 1 - 1
inc/prof.inc.php

@@ -34,7 +34,7 @@ function getPreValues ($sKey, $aFields = array()) {
     return $oDb->getAllWithKey($sQuery, 'Value');
 }
 
-function getPreValuesCount ($sKey, $aFields = array()) {
+function getPreValuesCount ($sKey) {
     $oDb = BxDolDb::getInstance();
     $sQuery = $oDb->prepare("SELECT COUNT(*) FROM `" . BX_SYS_PRE_VALUES_TABLE . "` WHERE `Key` = ?", $sKey);
     return $oDb->getOne($sQuery);

+ 1 - 1
inc/profiles.inc.php

@@ -208,7 +208,7 @@ function bx_require_authentication ($bStudio = false) {
     $sID = isset($_COOKIE['memberID']) ? bx_process_input($_COOKIE['memberID']) : false;
     $sPassword = isset($_COOKIE['memberPassword']) ? bx_process_input($_COOKIE['memberPassword']) : false;
     
-    if ($sLoginError = bx_check_login($sID, $sPassword, $iRole)) {
+    if (bx_check_login($sID, $sPassword, $iRole)) {
         bx_login_form($bStudio);
     }   
 

+ 2 - 23
inc/utils.inc.php

@@ -49,13 +49,6 @@ function uri2title($sValue) {
     );
 }
 
-/*
- * functions for limiting maximal word length
- */
-function strmaxwordlen($input, $len = 100) {
-    return $input;
-}
-
 /*
  * functions for limiting maximal text length
  */
@@ -248,21 +241,7 @@ function htmlspecialchars_adv( $string ) {
     return htmlspecialchars($string, ENT_COMPAT, 'UTF-8');
 }
 
-function process_text_output( $text, $maxwordlen = 100 ) {
-    return ( htmlspecialchars_adv( strmaxwordlen( $text, $maxwordlen ) ) );
-}
-
-function process_text_withlinks_output( $text, $maxwordlen = 100 ) {
-    return nl2br( html_encode( htmlspecialchars_adv( strmaxwordlen( $text, $maxwordlen ) ) ) );
-}
 
-function process_line_output( $text, $maxwordlen = 100 ) {
-    return htmlspecialchars_adv( strmaxwordlen( $text, $maxwordlen ) );
-}
-
-function process_html_output( $text, $maxwordlen = 100 ) {
-    return strmaxwordlen( $text, $maxwordlen );
-}
 
 /**
  * Send email function
@@ -504,7 +483,7 @@ function uriFilter ($s, $sEmpty = '-') {
 
     $s = get_mb_replace ('/([-^]+)/', '-', $s);
     $s = get_mb_replace ('/([-]+)$/', '', $s); // remove trailing dash
-    if (!$s) $s = '-';
+    if (!$s) $s = $sEmpty;
     return $s;
 }
 
@@ -585,7 +564,7 @@ function bx_import($sClassName, $mixedModule = array()) {
             $o = BxDolModule::getInstance($mixedModule);
             $aModule = $o->_aModule;
         } elseif (is_bool($mixedModule) && true === $mixedModule) {
-            $aModule = $GLOABLS['aModule'];
+            $aModule = $GLOBALS['aModule'];
         }
     }
 

+ 1 - 1
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -32,7 +32,7 @@ class BxBaseModGeneralModule extends BxDolModule
         $sMode = array_shift($aArgs);
 
         if (CHECK_ACTION_RESULT_ALLOWED !== ($sMsg = $this->checkAllowedBrowse())) {
-            $this->_oTemplate->displayAccessDenied ();
+            $this->_oTemplate->displayAccessDenied ($sMsg);
             exit;
         }
     

+ 0 - 9
modules/base/general/classes/BxBaseModGeneralRequest.php

@@ -18,15 +18,6 @@ class BxBaseModGeneralRequest extends BxDolRequest
     {
         parent::__construct();
     }
-
-    static function processAsAction($aModule, &$aRequest, $sClass = "Module") 
-    {
-        $sClassRequire = $aModule['class_prefix'] . $sClass;
-        $oModule = BxDolRequest::_require($aModule, $sClassRequire);
-        $aVars = array ('BaseUri' => $oModule->_oConfig->getBaseUri());
-
-        return BxDolRequest::processAsAction($aModule, $aRequest, $sClass);
-    }
 }
 
 /** @} */ 

+ 0 - 2
modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php

@@ -24,8 +24,6 @@ class BxBaseModProfileFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
 
     protected function _getProfileAndContentData ($iContentId) 
     {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
         $aContentInfo = array();
         $oProfile = false;
 

+ 1 - 1
modules/boonex/antispam/classes/BxAntispamIP.php

@@ -92,7 +92,7 @@ class BxAntispamIP extends BxDol
         if (preg_match('/^[0-9]+$/', $mixedIP))
             $iIP = $mixedIP;
         else
-            $iIP = sprintf("%u", ip2long($sIP));
+            $iIP = sprintf("%u", ip2long($mixedIP));
 
         $iExpirationInSec = time() + (int)$iExpirationInSec;
 

+ 1 - 1
modules/boonex/convos/classes/BxCnvCmts.php

@@ -23,7 +23,7 @@ class BxCnvCmts extends BxTemplCmts
 
         bx_import('BxDolModule');
         $oModule = BxDolModule::getInstance('bx_convos');
-        if (!($aContentInfo = $oModule->_oDb->getContentInfoById((int)$this->getId())))
+        if (!$oModule->_oDb->getContentInfoById((int)$this->getId()))
             return false;
 
         $aCollaborators = $oModule->_oDb->getCollaborators((int)$this->getId());

+ 4 - 12
modules/boonex/sites/request.php

@@ -17,20 +17,12 @@ check_logged();
 bx_import('BxDolLanguages');
 bx_import('BxDolRequest');
 
-class BxSitesRequest extends BxDolRequest {
-
-    function __construct() {
+class BxSitesRequest extends BxDolRequest 
+{
+    function __construct() 
+    {
         parent::__construct();
     }
-
-    static function processAsAction($aModule, &$aRequest, $sClass = "Module") {
-
-        $sClassRequire = $aModule['class_prefix'] . $sClass;
-        $oModule = BxDolRequest::_require($aModule, $sClassRequire);
-        $aVars = array ('BaseUri' => $oModule->_oConfig->getBaseUri());
-
-        return BxDolRequest::processAsAction($aModule, $aRequest, $sClass);
-    }
 }
 
 BxSitesRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);

+ 0 - 2
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -334,7 +334,6 @@ class BxTimelineModule extends BxDolModule
             return array();
 
 		$this->_iOwnerId = $iProfileId;
-        list($sUserName, $sUserUrl) = $this->getUserInfo($iProfileId);
 
         if($this->isAllowedPost() !== true)
             return array();
@@ -868,7 +867,6 @@ class BxTimelineModule extends BxDolModule
     	$sType = bx_get('type');
 		$aParams['type'] = $sType !== false ? bx_process_input($sType, BX_DATA_TEXT) : BX_TIMELINE_TYPE_OWNER;
 
-		$iOwnerId = bx_get('owner_id');
 		$aParams['owner_id'] = $sType !== false ? bx_process_input(bx_get('owner_id'), BX_DATA_INT) : $this->getUserId();
 
         $iStart = bx_get('start');

+ 0 - 5
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -447,7 +447,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
     public function getAttachLinkField($iUserId)
     {
     	$sStylePrefix = $this->_oConfig->getPrefix('style');
-    	$sJsObject = $this->_oConfig->getJsObject('post');
 
     	$aLinks = $this->_oDb->getUnusedLinks($iUserId);
 
@@ -593,7 +592,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
     }
 
     protected function _getTmplVarsMenuItemManage(&$aEvent) {
-    	$oModule = $this->getModule();
 
 		bx_import('BxDolMenu');
 		$oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_manage'));
@@ -612,7 +610,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
     }
 
     protected function _getTmplVarsMenuItemActions(&$aEvent) {
-    	$oModule = $this->getModule();
 
 		bx_import('BxDolMenu');
 		$oMenu = BxDolMenu::getObjectInstance($this->_oConfig->getObject('menu_item_actions'));
@@ -779,8 +776,6 @@ class BxTimelineTemplate extends BxDolModuleTemplate
 	protected function _getTmplVarsContentShare($aContent, $aBrowseParams = array())
     {
     	$sStylePrefix = $this->_oConfig->getPrefix('style');
-    	$sCommonPrefix = $this->_oConfig->getPrefix('common_post');
-		$sJsObject = $this->_oConfig->getJsObject('view');
 
 		$sOwnerLink = $this->parseHtmlByName('bx_a.html', array(
 			'href' => $aContent['owner_url'],

+ 0 - 1
samples/connections.php

@@ -206,7 +206,6 @@ function GenerateData($iMutual = 3, $iOneWay = 1, $sTable, $sType, $sObject) {
 
             echo "{$aProfile['id']} " . ($i < $iMutual ? '&lt;=&gt;' : '=&gt;') . " {$r['id']}  <br />\n";
 
-            $aQueries = array();
             if ($i < $iMutual) {
                 // mutual
                 if (!$oConnection->isConnected($aProfile['id'], $r['id'], true)) {

+ 0 - 2
search_home.php

@@ -48,8 +48,6 @@ class BxDolPageSearchMain extends BxDolPageView {
 
     function getBlockCode_People() {
 
-        global $logged;
-
         $iProfileId = getLoggedId();
         $aProfile = $iProfileId ? getProfileInfo($iProfileId) : array();
 

+ 1 - 2
template/scripts/BxBaseCmts.php

@@ -150,7 +150,7 @@ class BxBaseCmts extends BxDolCmts {
 
         list($sAuthorName, $sAuthorLink, $sAuthorIcon) = $this->_getAuthorInfo($aCmt['cmt_author_id']);
 
-        $sClass = $sRet = '';
+        $sClass = '';
         if(isset($aCmt['vote_rate']) && (float)$aCmt['vote_rate'] < $this->_aSystem['viewing_threshold']) {
         	$oTemplate->pareseHtmlByName('comment_hidden.html', array(
         		'js_object' => $this->_sJsObjName,
@@ -389,7 +389,6 @@ class BxBaseCmts extends BxDolCmts {
 
 	protected function _getActionsBox(&$aCmt, $aDp = array())
     {
-    	$iUserId = $this->_getAuthorId();
     	$oTemplate = BxDolTemplate::getInstance();
 
     	//--- Actions Menu

+ 1 - 1
template/scripts/BxBaseConfig.php

@@ -82,7 +82,7 @@ class BxBaseConfig extends BxDol implements iBxDolSingleton {
         if (array_key_exists($sName, $this->_aConfig))
             return $this->_aConfig[$sName];
 
-        trigger_error('Undefined property "' . $aName . '" in ' . get_class($this), E_USER_ERROR);
+        trigger_error('Undefined property "' . $sName . '" in ' . get_class($this), E_USER_ERROR);
 
         return null;
     }

+ 0 - 1
template/scripts/BxBaseGrid.php

@@ -75,7 +75,6 @@ class BxBaseGrid extends BxDolGrid {
     public function performActionEnable() {
         $this->_replaceMarkers ();
 
-        $iAffected = 0;
         $aIds = bx_get('ids');
         if (!$aIds || !is_array($aIds)) {
             $this->_echoResultJson(array());

+ 0 - 1
template/scripts/BxBaseMenuSubmenu.php

@@ -76,7 +76,6 @@ class BxBaseMenuSubmenu extends BxTemplMenu
         if (is_array($this->_mixedMainMenuItemSelected))
             return $this->_mixedMainMenuItemSelected;
 
-        $aRet = array();
         if (!isset($this->_aObject['menu_items']))
             $this->_aObject['menu_items'] = $this->_oQuery->getMenuItems();
 

+ 0 - 1
template/scripts/BxBaseSearchResult.php

@@ -201,7 +201,6 @@ EOF;
     function showPagination($bAdmin = false, $bChangePage = true, $bPageReload = true)
     {
         $oMain = $this->getMain();
-        $oConfig = $oMain->_oConfig;
 
         $sPageUrl = $this->getCurrentUrl(array(), false);
         $sOnClick = $this->getCurrentOnclick(array(), false);

+ 0 - 1
template/scripts/BxBaseServiceProfiles.php

@@ -181,7 +181,6 @@ class BxBaseServiceProfiles extends BxDol
 
     protected function _getLatestModuleTimestamp () 
     {
-        $aRet = array();
         bx_import('BxDolModuleQuery');
         $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1, 'order_by' => '`date` ASC'));
         if (empty($aModules))

+ 0 - 2
template/scripts/BxBaseVote.php

@@ -172,8 +172,6 @@ class BxBaseVote extends BxDolVote
     	$iMinValue = $this->getMinValue();
     	$iMaxValue = $this->getMaxValue();
 
-    	$aVote = $this->_oQuery->getVote($this->getId());
-
     	$aTmplVarsButtons = $aTmplVarsStars = array();
     	for($i = $iMinValue; $i <= $iMaxValue; $i++) {
     		$aTmplVarsStars[] = array(

+ 1 - 1
upgrade/classes/BxDolUpgradeDb.php

@@ -281,7 +281,7 @@ class BxDolUpgradeDb
     /**
      * execute sql query and return table of records as result
      */
-    function getPairs($query, $sFieldKey, $sFieldValue, $arr_type = MYSQL_ASSOC)
+    function getPairs($query, $sFieldKey, $sFieldValue)
     {
         if(!$query)
             return array();