diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/add_index/admin/main_page.php | 9 | ||||
-rw-r--r-- | plugins/add_index/admin/main_page.tpl | 16 |
2 files changed, 11 insertions, 14 deletions
diff --git a/plugins/add_index/admin/main_page.php b/plugins/add_index/admin/main_page.php index 3b1609629..20b724d65 100644 --- a/plugins/add_index/admin/main_page.php +++ b/plugins/add_index/admin/main_page.php @@ -124,7 +124,7 @@ order by //echo $galleries_url.'<BR>'; foreach (get_add_index_directories($galleries_url) as $dir_galleries) { - $file_dest = $dir_galleries.'/'.$conf['add_index_filename']; + $file_dest = str_replace('//', '/', $dir_galleries.'/'.$conf['add_index_filename']); if ($overwrite_file or !@file_exists($file_dest)) { if (copy($index_file_src, $file_dest)) @@ -188,13 +188,10 @@ else // | template initialization |
// +-----------------------------------------------------------------------+
$template->set_filenames(array('main_page' => dirname(__FILE__).'/main_page.tpl'));
-
+ if (count($add_index_results) != 0)
{
- foreach ($add_index_results as $result)
- {
- $template->assign_block_vars('add_index_results.result', array('RESULT' => $result));
- }
+ $template->assign('add_index_results', $add_index_results); }
// +-----------------------------------------------------------------------+
diff --git a/plugins/add_index/admin/main_page.tpl b/plugins/add_index/admin/main_page.tpl index 591ff7fc0..f5ad40298 100644 --- a/plugins/add_index/admin/main_page.tpl +++ b/plugins/add_index/admin/main_page.tpl @@ -1,15 +1,15 @@ -<!-- DEV TAG: not smarty migrated --> -<!-- $Id: notification_by_mail.tpl Ruben ARNAUD --> +{* $Id$ *} + <div class="titrePage"> - <h2>{lang:Add_Index}</h2> + <h2>{'Add_Index'|@translate}</h2> </div> -<!-- BEGIN add_index_results --> +{if isset($add_index_results)} <div> <ul> - <!-- BEGIN result --> - <li>{add_index_results.result.RESULT}</li> - <!-- END result --> + {foreach from=$add_index_results item=result} + <li>{$result}</li> + {/foreach} </ul> </div> -<!-- END add_index_results --> +{/if} |