Skip to content

Commit

Permalink
Fix: install LocalSettings file on upgrade too
Browse files Browse the repository at this point in the history
  • Loading branch information
Félix Piédallu committed Sep 15, 2023
1 parent 1aebff1 commit 081f5c7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/install
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ else
mediawiki_path="$path"
fi

wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"

pushd "$install_dir" || ynh_die "Could not pushd $install_dir"
"php$phpversion" "$install_dir/maintenance/install.php" \
--server "https://$domain" \
Expand All @@ -93,6 +91,8 @@ ynh_script_progression --message="Adding a configuration file..."
# save the original LocalSettings.php for eventual debugging
mv "$install_dir/LocalSettings.php" "$install_dir/LocalSettings.php.orig"

wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"

ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php"

# This is required to update database schemas
Expand Down
4 changes: 4 additions & 0 deletions scripts/upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ else
mediawiki_path="$path"
fi

wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"

ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php"

# Check for admin password being too short for the new mediawiki requirements
password_length=$(ynh_app_setting_get --app=$app --key=password | awk '{print length}')
if (( password_length < 10 )); then
Expand Down

0 comments on commit 081f5c7

Please sign in to comment.