@wuiInputFileSave(NAME, FILE, OWNER, GROUP, PERMS)

Saves contents of file posted by user from @wuiInputFileEdit().

The following parameters are recognized:

NAME

Name associated with the input field. Use the name "contents" if retuning from the NST PHP File Editor.

FILE

NAME of file to save contents of ${QUERY_'NAME'} to.

OWNER

Owner to set on file after save (like: "root").

GROUP

Group to set on file after save (like: "root").

PERMS

Permisssion to set on file after save (like: "644").

This macro is defined as:

  SAVE_FILE_RESULTS="1";
  TMPFILE_@param(0)=\"$(/bin/mktemp /tmp/wuiInputFileSaveXXXXXX)\" &&
    printf \"%s\\n\" \"${QUERY_@param(0)}\" | \\
      /bin/sed -e 's,\\r$,,' >| \"${TMPFILE_@param(0)}\" &&
      /usr/bin/sudo /usr/bin/php @topDir()/php/lib/InstallFollowBash.php \\
        \"@param(2)\" \"@param(3)\" \"@param(4)\" \\
        \"${TMPFILE_@param(0)}\" \"@param(1)\" &&
      SAVE_FILE_RESULTS="0";
  /bin/rm -f \"${TMPFILE_@param(0)}\";