aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2009-01-22 02:19:17 +0000
committerrvelices <rv-github@modusoptimus.com>2009-01-22 02:19:17 +0000
commitfef4f255b5c91e1caa862c99b2afd8d94eca2cc8 (patch)
tree411978bbdfa4d931a2b25e20a1020e63838e361a /include/section_init.inc.php
parent5865b1e90bd29b3c1d02933446f715400e35dfc9 (diff)
- 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
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r--include/section_init.inc.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index fd93b4fea..e6eac34f3 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -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')
),
)