# 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
Fromselfhostasecloud
ARG BASE_DIR="/usr/src/nextcloud"
ARG TMP_PATCH_DIR="/tmp/build_patches"
ARG THEME_VERSION="23.0.1"
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
RUN patch -u${BASE_DIR}/lib/private/Notification/Manager.php -i${TMP_PATCH_DIR}/020-fairuse-notification-fix.patch
RUN patch -u${BASE_DIR}/apps/files/js/files.js -i${TMP_PATCH_DIR}/021-repeated-storage-dialog-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
# 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
# Seds to fix displayname save regression
RUN sed-i"s/'email' ||/'email'/"${BASE_DIR}/apps/settings/js/federationsettingsview.js
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
RUN sed-i"s/field === 'displayname'//"${BASE_DIR}/apps/settings/js/federationsettingsview.js