From dd7d1cb521a3615176da8bf78ee4512fea6fc97c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 23 Aug 2021 19:35:59 +0200 Subject: [PATCH] [ticket/15769] Remove template var for cropping available Avatar cropping should always be available. PHPBB3-15769 --- .../adm/style/acp_avatar_options_upload.html | 124 +++++++++--------- phpBB/phpbb/avatar/driver/upload.php | 1 - .../template/ucp_avatar_options_upload.html | 122 +++++++++-------- 3 files changed, 121 insertions(+), 126 deletions(-) diff --git a/phpBB/adm/style/acp_avatar_options_upload.html b/phpBB/adm/style/acp_avatar_options_upload.html index 4aa6084323..2c998078df 100644 --- a/phpBB/adm/style/acp_avatar_options_upload.html +++ b/phpBB/adm/style/acp_avatar_options_upload.html @@ -3,69 +3,67 @@
-{% if S_CROPPING_AVAILABLE %} - {% INCLUDECSS T_ASSETS_PATH ~ '/css/cropper.min.css' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/cropper.min.js' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/jquery-cropper.js' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/phpbb-avatars.js' %} +{% INCLUDECSS T_ASSETS_PATH ~ '/css/cropper.min.css' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/cropper.min.js' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/jquery-cropper.js' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/phpbb-avatars.js' %} - + - {% apply spaceless %} -
-
- - -
- -
- - - - -
- -
- - -
- -
- - -
- -
- - -
+{% apply spaceless %} +
+
+ +
- {% endapply %} -{% endif %} + +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+{% endapply %} diff --git a/phpBB/phpbb/avatar/driver/upload.php b/phpBB/phpbb/avatar/driver/upload.php index dd8a9d89c3..2d51704748 100644 --- a/phpBB/phpbb/avatar/driver/upload.php +++ b/phpBB/phpbb/avatar/driver/upload.php @@ -107,7 +107,6 @@ class upload extends \phpbb\avatar\driver\driver $template->assign_vars([ 'AVATAR_ALLOWED_EXTENSIONS' => implode(',', preg_replace('/^/', '.', $this->allowed_extensions)), 'AVATAR_UPLOAD_SIZE' => $this->config['avatar_filesize'], - 'S_CROPPING_AVAILABLE' => true, 'T_ASSETS_PATH' => $web_path . '/assets', ]); diff --git a/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html b/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html index db8a0ac180..43f55fa3a6 100644 --- a/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html +++ b/phpBB/styles/prosilver/template/ucp_avatar_options_upload.html @@ -3,68 +3,66 @@
-{% if S_CROPPING_AVAILABLE %} - {% INCLUDECSS T_ASSETS_PATH ~ '/css/cropper.min.css' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/cropper.min.js' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/jquery-cropper.js' %} - {% INCLUDEJS T_ASSETS_PATH ~ '/javascript/phpbb-avatars.js' %} +{% INCLUDECSS T_ASSETS_PATH ~ '/css/cropper.min.css' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/cropper.min.js' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/jquery-cropper.js' %} +{% INCLUDEJS T_ASSETS_PATH ~ '/javascript/phpbb-avatars.js' %} - + - {% apply spaceless %} -
-
- - -
- -
- - - - -
- -
- - -
- -
- - -
- -
- - -
+{% apply spaceless %} +
+
+ +
- {% endapply %} -{% endif %} + +
+ + + + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+{% endapply %}