From ea204746e0803e1f837b595a4bfdcf5d9273ea54 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Fri, 19 Jan 2024 00:04:07 -0800 Subject: [PATCH 1/7] app.svg icon 404 issue --- Dockerfile | 1 + patches/034-app-svg-icon-fix.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 patches/034-app-svg-icon-fix.patch diff --git a/Dockerfile b/Dockerfile index 629651cb..59dcfcab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -219,6 +219,7 @@ RUN patch -u ${BASE_DIR}/apps/dav/lib/Connector/Sabre/Principal.php -i ${TMP_PAT RUN patch -u ${BASE_DIR}/apps/dav/lib/HookManager.php -i ${TMP_PATCH_DIR}/028-default-task-calendar.patch RUN patch -u ${BASE_DIR}/apps/provisioning_api/lib/Controller/UsersController.php -i ${TMP_PATCH_DIR}/029-restrict-user-to-change-primary-email.patch RUN patch -u ${BASE_DIR}/lib/private/Security/VerificationToken/VerificationToken.php -i ${TMP_PATCH_DIR}/033-verification-token-private.patch +RUN patch -u ${BASE_DIR}/lib/private/NavigationManager.php -i ${TMP_PATCH_DIR}/034-app-svg-icon-fix.patch RUN rm -rf ${TMP_PATCH_DIR} RUN curl -fsSL -o ldap_write_support.tar.gz \ diff --git a/patches/034-app-svg-icon-fix.patch b/patches/034-app-svg-icon-fix.patch new file mode 100644 index 00000000..2c4688dd --- /dev/null +++ b/patches/034-app-svg-icon-fix.patch @@ -0,0 +1,11 @@ +--- lib/private/NavigationManager.php 2024-01-18 23:59:45 ++++ lib/private/NavigationManager-new.php 2024-01-18 23:59:36 +@@ -318,7 +318,7 @@ + $order = isset($nav['order']) ? $nav['order'] : 100; + $type = $nav['type']; + $route = !empty($nav['route']) ? $this->urlGenerator->linkToRoute($nav['route']) : ''; +- $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; ++ $icon = isset($nav['icon']) ? $nav['icon'] : "$app.svg"; + foreach ([$icon, "$app.svg"] as $i) { + try { + $icon = $this->urlGenerator->imagePath($app, $i); -- GitLab From 6d3dab2ee412b73cab2f2de56b8a0889b44b005d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Fri, 19 Jan 2024 00:13:32 -0800 Subject: [PATCH 2/7] app.svg icon 404 issue --- patches/034-app-svg-icon-fix.patch | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/patches/034-app-svg-icon-fix.patch b/patches/034-app-svg-icon-fix.patch index 2c4688dd..87ffb54e 100644 --- a/patches/034-app-svg-icon-fix.patch +++ b/patches/034-app-svg-icon-fix.patch @@ -1,11 +1,17 @@ ---- lib/private/NavigationManager.php 2024-01-18 23:59:45 -+++ lib/private/NavigationManager-new.php 2024-01-18 23:59:36 -@@ -318,7 +318,7 @@ +--- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-18 23:59:45 ++++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-19 00:13:16 +@@ -318,10 +318,12 @@ $order = isset($nav['order']) ? $nav['order'] : 100; $type = $nav['type']; $route = !empty($nav['route']) ? $this->urlGenerator->linkToRoute($nav['route']) : ''; - $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; -+ $icon = isset($nav['icon']) ? $nav['icon'] : "$app.svg"; ++ $icon = isset($nav['icon']) ? $nav['icon'] : ''; foreach ([$icon, "$app.svg"] as $i) { try { - $icon = $this->urlGenerator->imagePath($app, $i); +- $icon = $this->urlGenerator->imagePath($app, $i); ++ if($icon !== ''){ ++ $icon = $this->urlGenerator->imagePath($app, $i); ++ } + break; + } catch (\RuntimeException $ex) { + // no icon? - ignore it then -- GitLab From 581b92d5f68a58db93f6936d5d1e8c0e588181f8 Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Fri, 19 Jan 2024 01:05:04 -0800 Subject: [PATCH 3/7] added file_exists --- patches/034-app-svg-icon-fix.patch | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/patches/034-app-svg-icon-fix.patch b/patches/034-app-svg-icon-fix.patch index 87ffb54e..4d3487df 100644 --- a/patches/034-app-svg-icon-fix.patch +++ b/patches/034-app-svg-icon-fix.patch @@ -1,15 +1,12 @@ --- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-18 23:59:45 -+++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-19 00:13:16 -@@ -318,10 +318,12 @@ - $order = isset($nav['order']) ? $nav['order'] : 100; - $type = $nav['type']; - $route = !empty($nav['route']) ? $this->urlGenerator->linkToRoute($nav['route']) : ''; -- $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; -+ $icon = isset($nav['icon']) ? $nav['icon'] : ''; ++++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-19 01:03:23 +@@ -321,7 +321,10 @@ + $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; foreach ([$icon, "$app.svg"] as $i) { try { - $icon = $this->urlGenerator->imagePath($app, $i); -+ if($icon !== ''){ ++ $appPath = $this->appManager->getAppPath($app); ++ if (file_exists($appPath . '/img/' . $i)) { + $icon = $this->urlGenerator->imagePath($app, $i); + } break; -- GitLab From 23328d1ffbeef12663f10d29938ccfdde55a5e7d Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Tue, 23 Jan 2024 22:22:47 -0800 Subject: [PATCH 4/7] changes in app.svg condition --- patches/034-app-svg-icon-fix.patch | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/patches/034-app-svg-icon-fix.patch b/patches/034-app-svg-icon-fix.patch index 4d3487df..6b3359af 100644 --- a/patches/034-app-svg-icon-fix.patch +++ b/patches/034-app-svg-icon-fix.patch @@ -1,14 +1,13 @@ ---- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-18 23:59:45 -+++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-19 01:03:23 -@@ -321,7 +321,10 @@ - $icon = isset($nav['icon']) ? $nav['icon'] : 'app.svg'; - foreach ([$icon, "$app.svg"] as $i) { - try { -- $icon = $this->urlGenerator->imagePath($app, $i); -+ $appPath = $this->appManager->getAppPath($app); -+ if (file_exists($appPath . '/img/' . $i)) { -+ $icon = $this->urlGenerator->imagePath($app, $i); -+ } - break; - } catch (\RuntimeException $ex) { - // no icon? - ignore it then +--- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-23 22:20:35 ++++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-23 22:21:44 +@@ -292,7 +292,9 @@ + if ($icon === null) { + $icon = $this->urlGenerator->imagePath('core', 'default-app-icon'); + } +- ++ if ($icon === 'app.svg') { ++ continue; ++ } + $this->add([ + 'id' => $id, + 'order' => $order, -- GitLab From 173f1262fe650185c4488ef8fdc47970ccfb854f Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 24 Jan 2024 12:19:58 -0800 Subject: [PATCH 5/7] change --- README.md | 2 ++ patches/034-app-svg-icon-fix.patch | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e43770e..4bc0a035 100644 --- a/README.md +++ b/README.md @@ -61,3 +61,5 @@ We suggest you use our [ecloud-selfhosting](https://gitlab.e.foundation/e/infra/ ## Contributing Anyone can fork a project on our GitLab instance, but to prevent abuse it's disabled by default. Get in touch with us [by e-mail](mailto:dev@murena.com) or through our support channels and we will let you create a fork and submit MRs. + +diff -u /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php > ./patches/034-app-svg-icon-fix.patch \ No newline at end of file diff --git a/patches/034-app-svg-icon-fix.patch b/patches/034-app-svg-icon-fix.patch index 6b3359af..daef05dc 100644 --- a/patches/034-app-svg-icon-fix.patch +++ b/patches/034-app-svg-icon-fix.patch @@ -1,5 +1,5 @@ ---- /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-23 22:20:35 -+++ /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-23 22:21:44 +--- ./volumes/nextcloud/html/lib/private/NavigationManager.php 2024-01-23 22:20:35 ++++ ./volumes/nextcloud/html/lib/private/NavigationManager-new.php 2024-01-23 22:21:44 @@ -292,7 +292,9 @@ if ($icon === null) { $icon = $this->urlGenerator->imagePath('core', 'default-app-icon'); -- GitLab From e9d13899c0ebf7471af0deac8eee058c46dffc6a Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 24 Jan 2024 12:20:30 -0800 Subject: [PATCH 6/7] change --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 4bc0a035..346ae00f 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,4 @@ We suggest you use our [ecloud-selfhosting](https://gitlab.e.foundation/e/infra/ ## Contributing -Anyone can fork a project on our GitLab instance, but to prevent abuse it's disabled by default. Get in touch with us [by e-mail](mailto:dev@murena.com) or through our support channels and we will let you create a fork and submit MRs. - -diff -u /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager.php /Users/ronak/Desktop/murena/nextcloud/ecloud_dev_example/volumes/nextcloud/html/lib/private/NavigationManager-new.php > ./patches/034-app-svg-icon-fix.patch \ No newline at end of file +Anyone can fork a project on our GitLab instance, but to prevent abuse it's disabled by default. Get in touch with us [by e-mail](mailto:dev@murena.com) or through our support channels and we will let you create a fork and submit MRs. \ No newline at end of file -- GitLab From 6672c5653851246922a3c183e2f36c29108475be Mon Sep 17 00:00:00 2001 From: Ronak Patel Date: Wed, 24 Jan 2024 12:21:04 -0800 Subject: [PATCH 7/7] change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 346ae00f..3e43770e 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,4 @@ We suggest you use our [ecloud-selfhosting](https://gitlab.e.foundation/e/infra/ ## Contributing -Anyone can fork a project on our GitLab instance, but to prevent abuse it's disabled by default. Get in touch with us [by e-mail](mailto:dev@murena.com) or through our support channels and we will let you create a fork and submit MRs. \ No newline at end of file +Anyone can fork a project on our GitLab instance, but to prevent abuse it's disabled by default. Get in touch with us [by e-mail](mailto:dev@murena.com) or through our support channels and we will let you create a fork and submit MRs. -- GitLab