mirror of
https://github.com/unraid/api.git
synced 2026-01-02 14:40:01 -06:00
Compare commits
1 Commits
v4.29.0
...
fix-error5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b19ea66bcb |
@@ -311,6 +311,7 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then
|
||||
# restore stock files
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/DisplaySettings.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/Registration.page && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/.login.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/UpdateDNS.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/Wrappers.php && [[ -f "$FILE-" ]] && mv -f "$FILE-" "$FILE"
|
||||
@@ -728,6 +729,17 @@ if [[ "${CHANGED}" == "yes" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Fix long standing bug in login script
|
||||
FILE=/usr/local/emhttp/plugins/dynamix/include/.login.php
|
||||
if test -f "${FILE}" && grep -q 'if (file_exists($file)) {' "${FILE}" &>/dev/null; then
|
||||
cp "$FILE" "$FILE-"
|
||||
# Find this text: if (file_exists($file)) {
|
||||
OLD='if \(file_exists\(\$file\)\) \{'
|
||||
# Replace with: if (file_exists($file) && filesize($file) > 0) {
|
||||
NEW='if \(file_exists\(\$file\) \&\& filesize\(\$file\) > 0\) \{'
|
||||
sed -Ei "s#${OLD}#${NEW}#" "${FILE}"
|
||||
fi
|
||||
|
||||
# Prevent web component file downgrade if the webgui version is newer than the plugin version
|
||||
# Function to extract "ts" value from JSON file
|
||||
extract_ts() {
|
||||
|
||||
Reference in New Issue
Block a user