Changeset 15915
- Timestamp:
- 01/24/12 05:19:32 (4 months ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
inc/classes/BxDolAclQuery.php (modified) (1 diff)
-
modules/boonex/english/install/data/langs/en.xml (modified) (2 diffs)
-
studio/classes/BxDolStudioPermissionsLevels.php (modified) (1 diff)
-
studio/templates/base/scripts/BxBaseStudioNavigationMenus.php (modified) (2 diffs)
-
studio/templates/base/scripts/BxBaseStudioPermissionsLevels.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolAclQuery.php
r15794 r15915 57 57 $sWhereClause .= "AND `tal`.`Active`='yes' AND `tal`.`Purchasable`='yes'"; 58 58 break; 59 case 'all':60 break;61 59 case 'all_pair': 62 60 $aMethod['name'] = "getPairs"; 63 61 $aMethod['params'][1] = 'id'; 64 62 $aMethod['params'][2] = 'name'; 63 break; 64 case 'all_order_id': 65 $sOrderClause = "ORDER BY `tal`.`ID` ASC"; 66 break; 67 case 'all': 65 68 break; 66 69 } -
trunk/modules/boonex/english/install/data/langs/en.xml
r15914 r15915 2079 2079 <string name="_adm_prm_txt_level_create_popup"><![CDATA[Add New Level]]></string> 2080 2080 <string name="_adm_prm_txt_level_edit_popup"><![CDATA[Edit "{0}" Level]]></string> 2081 <string name="_adm_prm_err_level_id"><![CDATA[Membership levels limit is reached.]]></string> 2081 2082 <string name="_adm_prm_txt_level_name"><![CDATA[Title]]></string> 2082 2083 <string name="_adm_prm_dsc_level_name"><![CDATA[Short name for the membership level (i.e Premium, Gold, Newcomer, etc.)]]></string> … … 2100 2101 <string name="_adm_prm_btn_level_cancel"><![CDATA[Cancel]]></string> 2101 2102 <string name="_adm_prm_err_level_create"><![CDATA[Cannot create membership level]]></string> 2103 <string name="_adm_prm_err_level_edit"><![CDATA[Cannot update membership level]]></string> 2102 2104 <string name="_adm_prm_err_level_delete"><![CDATA[Cannot delete membership level]]></string> 2103 2105 <string name="_adm_prm_txt_level_unauthenticated"><![CDATA[Unauthenticated]]></string> -
trunk/studio/classes/BxDolStudioPermissionsLevels.php
r15817 r15915 12 12 bx_import('BxDolStudioTemplate'); 13 13 bx_import('BxDolStudioPermissionsQuery'); 14 15 define('BX_DOL_STUDIO_PERMISSIONS_LEVEL_ID_INT_MAX', round(log(PHP_INT_MAX, 2))); 14 16 15 17 class BxDolStudioPermissionsLevels extends BxTemplStudioGrid { -
trunk/studio/templates/base/scripts/BxBaseStudioNavigationMenus.php
r15914 r15915 214 214 } 215 215 216 protected function updateSetFields(&$oForm) {217 if($oForm->getCleanValue('set_name') != $this->sCreateNew)218 unset($oForm->aInputs['set_title']['checker']);219 else220 unset($oForm->aInputs['set_title']['tr_attrs']['style']);221 }222 223 216 public function performActionEdit() { 224 217 $sAction = 'edit'; … … 555 548 return $sContent; 556 549 } 550 551 protected function updateSetFields(&$oForm) { 552 if($oForm->getCleanValue('set_name') != $this->sCreateNew) 553 unset($oForm->aInputs['set_title']['checker']); 554 else 555 unset($oForm->aInputs['set_title']['tr_attrs']['style']); 556 } 557 557 } 558 558 /** @} */ -
trunk/studio/templates/base/scripts/BxBaseStudioPermissionsLevels.php
r15817 r15915 173 173 174 174 if($oForm->isSubmittedAndValid()) { 175 if(($iId = $this->getAvailableId()) === false) { 176 $this->_echoResultJson(array('msg' => _t('_adm_prm_err_level_id')), true); 177 return; 178 } 179 175 180 $mixedIcon = 'acl-authenticated.png'; 176 181 if(!empty($_FILES['Icon']['tmp_name'])) { … … 197 202 $oForm->setSubmittedValue('Name', $sTitleKey, $aForm['form_attrs']['method']); 198 203 199 $iId = (int)$oForm->insert(array('I con' => $mixedIcon, 'Order' => $this->oDb->getLevelOrderMax() + 1));204 $iId = (int)$oForm->insert(array('ID' => $iId, 'Icon' => $mixedIcon, 'Order' => $this->oDb->getLevelOrderMax() + 1)); 200 205 if($iId != 0) { 201 206 bx_import('BxDolStudioLanguagesUtils'); … … 392 397 $aRes = array('grid' => $this->getCode(false), 'blink' => $iId); 393 398 else 394 $aRes = array('msg' => _t('_adm_prm_err_level_ create'));399 $aRes = array('msg' => _t('_adm_prm_err_level_edit')); 395 400 396 401 $this->_echoResultJson($aRes, true); … … 518 523 return parent::_getActionDefault($sType, $sKey, $a, false, $isDisabled, $aRow); 519 524 } 525 526 protected function getAvailableId() { 527 $aLevels = array(); 528 $this->oDb->getLevels(array('type' =>'all_order_id'), $aLevels, false); 529 530 $iId = 1; 531 foreach($aLevels as $aLevel) { 532 if($iId != (int)$aLevel['id']) 533 break; 534 535 $iId++; 536 } 537 538 return $iId <= BX_DOL_STUDIO_PERMISSIONS_LEVEL_ID_INT_MAX ? $iId : false; 539 } 520 540 } 521 541 /** @} */
Note: See TracChangeset
for help on using the changeset viewer.