mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
feat(web): rm old notification bell upon plugin installation (#979)
* feat(web): rm old notification bell upon plugin installation * refactor: use grep flag to unescape regex operator * fix: preserve DefaultPageLayout.php
This commit is contained in:
@@ -466,6 +466,7 @@ preserveFilesDirs=(
|
||||
"move:/usr/local/emhttp/plugins/dynamix.my.servers/data/server-state.php:preventDowngrade"
|
||||
"move:/usr/local/emhttp/plugins/dynamix.my.servers/include/reboot-details.php:preventDowngrade"
|
||||
"move:/usr/local/emhttp/plugins/dynamix.my.servers/include/translations.php:preventDowngrade"
|
||||
"copy:/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php:preventDowngrade"
|
||||
)
|
||||
|
||||
preserveAction() {
|
||||
@@ -516,6 +517,13 @@ if [[ -n $LINENUM ]]; then
|
||||
mv -f "$FILE~" "$FILE"
|
||||
fi
|
||||
|
||||
# Remove lines containing id='bell' or #bell and write to intermediate temporary file.
|
||||
# This effectively removes the old notification bell from the webgui (via DefaultPageLayout.php).
|
||||
TMP_FILE=$(mktemp)
|
||||
grep -Ev "id='bell'|#bell" "$FILE" > "$TMP_FILE"
|
||||
mv "$TMP_FILE" "$FILE"
|
||||
echo "Removed notification-bell-related lines from $FILE"
|
||||
|
||||
# patch: showchanges, starting with 6.11.0-rc1
|
||||
# ShowChanges.php, in 6.10
|
||||
# search text: $valid = ['/var/tmp/','/tmp/plugins/'];
|
||||
|
||||
Reference in New Issue
Block a user