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

Commit 13364340 authored by Akhil's avatar Akhil 🙂
Browse files

Fixed icons cacher and updater patches

parent ffe82b63
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
FROM nextcloud:21.0.5-fpm
FROM nextcloud:21.0.6-fpm
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_VERSION="20.1.2"
ARG THEME_HELPER_VERSION="1.0.1"
ARG NEWS_VERSION="16.1.0"
ARG NEWS_VERSION="16.2.0"
ARG QUOTA_WARN_VERSION="1.11.0"
ARG NOTES_VERSION="4.1.1"
ARG CONTACTS_VERSION="4.0.3"
ARG NOTES_VERSION="4.2.0"
ARG CONTACTS_VERSION="4.0.6"
ARG CALENDAR_VERSION="2.3.4"
ARG USER_BACKEND_RAW_SQL_VERSION="1.1.0"
ARG EMAIL_RECOVERY_JOB_ID="199763"
@@ -14,13 +14,13 @@ ARG RAINLOOP_VERSION="7.1.2"
ARG RAINLOOP_COMMIT_SHA="aa5c57a7"
ARG EDA_TAG="nc-21"
ARG ECLOUD_LAUNCHER_JOB_ID="208960"
ARG GOOGLE_INTEGRATION_VERSION="1.0.5-1-nightly"
ARG GOOGLE_INTEGRATION_VERSION="1.0.6-1-nightly"

RUN mkdir -p /var/www/skeleton/Documents && mkdir -p /var/www/skeleton/Images
COPY patches/ ${TMP_PATCH_DIR}/
COPY custom_entrypoint.sh /
RUN chmod +x /custom_entrypoint.sh
RUN sed -i 's/21,0,5,1/21,0,5,1/' ${BASE_DIR}/version.php
RUN sed -i 's/21,0,6,1/21,0,6,1/' ${BASE_DIR}/version.php

# Install unzip for unzipping artifacts
RUN apt-get update && apt-get install unzip 
+23 −21
Original line number Diff line number Diff line
@@ -6,21 +6,18 @@ 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	2021-07-22 18:05:40.133856200 +0530
+++ ./lib/private/Template/IconsCacher-new.php	2021-07-27 20:43:14.122338212 +0530
@@ -161,20 +161,27 @@
 		$location = '';
--- ./lib/private/Template/IconsCacher.php	2021-11-16 11:42:40.162071882 +0530
+++ ./lib/private/Template/IconsCacher-new.php	2021-11-16 11:59:07.575908578 +0530
@@ -162,21 +162,29 @@
 		$color = '';
 		$base = $this->getRoutePrefix() . '/svg/';
-		$cleanUrl = \substr($url, \strlen($base));
+        $cleanUrl = \substr($url, \strlen($base));
 		$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)) {
-				list(,$cleanUrl,$color) = $matches;
 				list(,$cleanUrl,$color) = $matches;
-				$location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg';
+                list(,$cleanUrl,$color) = $matches;
+				$location = \OC::$SERVERROOT . '/themes/'. $theme . '/core/img/' . $cleanUrl . '.svg';
+				if(!file_exists($location)){ 
+					$location = \OC::$SERVERROOT . '/core/img/' . $cleanUrl . '.svg';
@@ -29,17 +26,22 @@ diff --git ./lib/private/Template/IconsCacher.php ./lib/private/Template/IconsCa
 		} elseif (\strpos($url, $base) === 0) {
 			if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
 				list(,$app,$cleanUrl, $color) = $matches;
-				$location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg';
-				$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)) {
+                        $location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg';
+					$appPath = \OC_App::getAppPath($app);
+					if ($appPath !== false) {
+						$location = $appPath . '/img/' . $cleanUrl . '.svg';
+					}
+					if ($app === 'settings') {
+						$location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg';
+					}
+					}
 				}
 			}
 		return [
 		}
+11 −10
Original line number Diff line number Diff line
@@ -4,18 +4,19 @@ Subject: [PATCH] Disables app store checking during "occ upgrade"

This patch disables checking the app store for app updates during "occ upgrade"

--- ./lib/private/Updater.php	2021-08-11 19:46:04.607195791 +0530
+++ ./lib/private/Updater-new.php	2021-08-11 19:46:15.173946740 +0530
@@ -261,9 +261,9 @@
 		\OC::$server->getAppFetcher()->setVersion($currentVersion);
--- ./lib/private/Updater.php	2021-11-16 12:12:35.631823438 +0530
+++ ./lib/private/Updater-new.php	2021-11-16 12:14:28.445155684 +0530
@@ -268,11 +268,11 @@
 		$appManager = \OC::$server->getAppManager();
 
 		// upgrade appstore apps
-		$this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps());
-		$autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps();
-		$this->upgradeAppStoreApps($autoDisabledApps, true);
+		//$this->upgradeAppStoreApps(\OC::$server->getAppManager()->getInstalledApps());
+		//$autoDisabledApps = \OC::$server->getAppManager()->getAutoDisabledApps();
+		//$this->upgradeAppStoreApps($autoDisabledApps, true);
-		$this->upgradeAppStoreApps($appManager->getInstalledApps());
+		/*$this->upgradeAppStoreApps($appManager->getInstalledApps());
 		$autoDisabledApps = $appManager->getAutoDisabledApps();
 		if (!empty($autoDisabledApps)) {
 			$this->upgradeAppStoreApps(array_keys($autoDisabledApps), $autoDisabledApps);
-		}
+		}*/
 
 		// install new shipped apps on upgrade
 		$errors = Installer::installShippedApps(true);