- Timestamp:
- 11/28/11 04:20:04 (6 months ago)
- Location:
- trunk/inc
- Files:
-
- 2 edited
-
classes/BxDolLanguagesQuery.php (modified) (2 diffs)
-
languages.inc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolLanguagesQuery.php
r15664 r15706 29 29 */ 30 30 static function getInstance() { 31 if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) { 32 bx_import('BxTemplMenu'); 31 if(!isset($GLOBALS['bxDolClasses'][__CLASS__])) 33 32 $GLOBALS['bxDolClasses'][__CLASS__] = new BxDolLanguagesQuery(); 34 }35 33 36 34 return $GLOBALS['bxDolClasses'][__CLASS__]; … … 66 64 $sWhereClause .= $this->prepare(" AND `tl`.`Name`=?", $aParams['value']); 67 65 break; 66 case 'default': 67 $aMethod['name'] = 'getRow'; 68 $sWhereClause .= $this->prepare(" AND `tl`.`Name`=?", $this->getParam('lang_default')); 69 break; 68 70 case 'active': 69 71 $sWhereClause = " AND `tl`.`Enabled`='1'"; -
trunk/inc/languages.inc.php
r15698 r15706 325 325 326 326 $sKey = bx_process_input($sKey); 327 $ sString = bx_process_input($mixedString);327 $mixedString = bx_process_input($mixedString); 328 328 329 329 $oDb = BxDolLanguagesQuery::getInstance(); … … 350 350 } 351 351 352 return true;352 return $iKeyId; 353 353 } 354 354 … … 368 368 } 369 369 370 function updateLanguageStringById($iKeyId, $ sString, $iLangId = 0, $bRecompile = true) {370 function updateLanguageStringById($iKeyId, $mixedString, $iLangId = 0, $bRecompile = true) { 371 371 $iKeyId = (int)$iKeyId; 372 $ sString = bx_process_input($sString);372 $mixedString = bx_process_input($mixedString); 373 373 $iLangId = (int)$iLangId; 374 374 … … 380 380 381 381 foreach($aLanguages as $aLanguage) { 382 if(!$oDb->updateString($iKeyId, $aLanguage['id'], $sString)) 383 return false; 384 385 if($bRecompile) 382 $sString = ''; 383 if(is_string($mixedString)) 384 $sString = $mixedString; 385 else if(is_array($mixedString)) 386 $sString = $mixedString[$aLanguage['id']]; 387 388 if($oDb->updateString($iKeyId, $aLanguage['id'], $sString) && $bRecompile) 386 389 compileLanguage($aLanguage['id']); 387 390 }
Note: See TracChangeset
for help on using the changeset viewer.