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

Commit e6ebe0b9 authored by AVINASH GUSAIN's avatar AVINASH GUSAIN
Browse files

Merge branch 'dev/nextcloud27' into 'main'

Nextcloud 27 Upgrade

See merge request !228
parents 85975bd4 7eb394c2
Loading
Loading
Loading
Loading
Loading
+15 −17
Original line number Diff line number Diff line
FROM nextcloud:26.0.8-fpm AS nextcloud
FROM nextcloud:27.1.7-fpm AS nextcloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_HELPER_JOB_ID="824758"
ARG THEME_HELPER_JOB_ID="877202"
ARG NOTES_VERSION="4.9.2"
ARG CONTACTS_JOB_ID="821699"
ARG CALENDAR_JOB_ID="812355"
ARG EMAIL_RECOVERY_JOB_ID="738840"
ARG EA_JOB_ID="738865"
ARG LAUNCHER_JOB_ID="819432"
ARG GOOGLE_INTEGRATION_VERSION="2.1.0"
ARG DASHBOARD_JOB_ID="831213"
ARG SNAPPY_VERSION="2.29.1"
ARG CONTACTS_JOB_ID="876501"
ARG CALENDAR_JOB_ID="872766"
ARG EMAIL_RECOVERY_JOB_ID="877226"
ARG EA_JOB_ID="877180"
ARG LAUNCHER_JOB_ID="868255"
ARG GOOGLE_INTEGRATION_VERSION="2.2.0"
ARG DASHBOARD_JOB_ID="868273"
ARG SNAPPY_VERSION="2.35.3"
ARG SNAPPY_THEME_VERSION="3.0.0"
ARG USER_MIGRATION_JOB_ID="608716"
ARG MEMORIES_VERSION="6.1.5"
ARG USER_MIGRATION_JOB_ID="877237"
ARG MEMORIES_VERSION="6.2.2"
ARG DROP_ACCOUNT_VERSION="2.3.2"

RUN sed -i 's/26,0,8,2/26,0,8,26/' ${BASE_DIR}/version.php
RUN sed -i 's/27,1,7,2/27,1,7,10/' ${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
@@ -147,9 +147,7 @@ RUN cd ${BASE_DIR} && patch -p0 < ${TMP_PATCH_DIR}/015-email-mail-template.patch
RUN patch -u ${BASE_DIR}/core/Command/User/Setting.php -i ${TMP_PATCH_DIR}/018-occ-user-setting.patch
RUN patch -u ${BASE_DIR}/apps/files/js/files.js -i ${TMP_PATCH_DIR}/021-repeated-storage-dialog-fix.patch
RUN cd ${BASE_DIR} && patch -u ${BASE_DIR}/3rdparty/sabre/vobject/lib/ITip/Broker.php -i ${TMP_PATCH_DIR}/022-significantchange.patch
RUN patch -u ${BASE_DIR}/apps/dav/lib/CalDAV/Reminder/ReminderService.php -i ${TMP_PATCH_DIR}/024-reminder-service-handle-exception.patch
RUN patch -u ${BASE_DIR}/apps/theming/lib/Themes/CommonThemeTrait.php -i ${TMP_PATCH_DIR}/026-primary-color-fix.patch
RUN patch -u ${BASE_DIR}/lib/private/Preview/Watcher.php -i ${TMP_PATCH_DIR}/030-preview-watcher-null-check.patch
RUN patch -u ${BASE_DIR}/lib/private/Template/JSResourceLocator.php -i ${TMP_PATCH_DIR}/031-theme-custom-app-translations.patch
RUN patch -u ${BASE_DIR}/lib/private/L10N/Factory.php -i ${TMP_PATCH_DIR}/032-select-lang-from-session.patch

@@ -203,8 +201,8 @@ From selfhost as ecloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_VERSION="26.0.2"
ARG LDAP_WRITE_SUPPORT_VERSION="1.8.0"
ARG OIDC_LOGIN_VERSION="2.6.0"
ARG LDAP_WRITE_SUPPORT_VERSION="1.9.0"
ARG OIDC_LOGIN_VERSION="3.0.2"
ARG IS_SELFHOST=false

# Patches
+52 −29
Original line number Diff line number Diff line
From: Avinash <avinashg@e.email>
Date: Tue, 15 Nov 2022 12:50 +0530
Subject: [PATCH] To implement custom email template design for calendar invite

This patch is allowing to customize the email template design for invitation

--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2023-10-19 14:18:20
+++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php	2023-10-19 14:21:42
@@ -235,6 +235,13 @@
--- ./apps/dav/lib/CalDAV/Schedule/IMipPlugin.php	2024-03-18 11:18:20
+++ ./apps/dav/lib/CalDAV/Schedule/IMipPlugin-new.php	2024-03-11 11:18:22
@@ -242,6 +242,13 @@
 		$data['invitee_name'] = ($senderName ?: $sender);
 
 		$fromEMail = Util::getDefaultEmailAddress('invitations-noreply');
@@ -20,16 +14,16 @@ This patch is allowing to customize the email template design for invitation
 		$fromName = $this->imipService->getFrom($senderName, $this->defaults->getName());
 
 		$message = $this->mailer->createMessage()
@@ -255,7 +262,22 @@
@@ -262,7 +269,22 @@
 		$template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data);
 		$template->addHeader();
 
-		$this->imipService->addSubjectAndHeading($template, $method, $data['invitee_name'], $data['meeting_title']);
-		$this->imipService->addSubjectAndHeading($template, $method, $data['invitee_name'], $data['meeting_title'], $isModified, $replyingAttendee);
+		$l10n = \OC::$server->getL10N('dav');
+		if ( count($vEvent)>1) {
+			$this->imipService->addSubjectAndHeadingUpdated($template, $method, $data['invitee_name'], $data['meeting_title']);
+			$this->imipService->addSubjectAndHeadingUpdated($template, $method, $data['invitee_name'], $data['meeting_title'], $isModified, $replyingAttendee);
+		} else {
+			$this->imipService->addSubjectAndHeading($template, $method, $data['invitee_name'], $data['meeting_title']);
+			$this->imipService->addSubjectAndHeading($template, $method, $data['invitee_name'], $data['meeting_title'], $isModified, $replyingAttendee);
+		}
+		if ($method === self::METHOD_CANCEL) {
+			$template->addHeadingBanner('#FFC2B9','#7D1000',$l10n->t('The invitation has been cancelled'));
@@ -44,10 +38,18 @@ This patch is allowing to customize the email template design for invitation
 		$this->imipService->addBulletList($template, $vEvent, $data);
 
 		// Only add response buttons to invitation requests: Fix Issue #11230
@@ -295,7 +317,6 @@
 				|| in_array(strtolower($recipientDomain), $invitationLinkRecipients)) {
 				$token = $this->imipService->createInvitationToken($iTipMessage, $vEvent, $lastOccurrence);
 				$this->imipService->addResponseButtons($template, $token);
-				$this->imipService->addMoreOptionsButton($template, $token);
 			}
 		}
 

--- ./apps/dav/lib/CalDAV/Schedule/IMipService.php	2023-10-19 11:40:39
+++ ./apps/dav/lib/CalDAV/Schedule/IMipService-new.php	2023-10-19 13:47:17
@@ -382,6 +382,30 @@
--- ./apps/dav/lib/CalDAV/Schedule/IMipService.php	2024-03-18 11:40:39
+++ ./apps/dav/lib/CalDAV/Schedule/IMipService-new.php	2024-03-18 13:47:17
@@ -444,6 +444,51 @@
 	}
 
 	/**
@@ -58,7 +60,7 @@ This patch is allowing to customize the email template design for invitation
+	 * @param string|null $partstat
+	 */
+	public function addSubjectAndHeadingUpdated(IEMailTemplate $template,
+		string $method, string $sender, string $summary): void {
+	string $method, string $sender, string $summary, bool $isModified, ?Property $replyingAttendee = null): void {
+		if ($method === IMipPlugin::METHOD_CANCEL) {
+			// TRANSLATORS Subject for email, when an invitation is cancelled. Ex: "Cancelled: {{Event Name}}"
+			$template->setSubject($this->l10n->t('Cancelled: %1$s', [$summary]));
@@ -66,7 +68,28 @@ This patch is allowing to customize the email template design for invitation
+		} elseif ($method === IMipPlugin::METHOD_REPLY) {
+			// TRANSLATORS Subject for email, when an invitation is replied to. Ex: "Re: {{Event Name}}"
+			$template->setSubject($this->l10n->t('Re: %1$s', [$summary]));
+			// Build the strings
+			$partstat = (isset($replyingAttendee)) ? $replyingAttendee->offsetGet('PARTSTAT') : null;
+			$partstat = ($partstat instanceof Parameter) ? $partstat->getValue() : null;
+			switch ($partstat) {
+				case 'ACCEPTED':
+					$template->addHeading($this->l10n->t('%1$s has accepted your invitation', [$sender]));
+					break;
+				case 'TENTATIVE':
+					$template->addHeading($this->l10n->t('%1$s has tentatively accepted your invitation', [$sender]));
+					break;
+				case 'DECLINED':
+					$template->addHeading($this->l10n->t('%1$s has declined your invitation', [$sender]));
+					break;
+				case null:
+				default:
+					$template->addHeading($this->l10n->t('%1$s has responded to your invitation', [$sender]));
+					break;
+			}
+		} elseif ($method === IMipPlugin::METHOD_REQUEST && $isModified) {
+			// TRANSLATORS Subject for email, when an invitation is updated. Ex: "Invitation updated: {{Event Name}}"
+			$template->setSubject($this->l10n->t('Invitation updated: %1$s', [$summary]));
+			$template->addHeading($this->l10n->t('%1$s updated the event "%2$s"', [$sender, $summary]));
+		} else {
+			// TRANSLATORS Subject for email, when an invitation is sent. Ex: "Invitation: {{Event Name}}"
+			$template->setSubject($this->l10n->t('Invitation Updated: %1$s', [$summary]));
@@ -78,7 +101,7 @@ This patch is allowing to customize the email template design for invitation
 	 * @param string $path
 	 * @return string
 	 */
@@ -479,8 +503,13 @@
@@ -541,8 +586,14 @@
 				$this->getAbsoluteImagePath('caldav/time.png'), $data['meeting_when'], '', IMipPlugin::IMIP_INDENT);
 		}
 		if ($data['meeting_location'] !== '') {
@@ -87,6 +110,7 @@ This patch is allowing to customize the email template design for invitation
+			if(filter_var(trim($data['meeting_location']), FILTER_VALIDATE_URL))	{
+				$template->addBodyListItem($data['meeting_location_html'] ?? $data['meeting_location'], $this->l10n->t('Location:'),
+					$this->getAbsoluteImagePath('caldav/videocall.png'), $data['meeting_location'], '', IMipPlugin::IMIP_INDENT);
+
+			} else {
+				$template->addBodyListItem($data['meeting_location_html'] ?? $data['meeting_location'], $this->l10n->t('Location:'),
+					$this->getAbsoluteImagePath('caldav/location.png'), $data['meeting_location'], '', IMipPlugin::IMIP_INDENT);
@@ -94,7 +118,7 @@ This patch is allowing to customize the email template design for invitation
 		}
 		if ($data['meeting_url'] !== '') {
 			$template->addBodyListItem($data['meeting_url_html'] ?? $data['meeting_url'], $this->l10n->t('Link:'),
@@ -575,7 +604,7 @@
@@ -637,7 +688,7 @@
 	 * @param $token
 	 */
 	public function addResponseButtons(IEMailTemplate $template, $token) {
@@ -103,7 +127,7 @@ This patch is allowing to customize the email template design for invitation
 			$this->l10n->t('Accept'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.accept', [
 				'token' => $token,
@@ -583,19 +612,12 @@
@@ -645,20 +696,10 @@
 			$this->l10n->t('Decline'),
 			$this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.decline', [
 				'token' => $token,
@@ -112,9 +136,9 @@ This patch is allowing to customize the email template design for invitation
+			$this->l10n->t('MayBe'),
+			$this->urlGenerator->getAbsoluteUrl('apps/calendar/invitation/tentative/'.$token)
 		);
 	}
 
 	public function addMoreOptionsButton(IEMailTemplate $template, $token) {
-	}
-
-	public function addMoreOptionsButton(IEMailTemplate $template, $token) {
-		$moreOptionsURL = $this->urlGenerator->linkToRouteAbsolute('dav.invitation_response.options', [
-			'token' => $token,
-		]);
@@ -125,6 +149,5 @@ This patch is allowing to customize the email template design for invitation
-
-		$template->addBodyText($html, $text);
 	}
 }
\ No newline at end of file
 
 	public function getReplyingAttendee(Message $iTipMessage): ?Property {
+11 −14
Original line number Diff line number Diff line
From: Akhil <akhil@e.email>
Date: Thu, 28 Mar 2023 15:05:00 +0530
Subject: [PATCH] Login page patch to apply Murena login page

This patch applies the Murena login page changes to the login page

--- ./core/templates/layout.guest.php	2023-03-28 14:56:52.130616847 +0530
+++ ./core/templates/layout.guest-new.php	2023-03-28 15:01:34.973604329 +0530
--- ./core/templates/layout.guest.php	2024-03-15 19:20:21
+++ ./core/templates/layout.guest-new.php	2024-03-15 19:24:49
@@ -22,6 +22,7 @@
 		<link rel="mask-icon" sizes="any" href="<?php print_unescaped(image_path('core', 'favicon-mask.svg')); ?>" color="<?php p($theme->getColorPrimary()); ?>">
 		<link rel="manifest" href="<?php print_unescaped(image_path('core', 'manifest.json')); ?>">
 		<link rel="manifest" href="<?php print_unescaped(image_path('core', 'manifest.json')); ?>" crossorigin="use-credentials">
 		<?php emit_css_loading_tags($_); ?>
+		<?php array_push($_['jsfiles'] , '/themes/eCloud/core/js/custom-login.js') ?>
 		<?php emit_script_loading_tags($_); ?>
 		<?php print_unescaped($_['headers']); ?>
 	</head>
\ No newline at end of file
@@ -30,12 +31,37 @@
 		<?php foreach ($_['initialStates'] as $app => $initialState) { ?>
 			<input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>">
@@ -54,6 +49,7 @@ This patch applies the Murena login page changes to the login page
 						</div>
 					</header>
 				<?php endif; ?>
\ No newline at end of file
@@ -44,13 +70,24 @@
 						<?php p($theme->getName()); ?>
 					</h1>
@@ -77,10 +73,11 @@ This patch applies the Murena login page changes to the login page
+				</p>
+			</footer>
 		</div>
-		<footer role="contentinfo">
-		<footer role="contentinfo" class="guest-box">
-			<p class="info">
-				<?php print_unescaped($theme->getLongFooter()); ?>
-			</p>
-		</footer>
 	</body>
 </html>
\ No newline at end of file
+0 −17
Original line number Diff line number Diff line
--- ./apps/dav/lib/CalDAV/Reminder/ReminderService.php	2023-03-06 21:26:20.835422901 +0530
+++ ./apps/dav/lib/CalDAV/Reminder/ReminderService-new.php	2023-03-06 21:28:49.325422185 +0530
@@ -143,7 +143,13 @@
 				continue;
 			}

-			$vevent = $this->getVEventByRecurrenceId($vcalendar, $reminder['recurrence_id'], $reminder['is_recurrence_exception']);
+			try {
+				$vevent = $this->getVEventByRecurrenceId($vcalendar, $reminder['recurrence_id'], $reminder['is_recurrence_exception']);
+			} catch (MaxInstancesExceededException $e) {
+				$this->logger->debug('Recurrence with too many instances detected, skipping VEVENT', ['exception' => $e]);
+				$this->backend->removeReminder($reminder['id']);
+				continue;
+			}
 			if (!$vevent) {
 				$this->backend->removeReminder($reminder['id']);
 				continue;
+0 −19
Original line number Diff line number Diff line
From: Akhil <akhil.potukuchi.ext@murena.com>
Date: Fri, 25 June 2023 16:30:00 +0530
Subject: [PATCH] Add a check for null in preview watcher

If a null argument is passed, an rmdir happens on the entire preview directory.
This patch avoids this situation.

--- lib/private/Preview/Watcher.php	2023-10-23 19:06:42.892424278 +0530
+++ lib/private/Preview/Watcher-new.php	2023-10-23 19:59:31.903638761 +0530
@@ -61,6 +61,9 @@
 		}
 
 		try {
+			if (is_null($node->getId())) {
+				return;
+			}
 			$folder = $this->appData->getFolder((string)$node->getId());
 			$folder->delete();
 		} catch (NotFoundException $e) {
Loading