From 17de4268b03431b38a6c23f681bac180a9fefa3f Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Wed, 11 May 2022 21:15:58 +0200 Subject: [PATCH] Drop webPath and webVersionPath in JavaScript --- dev/Common/Links.js | 8 ++++---- snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dev/Common/Links.js b/dev/Common/Links.js index 977094de9..8feaffa71 100644 --- a/dev/Common/Links.js +++ b/dev/Common/Links.js @@ -5,7 +5,7 @@ const HASH_PREFIX = '#/', SERVER_PREFIX = './?', VERSION = Settings.app('version'), - VERSION_PREFIX = () => Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/', + VERSION_PREFIX = 'snappymail/v/' + VERSION + '/', adminPath = () => rl.adminArea() && !Settings.app('adminHostUse'), @@ -68,17 +68,17 @@ export const * @param {string} path * @returns {string} */ - staticLink = path => VERSION_PREFIX() + 'static/' + path, + staticLink = path => VERSION_PREFIX + 'static/' + path, /** * @param {string} theme * @returns {string} */ themePreviewLink = theme => { - let prefix = VERSION_PREFIX(); + let prefix = VERSION_PREFIX; if ('@custom' === theme.slice(-7)) { theme = theme.slice(0, theme.length - 7).trim(); - prefix = Settings.app('webPath') || ''; + prefix = ''; } return prefix + 'themes/' + encodeURI(theme) + '/images/preview.png'; diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php index 924f8ee36..1e1649713 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions.php @@ -663,8 +663,6 @@ class Actions return \array_merge(array( 'version' => APP_VERSION, 'admin' => $bAdmin, - 'webPath' => Utils::WebPath(), - 'webVersionPath' => Utils::WebVersionPath(), 'token' => $oConfig->Get('security', 'csrf_protection', false) ? Utils::GetCsrfToken() : '', 'inIframe' => (bool)$oConfig->Get('labs', 'in_iframe', false), 'allowHtmlEditorBitiButtons' => (bool)$oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),