mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
- fix hard coded urls in section_init
- moved a language string language from php to tpl git-svn-id: http://piwigo.org/svn/trunk@3108 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -380,17 +380,16 @@ SELECT DISTINCT image_id
|
||||
)
|
||||
);
|
||||
|
||||
if (!empty($_GET['action'])
|
||||
&& ($_GET['action'] == 'remove_all_from_favorites'))
|
||||
if (!empty($_GET['action']) && ($_GET['action'] == 'remove_all_from_favorites'))
|
||||
{
|
||||
$query = '
|
||||
DELETE FROM '.FAVORITES_TABLE.'
|
||||
WHERE user_id = '.$user['id'].'
|
||||
;';
|
||||
pwg_query($query);
|
||||
redirect('index.php?/favorites');
|
||||
redirect(make_index_url( array('section'=>'favorites') ));
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$query = '
|
||||
SELECT image_id
|
||||
@@ -414,16 +413,15 @@ SELECT image_id
|
||||
)
|
||||
);
|
||||
|
||||
if (count($page['items'])>0)
|
||||
if (count($page['items'])>0)
|
||||
{
|
||||
$template->assign(
|
||||
'favorite',
|
||||
array(
|
||||
'FAVORITE_IMG' =>
|
||||
get_root_url().get_themeconf('icon_dir').'/del_all_favorites.png',
|
||||
'FAVORITE_HINT' => l10n('del_all_favorites_hint'),
|
||||
'U_FAVORITE' => add_url_params(
|
||||
'index.php?/favorites',
|
||||
make_index_url( array('section'=>'favorites') ),
|
||||
array('action'=>'remove_all_from_favorites')
|
||||
),
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{/if}
|
||||
|
||||
{if isset($favorite) }
|
||||
<li><a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a></li>
|
||||
<li><a href="{$favorite.U_FAVORITE}" title="{'del_all_favorites_hint'|@translate}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{'del_all_favorites_hint'|@translate}"></a></li>
|
||||
{/if}
|
||||
|
||||
{if isset($U_CADDIE) }
|
||||
|
||||
Reference in New Issue
Block a user