Revision 2076
Added by darkviper almost 11 years ago
- some fixes in admin/users
- some fixes in admin/pages
settings.php | ||
---|---|---|
114 | 114 |
{ |
115 | 115 |
$admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']); |
116 | 116 |
} |
117 |
}else { |
|
117 |
} else {
|
|
118 | 118 |
$admin->print_header(); |
119 | 119 |
$admin->print_error($database->get_error()); |
120 | 120 |
} |
... | ... | |
238 | 238 |
} |
239 | 239 |
|
240 | 240 |
/*-- collect page-icons for select boxes -----------------------------------------------*/ |
241 |
$sAllowedImageTypes = '\.jpg|\.jpeg|\.png|\.gif'; |
|
241 |
$sAllowedImageTypes = '\.jpg|\.jpeg|\.png|\.gif';
|
|
242 | 242 |
$aPageIcons = array(); |
243 | 243 |
$aIcon = array(); |
244 | 244 |
$sTemplate = ($aCurrentPage['template'] == '' ? DEFAULT_TEMPLATE : $aCurrentPage['template']); |
245 | 245 |
$sIconDir = str_replace('\\', '/', ((defined('PAGE_ICON_DIR') && PAGE_ICON_DIR != '') ? PAGE_ICON_DIR : MEDIA_DIRECTORY)); |
246 | 246 |
$sIconDir = str_replace('/*', '/'.$sTemplate, $sIconDir); |
247 |
$bIconDirHide = ($page_extend==true) ? 'display:block;' : 'display:none;'; |
|
247 |
$bMenuIconDirHide = (($page_extend==true) ? 'display:block;' : 'display:none;'); |
|
248 |
$bPageIconDirHide = (($page_extend==true) ? 'display:block;' : 'display:none;'); |
|
249 |
// $bPageIconDirHide = (($page_extend==true)||($admin->get_permission('media_view') == true) ? 'display:block;' : 'display:none;'); |
|
248 | 250 |
|
249 | 251 |
// $oTpl->set_var('ICON_DIR', WB_REL.$sIconDir); |
250 | 252 |
$sHelp = replaceVars($mLang->HELP_PAGE_IMAGE_DIR, array('icon_dir'=>WB_REL.$sIconDir ) ); |
... | ... | |
254 | 256 |
$sAccesFile = (($database->get_one($sql))); |
255 | 257 |
$sFilename = replaceVars($mLang->HELP_SEO_TITLE, array('filename'=>PAGES_DIRECTORY.$sAccesFile.PAGE_EXTENSION ) ); |
256 | 258 |
|
257 |
$oTpl->set_var('PAGE_EXTENDET_HIDE', $bIconDirHide); |
|
259 |
$oTpl->set_var('PAGE_ICONDIR_HIDE', $bPageIconDirHide); |
|
260 |
$oTpl->set_var('PAGE_EXTENDET_HIDE', $bMenuIconDirHide); |
|
258 | 261 |
$oTpl->set_var('p_page_icon_dir', p($sHelp,$mLang->TEXT_PAGE_ICON_DIR)); |
259 | 262 |
$oTpl->set_var('p_menu_icon0_dir', p($sHelp,$mLang->TEXT_MENU_ICON_0_DIR)); |
260 | 263 |
$oTpl->set_var('p_menu_icon1_dir', p($sHelp,$mLang->TEXT_MENU_ICON_1_DIR)); |
... | ... | |
495 | 498 |
$iLastEntryLevel = 0; |
496 | 499 |
$bSkipChildren = false; |
497 | 500 |
// loop through all items |
498 |
while (list(, $aPage) = each($aLangCodePagesList))
|
|
501 |
while (list(, $aPage) = each($aLangCodePagesList)) |
|
499 | 502 |
{ |
500 | 503 |
// skip child pages where current user has no rights for |
501 | 504 |
if($bSkipChildren && ($aPage['level'] > $iLastEntryLevel)) { continue; } |
... | ... | |
515 | 518 |
&& $aCurrentPage['page_code'] != 0 |
516 | 519 |
&& !$bPageCodeIsSelected |
517 | 520 |
) |
518 |
{ //
|
|
521 |
{ // |
|
519 | 522 |
$aTplItemData['PAGE_CODE_SELECTED'] = $sSelected; |
520 | 523 |
$bPageCodeIsSelected = true; |
521 | 524 |
} elseif(!$aPage['iswriteable']) |
522 |
{ //
|
|
525 |
{ // |
|
523 | 526 |
$aTplItemData['PAGE_CODE_SELECTED'] = $sDisabled.' class="disabled"'; |
524 | 527 |
$bSkipChildren = true; |
525 | 528 |
} else { |
... | ... | |
634 | 637 |
$oTpl->set_var('SELF_SELECTED', ($aCurrentPage['target'] == '_self' ? $sSelected : '')); |
635 | 638 |
$oTpl->set_var('BLANK_SELECTED', ($aCurrentPage['target'] == '_blank' ? $sSelected : '')); |
636 | 639 |
|
640 |
/*-- show_extended_input_block ---------------------------------------------------------*/ |
|
641 |
$oTpl->set_block('main_block', 'show_extended_input_block', 'extended_input'); |
|
642 |
if($admin->get_permission('settings_advanced') == true) { |
|
643 |
$oTpl->parse('extended_input', 'show_extended_input_block', true); |
|
644 |
} else { |
|
645 |
$oTpl->parse('extended_input', '', true); |
|
646 |
} |
|
637 | 647 |
/*-- insert all needed vars from language files ----------------------------------------*/ |
638 | 648 |
$oTpl->set_var($mLang->getLangArray()); |
639 | 649 |
/*-- finalize the page -----------------------------------------------------------------*/ |
... | ... | |
686 | 696 |
} |
687 | 697 |
} |
688 | 698 |
return $subject; |
689 |
} |
|
699 |
} |
Also available in: Unified diff