From 1926937d101affeaea6b5826b7a41b632e45dbec Mon Sep 17 00:00:00 2001 From: akhil Date: Wed, 6 Oct 2021 17:23:28 +0530 Subject: [PATCH] Corrected remove user status widget patch --- Dockerfile | 1 + patches/012-remove-user-status-widget.patch | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a8309c48..a786563f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,6 +114,7 @@ RUN patch -u ${BASE_DIR}/core/Controller/SvgController.php -i ${TMP_PATCH_DIR}/0 RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/009-help-links.patch RUN patch -u ${BASE_DIR}/lib/private/Updater.php -i ${TMP_PATCH_DIR}/010-disable-app-store-upgrade.patch RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/011-privacy-settings.patch +RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i ${TMP_PATCH_DIR}/012-remove-user-status-widget.patch RUN rm -rf ${TMP_PATCH_DIR} # autocomplete leak tweak apps frontend with sed, disable group suggestion diff --git a/patches/012-remove-user-status-widget.patch b/patches/012-remove-user-status-widget.patch index 7aeaa05c..40e0d3a5 100644 --- a/patches/012-remove-user-status-widget.patch +++ b/patches/012-remove-user-status-widget.patch @@ -6,14 +6,13 @@ This patch removes user status widget from available widgets in dashboard --- DashboardController.php 2021-09-17 12:56:19.691685082 +0530 +++ DashboardController-new.php 2021-09-17 12:59:18.906502554 +0530 -@@ -111,6 +111,10 @@ +@@ -108,6 +108,9 @@ + 'url' => $widget->getUrl() ]; }, $this->dashboardManager->getWidgets()); - -+ $widgets = array_filter($widgets, function($widget) { -+ return($widget['id'] !== "user_status"); -+ }); -+ - ++ $widgets = array_filter($widgets, function($widget) { ++ return($widget['id'] !== "user_status"); ++ }); $configStatuses = $this->config->getUserValue($this->userId, 'dashboard', 'statuses', ''); $statuses = json_decode($configStatuses, true); + // We avoid getting an empty array as it will not produce an object in UI's JS -- GitLab