Skip to content
Snippets Groups Projects
Commit 645ae0b8 authored by Bob Mottram's avatar Bob Mottram
Browse files

Fix another broken nextcloud module

parent 018e2042
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,23 @@ nextcloud_variables=(ONION_ONLY
DDNS_PROVIDER
MY_USERNAME)
function nextcloud_fix_broken_submodule {
submodule="$1"
submodule_search="$2"
submodule_replace="$3"
if [ -f "$submodule" ]; then
if grep -q "$submodule_search" "$submodule"; then
sed -i "s|$submodule_search|$submodule_replace|g" "$submodule"
fi
fi
}
function nextcloud_fix_broken_modules {
nextcloud_fix_broken_submodule "/var/www/$NEXTCLOUD_DOMAIN_NAME/htdocs/3rdparty/symfony/console/Output/Output.php" 'construct(?int ' 'construct(int '
nextcloud_fix_broken_submodule "/var/www/nextcloud.local/htdocs/3rdparty/doctrine/event-manager/lib/Doctrine/Common/EventManager.php" ' ?EventArgs ' ' EventArgs '
}
function change_default_domain_name_nextcloud {
new_default_domain_name="$1"
......@@ -272,6 +289,7 @@ function upgrade_nextcloud_base {
${NEXTCLOUD_COMMAND} maintenance:mode --off
${NEXTCLOUD_COMMAND} db:add-missing-indices
${NEXTCLOUD_COMMAND} -n db:convert-filecache-bigint
nextcloud_fix_broken_modules
}
function upgrade_nextcloud {
......@@ -497,13 +515,7 @@ function install_nextcloud_main {
git checkout $NEXTCLOUD_COMMIT -b $NEXTCLOUD_COMMIT
set_completion_param "nextcloud commit" "$NEXTCLOUD_COMMIT"
# fix a typo in a submodule
broken_submodule="/var/www/$NEXTCLOUD_DOMAIN_NAME/htdocs/3rdparty/symfony/console/Output/Output.php"
if [ -f "$broken_submodule" ]; then
if grep -q 'construct(?int ' "$broken_submodule"; then
sed -i 's|construct(?int |construct(int |g' "$broken_submodule"
fi
fi
nextcloud_fix_broken_modules
increment_app_install_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment