diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-01-26 21:15:16 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-01-26 21:15:16 +0000 |
commit | 4a73d939e03ea8d57719f52681dd919dc106ed5f (patch) | |
tree | 359d195741c5e2324adac9f06e8d729d02511576 /picture.php | |
parent | 4f216a5caceb53072c6062a7e7af2a19cc3bb341 (diff) |
feature 2548 multisize - small fixes
git-svn-id: http://piwigo.org/svn/trunk@12958 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'picture.php')
-rw-r--r-- | picture.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/picture.php b/picture.php index fd169575b..dac560dfe 100644 --- a/picture.php +++ b/picture.php @@ -156,8 +156,11 @@ function default_picture_content($content, $element_info) if (isset($_COOKIE['picture_deriv'])) { - pwg_set_session_var('picture_deriv', $_COOKIE['picture_deriv']); - setcookie('picture_deriv', false, 0); + if ( array_key_exists($_COOKIE['picture_deriv'], ImageStdParams::get_defined_type_map()) ) + { + pwg_set_session_var('picture_deriv', $_COOKIE['picture_deriv']); + } + setcookie('picture_deriv', false, 0, cookie_path() ); } $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE); $selected_derivative = $element_info['derivatives'][$deriv_type]; @@ -194,6 +197,7 @@ function default_picture_content($content, $element_info) $template->assign( array( 'ALT_IMG' => $element_info['file'], + 'COOKIE_PATH' => cookie_path(), ) ); return $template->parse( 'default_content', true); |