Changeset 484

Show
Ignore:
Timestamp:
08/12/08 23:44:55 (5 months ago)
Author:
ChrisPHL
Message:

fixed a bug where content of the startup commands of the diag page will be overwritten if back function of browser was used and submit button affirmed after that

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/www/cgi-bin/webif/diag.sh

    r478 r484  
    6969header "Diagnostics" 
    7070 
     71empty "$FORM_submit" || [ "$do_not_execute" = "0" ] || echo "<font color=red>Form seems to be corrupted, \"$FORM_cmd\" was not executed for security reasons.</font>" 
    7172echo "<textarea style='width:700px; height:400px'>" 
    7273        if empty "$FORM_submit"; then 
     
    7677                        eval $FORM_cmd 
    7778                else 
    78                         echo "Form seems to be corrupted, \"$FORM_cmd\" was not executed for security reasons.
     79                        echo "$FORM_cmd
    7980                fi 
    8081        fi 
     
    9798EOF 
    9899 
     100empty "$FORM_submit" || [ "$do_not_execute" = "0" ] || echo "<font color=red>Form seems to be corrupted, no changes were saved for security reasons.</font>" 
     101 
    99102echo "<textarea name="commandlist" style='width:700px; height:400px'>" 
    100103        if empty "$FORM_submit"; then 
     
    111114                        fi 
    112115                else 
    113                         echo "Form seems to be corrupted, no changes were saved for security reasons.
     116                        [ -f /etc/config/startup-commands ] && echo "`cat /etc/config/startup-commands | grep -v "!/bin/sh"`
    114117                fi 
    115118        fi