Changeset 26442 for extensions/SmartAlbums/admin/cat_list.php
- Timestamp:
- Jan 4, 2014, 4:13:08 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/admin/cat_list.php
r21658 r26442 1 1 <?php 2 if (!defined('PHPWG_ROOT_PATH'))die('Hacking attempt!');2 defined('SMART_PATH') or die('Hacking attempt!'); 3 3 4 4 if (isset($_GET['hide_messages'])) … … 16 16 $categories = array(); 17 17 $query = ' 18 SELECT 18 SELECT 19 19 id, 20 20 name, … … 51 51 if (isset($output_create['error'])) 52 52 { 53 array_push($page['errors'], $output_create['error']);53 $page['errors'][] = $output_create['error']; 54 54 } 55 55 else … … 69 69 { 70 70 $associated_images = smart_make_associations($category['id']); 71 array_push($page['infos'], 72 sprintf(l10n('%d photos associated to album %s'),73 count($associated_images),74 '«'.trigger_event('render_category_name', $category['name'], 'admin_cat_list').'»'75 )71 72 $page['infos'][] = l10n( 73 '%d photos associated to album %s', 74 count($associated_images), 75 '«'.trigger_event('render_category_name', $category['name'], 'admin_cat_list').'»' 76 76 ); 77 77 } … … 80 80 else 81 81 { 82 $associated_images = smart_make_associations($_GET['smart_generate']); 83 array_push($page['infos'], 84 sprintf(l10n('%d photos associated to album %s'),85 count($associated_images),86 '«'.trigger_event('render_category_name', $categories[ $_GET['smart_generate'] ]['name'], 'admin_cat_list').'»'87 )82 $associated_images = smart_make_associations($_GET['smart_generate']); 83 84 $page['infos'][] = l10n( 85 '%d photos associated to album %s', 86 count($associated_images), 87 '«'.trigger_event('render_category_name', $categories[ $_GET['smart_generate'] ]['name'], 'admin_cat_list').'»' 88 88 ); 89 89 } 90 90 91 91 define('SMART_NOT_UPDATE', 1); 92 92 invalidate_user_cache(); … … 100 100 'PWG_TOKEN' => get_pwg_token(), 101 101 )); 102 102 103 103 // retrieve all existing categories for album creation 104 104 $query = ' … … 108 108 109 109 display_select_cat_wrapper( 110 $query, 111 null, 110 $query, null, 112 111 'category_options' 113 112 ); 114 113 115 114 if ($conf['SmartAlbums']['show_list_messages']) 116 115 { 117 array_push($page['warnings'], l10n('Only SmartAlbums are displayed on this 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'));119 array_push($page['warnings'], '<a href="'.$self_url.'&hide_messages">['.l10n('Don\'t show this message again').']</a>');116 $page['warnings'][] = l10n('Only SmartAlbums are displayed on this page'); 117 $page['warnings'][] = sprintf(l10n('To order albums please go the main albums <a href="%s">management page</a>'), $base_url.'cat_list'); 118 $page['warnings'][] = '<a href="'.$self_url.'&hide_messages">['.l10n('Don\'t show this message again').']</a>'; 120 119 } 121 120 … … 125 124 126 125 $categories_count_images = array(); 127 if ( count($categories))126 if (count($categories)) 128 127 { 129 128 $query = ' 130 SELECT 131 category_id, 129 SELECT 130 category_id, 132 131 COUNT(image_id) AS total_images 133 132 FROM '.IMAGE_CATEGORY_TABLE.' … … 154 153 'U_SMART' => $self_url.'&smart_generate='.$category['id'], 155 154 ); 156 155 157 156 $template->append('categories', $tpl_cat); 158 157 } 159 158 160 $template->set_filename('SmartAlbums_content', dirname(__FILE__).'/template/cat_list.tpl'); 161 162 ?> 159 $template->set_filename('SmartAlbums_content', realpath(SMART_PATH . 'admin/template/cat_list.tpl'));
Note: See TracChangeset
for help on using the changeset viewer.