Skip to content

Commit

Permalink
fix tinyfilemanager bug
Browse files Browse the repository at this point in the history
  • Loading branch information
muink committed Nov 26, 2022
1 parent 7f41d75 commit ffc3502
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions makenew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ sed -i "s|\$FM_HIGHLIGHTJS_STYLE|<?php echo FM_HIGHLIGHTJS_STYLE ?>|g" "$PKG_DIR
#sed -i "/jquery.slim.min.js/,/}/ {s|bootstrap.min.js|bootstrap.slim.min.js|}" "$PKG_DIR/$INDEXPHP"
sed -Ei "/<link rel=\"(preconnect|dns-prefetch)\"/d" "$PKG_DIR/$INDEXPHP"

# Fix
sed -Ei "/^\/\/ Auth/,/^}/{/\/\/ Logging In/,/\/\/ Form/{s|(fm_redirect\()FM_ROOT_URL \. |\1|g}}" "$PKG_DIR/$INDEXPHP"

# Migrating to Local Reference
sed -Ei "s,^(.+=\")(http(s)?://.+/)([^/]+\.(css|js))(\".+),\1\5/\4\6," "$PKG_DIR/$INDEXPHP"

Expand Down
3 changes: 3 additions & 0 deletions root/usr/libexec/tinyfilemanager-update
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ done
sed -i "s|\$FM_HIGHLIGHTJS_STYLE|<?php echo FM_HIGHLIGHTJS_STYLE ?>|g" /tmp/$PKG_DIR/$INDEXPHP
sed -Ei "/<link rel=\"(preconnect|dns-prefetch)\"/d" /tmp/$PKG_DIR/$INDEXPHP

# Fix
sed -Ei "/^\/\/ Auth/,/^}/{/\/\/ Logging In/,/\/\/ Form/{s|(fm_redirect\()FM_ROOT_URL \. |\1|g}}" /tmp/$PKG_DIR/$INDEXPHP

# Migrating to Local Reference
sed -Ei "s,^(.+=\")(http(s)?://)(.+\.(css|js))(\".+),\1$REF_DIR/\4\6," /tmp/$PKG_DIR/$INDEXPHP

Expand Down

0 comments on commit ffc3502

Please sign in to comment.