Changeset 2900 for trunk/news_admin/inc/hook_sidebox_menu.inc.php
- Timestamp:
- 06/07/10 12:17:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/news_admin/inc/hook_sidebox_menu.inc.php
r49 r2900 24 24 display_sidebox can be called as much as you like 25 25 */ 26 27 $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); 28 $file = Array( 29 'read news' => $GLOBALS['phpgw']->link('/news_admin/index.php'), 30 'Add New Article' => $GLOBALS['phpgw']->link('/index.php','menuaction=news_admin.uinews.add') 31 ); 26 $bo = CreateObject('news_admin.bonews',True); 27 $right = PHPGW_ACL_ADD; 28 $permited_add = false; 29 30 foreach($bo->cats as $cat) 31 { 32 if($bo->acl->is_permitted($cat['id'],$right)) 33 { 34 $permited_add = true; 35 break; 36 } 37 } 38 39 $menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu'); 40 if( $permited_add ) { 41 $file = Array( 'read news' => $GLOBALS['phpgw']->link('/news_admin/index.php'), 42 'Add New Article' => $GLOBALS['phpgw']->link('/index.php','menuaction=news_admin.uinews.add') 43 ); 44 45 } else { 46 $file = Array( 47 'read news' => $GLOBALS['phpgw']->link('/news_admin/index.php') 48 ); 49 } 32 50 display_sidebox($appname,$menu_title,$file); 33 51 … … 38 56 ); 39 57 display_sidebox($appname,$title,$file); 40 58 41 59 if ($GLOBALS['phpgw_info']['user']['apps']['admin']) 42 60 { … … 47 65 'configure access permissions' => $GLOBALS['phpgw']->link('/index.php','menuaction=news_admin.uiacl.acllist'), 48 66 'configure rss exports' => $GLOBALS['phpgw']->link('/index.php','menuaction=news_admin.uiexport.exportlist') 49 ); 50 67 ); 51 68 display_sidebox($appname,$title,$file); 69 } else if($permited_add){ 70 $title = lang('Administration'); 71 $file = Array( 72 'News Administration' => $GLOBALS['phpgw']->link('/index.php','menuaction=news_admin.uinews.write_news') 73 ); 74 display_sidebox($appname,$title,$file); 52 75 } 76 53 77 unset($title); 54 78 unset($file); 79 unset($bo); 55 80 } 56 81 ?>
Note: See TracChangeset
for help on using the changeset viewer.