Changeset 11392 for extensions/SmartAlbums/include/init_cat_list.php
- Timestamp:
- Jun 16, 2011, 12:54:59 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/include/init_cat_list.php
r11376 r11392 31 31 ;'; 32 32 33 $result = pwg_query($query); 34 $smart_cats = array(); 35 while ($cat = pwg_db_fetch_assoc($result)) 36 { 37 $smart_cats[$cat['id']] = trigger_event('render_category_name', $cat['name']); 38 } 39 33 $smart_cats = hash_from_query($query, 'id'); 40 34 $smart_count = count($smart_cats); 41 35 … … 45 39 if ($_GET['smart_generate'] == 'all') 46 40 { 47 foreach ($smart_cats as $cat => $name)41 foreach ($smart_cats as $category) 48 42 { 49 $associated_images = smart_make_associations($cat );43 $associated_images = smart_make_associations($category['id']); 50 44 array_push( 51 45 $page['infos'], 52 46 l10n_args(get_l10n_args( 53 47 '%d photos associated to album «%s»', 54 array(count($associated_images), $name) 48 array( 49 count($associated_images), 50 trigger_event( 51 'render_category_name', 52 $category['name'], 53 'admin_cat_list' 54 ) 55 ) 55 56 )) 56 57 ); … … 65 66 l10n_args(get_l10n_args( 66 67 '%d photos associated to album «%s»', 67 array(count($associated_images), $smart_cats[$_GET['smart_generate']]) 68 array( 69 count($associated_images), 70 trigger_event( 71 'render_category_name', 72 $smart_cats[$_GET['smart_generate']]['name'], 73 'admin_cat_list' 74 ) 75 ) 68 76 )) 69 77 ); … … 98 106 $replacement[0] = ' 99 107 {if isset($SMART_URL[$category.ID])} 100 <li><a href="{$SMART_URL[$category.ID]}" title="{\'Regenerate photos list of this SmartAlbum\'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{\' regenerate photos list\'|@translate}"></a></li>108 <li><a href="{$SMART_URL[$category.ID]}" title="{\'Regenerate photos list of this SmartAlbum\'|@translate}"><img src="{$ROOT_URL}{$themeconf.admin_icon_dir}/synchronize.png" class="button" alt="{\'Regenerate photos list of this SmartAlbum\'|@translate}"></a></li> 101 109 {/if}' 102 110 .$search[0];
Note: See TracChangeset
for help on using the changeset viewer.