Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 354a9f42 authored by Akhil's avatar Akhil
Browse files

Comment out patches

parent 2b02459b
Loading
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
FROM nextcloud:25.0.3-fpm AS nextcloud
FROM nextcloud:25.0.4-fpm AS nextcloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_HELPER_JOB_ID="446245"
ARG NEWS_VERSION="20.0.1"
ARG QUOTA_WARN_VERSION="1.15.0"
ARG NOTES_VERSION="4.6.0"
ARG CONTACTS_JOB_ID="471108"
ARG CALENDAR_JOB_ID="471116"
@@ -16,7 +14,7 @@ ARG ECLOUD_LAUNCHER_JOB_ID="458901"
ARG GOOGLE_INTEGRATION_VERSION="1.0.9"
ARG ECLOUD_DASHBOARD_JOB_ID="485170"

RUN sed -i 's/25,0,3,2/25,0,3,3/' ${BASE_DIR}/version.php
RUN sed -i 's/25,0,4,1/25,0,4,1/' ${BASE_DIR}/version.php
COPY custom_entrypoint.sh /
RUN chmod +x /custom_entrypoint.sh
RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images
@@ -161,12 +159,12 @@ ARG OIDC_LOGIN_VERSION="2.4.0"

# Patches
COPY patches/ ${TMP_PATCH_DIR}/
RUN patch -u ${BASE_DIR}/core/templates/layout.user.php -i ${TMP_PATCH_DIR}/003-contact-search-removal.patch
#RUN patch -u ${BASE_DIR}/core/templates/layout.user.php -i ${TMP_PATCH_DIR}/003-contact-search-removal.patch
RUN patch -u ${BASE_DIR}/core/Controller/ContactsMenuController.php -i ${TMP_PATCH_DIR}/004-contact-search-controller-removal.patch
RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-core.patch
RUN cd ${BASE_DIR}/custom_apps && patch -p0 < ${TMP_PATCH_DIR}/005-autocomplete-user-leak-custom-app.patch
RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch
RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch
#RUN patch -u ${BASE_DIR}/core/templates/layout.guest.php -i ${TMP_PATCH_DIR}/016-login-screen.patch
#RUN patch -u ${BASE_DIR}/lib/private/Notification/Manager.php -i ${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch
RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/apps/user_ldap/lib/User_LDAP.php -i ${TMP_PATCH_DIR}/023-ldap-check-pwd-optimization.patch
RUN patch -u ${BASE_DIR}/lib/private/User/Manager.php -i ${TMP_PATCH_DIR}/025-optimize-get-by-email.patch
RUN rm -rf ${TMP_PATCH_DIR}
+0 −46
Original line number Diff line number Diff line
From: ArnauVP <arnauvp@e.email>
Date: Thu, 23 Mar 2022 11:30:00 +0000
Subject: [PATCH] Caches SVGs added via theme

This patch modifies Icons Cacher to check theme for icons and if they exist,
cache them instead of the icons in core or apps directories

diff --git ./lib/private/Template/IconsCacher.php ./lib/private/Template/IconsCacher-new.php
--- ./lib/private/Template/IconsCacher.php	2022-03-23 12:30:24.000000000 +0100
+++ ./lib/private/Template/IconsCacher-new.php	2022-03-23 12:32:37.000000000 +0100
@@ -161,21 +161,28 @@
 		$color = '';
 		$base = $this->getRoutePrefix() . '/svg/';
 		$cleanUrl = \substr($url, \strlen($base));
+		$theme = \OC::$server->getConfig()->getSystemValue("theme");
 		if (\strpos($url, $base . 'core') === 0) {
 			$cleanUrl = \substr($cleanUrl, \strlen('core'));
 			if (\preg_match('/\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
 				[,$cleanUrl,$color] = $matches;
-				$location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg';
+				$location = \OC::$SERVERROOT . '/themes/'. $theme . '/core/img/' . $cleanUrl . '.svg';
+                if (!file_exists($location)) {
+                	$location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg';
+                }
 			}
 		} elseif (\strpos($url, $base) === 0) {
 			if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
 				[,$app,$cleanUrl, $color] = $matches;
-				$appPath = \OC_App::getAppPath($app);
-				if ($appPath !== false) {
-					$location = $appPath . '/img/' . $cleanUrl . '.svg';
-				}
-				if ($app === 'settings') {
-					$location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg';
+				$location = \OC::$SERVERROOT . '/themes/' . $theme . '/apps/' . $app . '/img/' . $cleanUrl . '.svg';
+				if (!file_exists($location)) {
+					$appPath = \OC_App::getAppPath($app);
+					if ($appPath !== false) {
+						$location = $appPath . '/img/' . $cleanUrl . '.svg';
+					}
+					if ($app === 'settings') {
+						$location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg';
+					}
 				}
 			}
 		}
+0 −38
Original line number Diff line number Diff line
From: Akhil <akhil@e.email>
Date: Tue, 22 Jul 2021 18:15:00 +0530
Subject: [PATCH] Serves SVGs added via theme through SVG Controller

This patch modifies SVG Controllers to check theme for icons and if they exist, return them before checking
app or core directories in their respective methods

diff --git ./lib/private/Template/IconsCacher.php ./lib/private/Template/IconsCacher-new.php
--- ./core/Controller/SvgController.php	2021-07-22 18:00:30.575284496 +0530
+++ ./core/Controller/SvgController-new.php	2021-07-22 18:07:55.927091362 +0530
@@ -81,7 +81,13 @@
 	 * @return DataDisplayResponse|NotFoundResponse
 	 */
 	public function getSvgFromCore(string $folder, string $fileName, string $color = 'ffffff') {
-		$path = $this->serverRoot . "/core/img/$folder/$fileName.svg";
+        $theme = \OC::$server->getConfig()->getSystemValue("theme");
+        $path = $this->serverRoot . '/themes/' . $theme .'/core/img/' . $folder . '/' . $fileName . '.svg';
+        if(file_exists($path)) {
+            return $this->getSvg($path, $color, $fileName);
+        }
+
+        $path = $this->serverRoot . "/core/img/$folder/$fileName.svg";
 		return $this->getSvg($path, $color, $fileName);
 	}
 
@@ -103,7 +109,11 @@
 		} catch (AppPathNotFoundException $e) {
 			return new NotFoundResponse();
 		}
-
+        $theme = \OC::$server->getConfig()->getSystemValue("theme");
+        $path = $this->serverRoot . '/themes/' . $theme .'/apps/' . $app .  '/img/'. $fileName . '.svg';
+        if(file_exists($path)) {
+                return $this->getSvg($path, $color, $fileName);
+        }
 		$path = $appPath . "/img/$fileName.svg";
 		return $this->getSvg($path, $color, $fileName);
 	}