- Timestamp:
- Aug 25, 2012, 3:22:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/header_manager/include/header_manager.inc.php
r17012 r17644 8 8 { 9 9 global $conf, $user, $template, $page; 10 11 if (defined('IN_ADMIN')) return $page_banner;12 10 13 11 // search banner for a specific category … … 28 26 if (count($cat_banners)) 29 27 { 30 function uppercats_sort($a, $b) 31 { 32 global $page; 33 $ids = explode(',', $page['category']['uppercats']); 34 return array_search($a['category_id'], $ids) < array_search($b['category_id'], $ids); 35 } 36 usort($cat_banners, 'uppercats_sort'); 28 usort($cat_banners, 'hm_uppercats_sort'); 37 29 38 30 foreach ($cat_banners as $cat_banner) … … 106 98 } 107 99 108 /** 109 * Header Manager admin link 110 */ 111 function header_manager_admin_menu($menu) 100 function hm_uppercats_sort($a, $b) 112 101 { 113 array_push($menu, array( 114 'NAME' => 'Header Manager', 115 'URL' => HEADER_MANAGER_ADMIN, 116 )); 117 return $menu; 118 } 119 120 /** 121 * tab on album edition page 122 */ 123 function header_manager_tab($sheets, $id) 124 { 125 if ($id == 'album') 126 { 127 load_language('plugin.lang', HEADER_MANAGER_PATH); 128 129 $sheets['headermanager'] = array( 130 'caption' => l10n('Banner'), 131 'url' => HEADER_MANAGER_ADMIN.'-album&cat_id='.$_GET['cat_id'], 132 ); 133 } 134 135 return $sheets; 102 global $page; 103 $ids = explode(',', $page['category']['uppercats']); 104 return array_search($a['category_id'], $ids) < array_search($b['category_id'], $ids); 136 105 } 137 106
Note: See TracChangeset
for help on using the changeset viewer.