Changeset 15907
- Timestamp:
- 01/23/12 17:53:24 (4 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
inc/classes/BxDolForm.php (modified) (1 diff)
-
inc/classes/BxDolMenu.php (modified) (2 diffs)
-
templates/base/scripts/BxBaseFormView.php (modified) (1 diff)
-
templates/base/scripts/BxBaseMenu.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolForm.php
r15905 r15907 969 969 */ 970 970 protected function _isVisible ($aInput) { 971 bx_import('BxDolAcl'); 972 echo $aInput['name'] . ' - ' . BxDolAcl::getInstance()->isMemberLevelInSet($aInput['visible_for_levels']) . '<br />'; 971 bx_import('BxDolAcl'); 973 972 return BxDolAcl::getInstance()->isMemberLevelInSet($aInput['visible_for_levels']); 974 973 } -
trunk/inc/classes/BxDolMenu.php
r15903 r15907 103 103 parent::__construct(); 104 104 105 $this->_sObject = $aObject['object'];105 $this->_sObject = isset($aObject['object']) ? $aObject['object'] : 'bx-menu-obj-' . time() . rand(0, PHP_INT_MAX); 106 106 $this->_aObject = $aObject; 107 107 $this->_oQuery = new BxDolMenuQuery($this->_aObject); … … 166 166 */ 167 167 protected function _isSelected ($a) { 168 return $a['module'] == self::$SEL_MODULE&& $a['name'] == self::$SEL_NAME ? true : false;168 return (!isset($a['module']) || $a['module'] == self::$SEL_MODULE) && $a['name'] == self::$SEL_NAME ? true : false; 169 169 } 170 170 -
trunk/templates/base/scripts/BxBaseFormView.php
r15905 r15907 162 162 $sCont = ''; 163 163 foreach ($this->aInputs as $aInput) 164 if ( $this->_isVisible($aInput))164 if (!isset($aInput['visible_for_levels']) || $this->_isVisible($aInput)) 165 165 $sCont .= $this->genRow($aInput); 166 166 -
trunk/templates/base/scripts/BxBaseMenu.php
r15901 r15907 55 55 foreach ($this->_aObject['menu_items'] as $a) { 56 56 57 if ( !$a['active'])57 if (isset($a['active']) && !$a['active']) 58 58 continue; 59 59 60 if ( !$this->_isVisible($a))60 if (isset($a['visible_for_levels']) && !$this->_isVisible($a)) 61 61 continue; 62 62 … … 65 65 66 66 $a['class_add'] = $this->_isSelected($a) ? 'bx-menu-tab-active' : ''; 67 $a['link'] = $this->_oPermalinks->permalink($a['link']);67 $a['link'] = isset($a['link']) ? $this->_oPermalinks->permalink($a['link']) : 'javascript:void(0);'; 68 68 $a['title'] = _t($a['title']); 69 69
Note: See TracChangeset
for help on using the changeset viewer.