Changeset 16104 for extensions/SmartAlbums/admin/cat_list.php
- Timestamp:
- Jun 27, 2012, 9:19:07 PM (12 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/admin/cat_list.php
r12863 r16104 11 11 // | initialization | 12 12 // +-----------------------------------------------------------------------+ 13 $base_url = get_root_url() .'admin.php?page=';14 $self_url = SMART_ADMIN .'-albums';13 $base_url = get_root_url() . 'admin.php?page='; 14 $self_url = SMART_ADMIN . '-cat_list'; 15 15 16 16 $categories = array(); 17 17 $query = ' 18 SELECT id, name, permalink, dir, rank, status 18 SELECT 19 id, 20 name, 21 permalink, 22 dir, 23 rank, 24 status 19 25 FROM '.CATEGORIES_TABLE.' AS cat 20 26 INNER JOIN '.CATEGORY_FILTERS_TABLE.' AS cf … … 50 56 { 51 57 $_SESSION['page_infos'] = array(l10n('SmartAlbum added')); 52 $redirect_url = $base_url.'cat_modify&cat_id='.$output_create['id'].'&new_smart';58 $redirect_url = SMART_ADMIN . '-album&cat_id='.$output_create['id'].'&new_smart'; 53 59 redirect($redirect_url); 54 60 } … … 57 63 else if (isset($_GET['smart_generate'])) 58 64 { 59 /* regenerate photo list | all (sub)categories */65 /* regenerate photo list | all categories */ 60 66 if ($_GET['smart_generate'] == 'all') 61 67 { … … 63 69 { 64 70 $associated_images = smart_make_associations($category['id']); 65 array_push( 66 $page['infos'], 67 sprintf( 68 l10n('%d photos associated to album %s'), 71 array_push($page['infos'], 72 sprintf(l10n('%d photos associated to album %s'), 69 73 count($associated_images), 70 '«'.trigger_event( 71 'render_category_name', 72 $category['name'], 73 'admin_cat_list' 74 ).'»' 74 '«'.trigger_event('render_category_name', $category['name'], 'admin_cat_list').'»' 75 75 ) 76 76 ); … … 81 81 { 82 82 $associated_images = smart_make_associations($_GET['smart_generate']); 83 array_push( 84 $page['infos'], 85 sprintf( 86 l10n('%d photos associated to album %s'), 83 array_push($page['infos'], 84 sprintf(l10n('%d photos associated to album %s'), 87 85 count($associated_images), 88 '«'.trigger_event( 89 'render_category_name', 90 $categories[$_GET['smart_generate']]['name'], 91 'admin_cat_list' 92 ).'»' 86 '«'.trigger_event('render_category_name', $categories[ $_GET['smart_generate'] ]['name'], 'admin_cat_list').'»' 93 87 ) 94 88 ); … … 122 116 { 123 117 array_push($page['warnings'], l10n('Only SmartAlbums are displayed on this page')); 124 array_push($page['warnings'], l10n('To order albums please go the main albums management page'));118 array_push($page['warnings'], sprintf(l10n('To order albums please go the main albums <a href="%s">management page</a>'), $base_url.'cat_list')); 125 119 array_push($page['warnings'], '<a href="'.$self_url.'&hide_messages">['.l10n('Don\'t show this message again').']</a>'); 126 120 } … … 147 141 $tpl_cat = 148 142 array( 149 'NAME' => get_cat_display_name_from_id($category['id'], $base_url.' cat_modify&cat_id='),143 'NAME' => get_cat_display_name_from_id($category['id'], $base_url.'album-'), 150 144 'ID' => $category['id'], 151 145 'RANK' => $category['rank']*10, … … 157 151 ), 158 152 159 'U_EDIT' => $base_url.' cat_modify&cat_id='.$category['id'],153 'U_EDIT' => $base_url.'album-'.$category['id'], 160 154 'U_DELETE' => $self_url.'&delete='.$category['id'].'&pwg_token='.get_pwg_token(), 161 155 'U_SMART' => $self_url.'&smart_generate='.$category['id'], … … 167 161 $base_url.'batch_manager&cat='.$category['id']; 168 162 } 169 170 if ('private' == $category['status'])171 {172 $tpl_cat['U_MANAGE_PERMISSIONS'] =173 $base_url.'cat_perm&cat='.$category['id'];174 }175 163 176 164 $template->append('categories', $tpl_cat); 177 165 } 178 166 167 $template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/cat_list.tpl'); 168 179 169 ?>
Note: See TracChangeset
for help on using the changeset viewer.