diff --git a/profile.php b/profile.php index 1b649132a..7f46e7eab 100644 --- a/profile.php +++ b/profile.php @@ -103,7 +103,8 @@ SELECT '.implode(',', $fields).' $template->assign(array( 'language_options' => $language_options, - 'language_selection' => $user['language'] + 'language_selection' => $user['language'], + 'COOKIE_PATH' => cookie_path(), )); //Get link to doc diff --git a/themes/standard_pages/template/identification.tpl b/themes/standard_pages/template/identification.tpl index 54c3d3c82..7cd0fcbf4 100644 --- a/themes/standard_pages/template/identification.tpl +++ b/themes/standard_pages/template/identification.tpl @@ -5,6 +5,7 @@ var selected_language = `{$language_options[$current_language]}`; var url_logo_light = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo.svg`; var url_logo_dark = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo_dark.svg`; + var cookie_path = '{$COOKIE_PATH|@escape:'javascript'}'; {combine_script id='standard_pages_js' load='async' require='jquery' path='themes/standard_pages/js/standard_pages.js'} diff --git a/themes/standard_pages/template/password.tpl b/themes/standard_pages/template/password.tpl index e01aa7c00..2ea5bf563 100644 --- a/themes/standard_pages/template/password.tpl +++ b/themes/standard_pages/template/password.tpl @@ -5,6 +5,7 @@ var selected_language = `{$language_options[$current_language]}`; var url_logo_light = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo.svg`; var url_logo_dark = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo_dark.svg`; + var cookie_path = '{$COOKIE_PATH|@escape:'javascript'}'; {combine_script id='standard_pages_js' load='async' require='jquery' path='themes/standard_pages/js/standard_pages.js'} diff --git a/themes/standard_pages/template/profile.tpl b/themes/standard_pages/template/profile.tpl index 5ea4f638b..ae29c9ef6 100644 --- a/themes/standard_pages/template/profile.tpl +++ b/themes/standard_pages/template/profile.tpl @@ -6,6 +6,7 @@ var selected_language = `{$language_options[$language_selection]}`; var url_logo_light = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo.svg`; var url_logo_dark = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo_dark.svg`; + var cookie_path = '{$COOKIE_PATH|@escape:'javascript'}'; {combine_script id='standard_pages_js' load='async' require='jquery' path='themes/standard_pages/js/standard_pages.js'} {combine_script id='standard_profile_js' load='footer' require='jquery' path='themes/standard_pages/js/profile.js'} diff --git a/themes/standard_pages/template/register.tpl b/themes/standard_pages/template/register.tpl index b563d4e5a..7fb97ee9c 100644 --- a/themes/standard_pages/template/register.tpl +++ b/themes/standard_pages/template/register.tpl @@ -5,6 +5,7 @@ var selected_language = `{$language_options[$current_language]}`; var url_logo_light = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo.svg`; var url_logo_dark = `{$ROOT_URL}themes/standard_pages/images/piwigo_logo_dark.svg`; + var cookie_path = '{$COOKIE_PATH|@escape:'javascript'}'; {combine_script id='standard_pages_js' load='async' require='jquery' path='themes/standard_pages/js/standard_pages.js'}