RUN sed-i's/settings-hint/settings-hint hidden/'${BASE_DIR}/apps/settings/templates/settings/personal/security/twofactor.php
# change notifications icon src
RUN sed-i's/(0,Pd.imagePath)("notifications",e)/"\/themes\/"+OC.theme.folder+"\/apps\/notifications\/img\/"+e+".svg"/'${BASE_DIR}/apps/notifications/js/notifications-main.js
RUN sed-i's/ in Nextcloud/ /'${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js
RUN sed-i's/Nextcloud administrator/administrator/'${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js
#replace error class in schedule response error file to fix error color
RUN sed-i's/update/error/g'${BASE_DIR}/apps/dav/templates/schedule-response-error.php
Fromselfhostasecloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_VERSION="23.0.3"
ARG LDAP_WRITE_SUPPORT_VERSION="1.4.0"
ARG OIDC_LOGIN_VERSION="2.3.3"
# 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/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 cd${BASE_DIR}&& patch -u${BASE_DIR}/apps/dashboard/lib/Controller/DashboardController.php -i${TMP_PATCH_DIR}/012-remove-user-status-widget.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
# Replace "Get your own free account" NC link with /e/ Account link in public pages
RUN sed-i's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/<?php p(\$_\[\x27language\x27\]); ?>\/e-email-invite\//'${BASE_DIR}/core/templates/layout.public.php
# show reset pwd page with a query param
RUN cd${BASE_DIR}/core/js/dist &&sed-i's/resetPassword:!1/resetPassword:!1||Z.showResetPassword==="1"/' login.js
# hide oidc login button
RUN sed-i's/$context->registerAlternativeLogin(OIDCLoginOption::class);/\/\/$context->registerAlternativeLogin(OIDCLoginOption::class);/'${BASE_DIR}/custom_apps/oidc_login/lib/AppInfo/Application.php
# change notifications icon src
RUN sed-i's/(0,Pd.imagePath)("notifications",e)/"\/themes\/"+OC.theme.folder+"\/apps\/notifications\/img\/"+e+".svg"/'${BASE_DIR}/apps/notifications/js/notifications-main.js
# sed version of ldap_write_support
RUN cd${BASE_DIR}/custom_apps/ldap_write_support &&sed-i's/max-version="22"/max-version="23"/' appinfo/info.xml
@@ -161,15 +197,9 @@ RUN sed -i 's/recommendations,spreed,mail,calendar/calendar,tasks,notes/' ${BASE
# Remove colored background from email template logo
RUN sed-i's/$this->header, \[$this->themingDefaults->getColorPrimary()/$this->header, \["none"/'${BASE_DIR}/lib/private/Mail/EMailTemplate.php
RUN sed-i's/ in Nextcloud/ /'${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js
RUN sed-i's/Nextcloud administrator/administrator/'${BASE_DIR}/custom_apps/integration_google/js/integration_google-personalSettings.js
# Remove changeAvatar in changeUserHook of ldap_write_support as it throws errors
RUN sed-i's/$this->changeAvatar/\/\/ $this->changeAvatar/'${BASE_DIR}/custom_apps/ldap_write_support/lib/LDAPUserManager.php
#replace error class in schedule response error file to fix error color
RUN sed-i's/update/error/g'${BASE_DIR}/apps/dav/templates/schedule-response-error.php
# Remove 'fix broken values of calendar objects' repair step
RUN sed-i'/<step>OCA\\DAV\\Migration\\CalDAVRemoveEmptyValue<\/step>/d'${BASE_DIR}/apps/dav/appinfo/info.xml
@@ -181,15 +211,7 @@ RUN curl -fsSL -o eCloud-theme.tar.gz \
# Replace "Get your own free account" NC link with /e/ Account link in public pages
RUN sed-i's/https:\/\/nextcloud.com\/signup\//https:\/\/e\.foundation\/<?php p(\$_\[\x27language\x27\]); ?>\/e-email-invite\//'${BASE_DIR}/core/templates/layout.public.php
# Set default class of hidden to settings-hint
RUN sed-i's/settings-hint/settings-hint hidden/'${BASE_DIR}/apps/settings/templates/settings/personal/security/twofactor.php
# Seds to fix displayname save regression
RUN sed-i"s/'email' ||/'email'/"${BASE_DIR}/apps/settings/js/federationsettingsview.js
RUN sed-i"s/field === 'displayname'//"${BASE_DIR}/apps/settings/js/federationsettingsview.js