Revision 1953
Added by darkviper about 11 years ago
index.php | ||
---|---|---|
135 | 135 |
|
136 | 136 |
// --- build parent pages list ----------------------------------------------------------- |
137 | 137 |
$aParents = $oPageTree->getParentList(); |
138 |
$aFirstEntry = array();
|
|
139 |
$aFirstEntry['ID'] = 0;
|
|
140 |
$aFirstEntry['TITLE'] = $TEXT['NONE'];
|
|
141 |
$aFirstEntry['DISABLED'] = 0;
|
|
142 |
$aFirstEntry['PARENT'] = 99;
|
|
143 |
$aFirstEntry['FLAG_ROOT_ICON'] = '';
|
|
144 |
$aFirstEntry['LEVEL'] = 0;
|
|
145 |
$aFirstEntry['LANGUAGE'] = '';
|
|
146 |
array_unshift($aParents, $aFirstEntry);
|
|
138 |
$aNewEntry = array();
|
|
139 |
$aNewEntry['page_id'] = 0;
|
|
140 |
$aNewEntry['menu_title'] = $TEXT['NONE'];
|
|
141 |
$aNewEntry['disabled'] = 0;
|
|
142 |
$aNewEntry['parent'] = 99;
|
|
143 |
$aNewEntry['flag_root_icon'] = '';
|
|
144 |
$aNewEntry['level'] = 0;
|
|
145 |
$aNewEntry['language'] = '';
|
|
146 |
array_unshift($aParents, $aNewEntry);
|
|
147 | 147 |
reset($aParents); |
148 | 148 |
$oTpl->set_block('main_block', 'parents_list_block', 'parents_list'); |
149 | 149 |
// walk through all items |
150 | 150 |
while (list(, $aItem) = each($aParents)) { |
151 | 151 |
if($admin->get_permission('pages_add')) { |
152 |
$aNewEntry = array(); |
|
153 |
$aNewEntry['ID'] = $aItem['page_id']; |
|
154 |
$aNewEntry['PARENT'] = $aItem['parent']; |
|
155 |
$aNewEntry['LEVEL'] = $aItem['level']; |
|
156 |
$aNewEntry['LANGUAGE'] = $aItem['language']; |
|
157 |
$aNewEntry['FLAG_ROOT_ICON'] = ''; |
|
152 | 158 |
// modify item |
153 |
$aItem['DISABLED'] = ($aItem['DISABLED'] ? ' disabled="disabled" class="disabled"' : '');
|
|
154 |
if(!$aItem['PARENT']) {
|
|
155 |
$aItem['FLAG_ROOT_ICON'] = ' style="background-image: url('.THEME_REL.'/images/flags/'
|
|
159 |
$aNewEntry['DISABLED'] = ($aItem['disabled'] ? ' disabled="disabled" class="disabled"' : '');
|
|
160 |
if(!$aItem['parent']) {
|
|
161 |
$aNewEntry['FLAG_ROOT_ICON'] = ' style="background-image: url('.THEME_REL.'/images/flags/'
|
|
156 | 162 |
. strtolower($aItem['LANGUAGE']).'.png);"'; |
157 | 163 |
} |
158 |
$aItem['TITLE'] = str_repeat('- ', $aItem['LEVEL']).$aItem['TITLE'];
|
|
164 |
$aNewEntry['TITLE'] = str_repeat('- ', $aItem['level']).$aItem['menu_title'];
|
|
159 | 165 |
// write block into template |
160 |
$oTpl->set_var($aItem);
|
|
166 |
$oTpl->set_var($aNewEntry);
|
|
161 | 167 |
$oTpl->parse('parents_list', 'parents_list_block', true); |
162 | 168 |
} |
163 | 169 |
} |
164 | 170 |
unset($aParents); |
165 |
|
|
166 | 171 |
// --- build modules list ---------------------------------------------------------------- |
167 | 172 |
$bMatch = false; |
168 | 173 |
$aModulePermissions = '\''.implode(',', $_SESSION['MODULE_PERMISSIONS']).'\''; |
Also available in: Unified diff
solved some problems with MultiLingual module