Patch for persistant Author

matthias.flittner at nethinks.com matthias.flittner at nethinks.com
Wed May 9 11:48:20 CEST 2007


Dear devel-list,
I think it's more usefull, if the user which logged into nagios could not 
modify the Author Field. 

Here is me patch.

If you think twice with me, put it into the newest version.

Regards,

Matthias



--- cgi/cmd.c   (version 2. 9)
+++ cgi/cmd.c   (working copy)
@@ -943,7 +943,7 @@
                printf("<INPUT TYPE='checkbox' NAME='persistent' 
CHECKED>");
                printf("</b></td></tr>\n");
                printf("<tr><td CLASS='optBoxRequiredItem'>Author (Your 
Name):</td><td><b>");
-               printf("<INPUT TYPE'TEXT' NAME='com_author' 
VALUE='%s'>",comment_author);
+               printf("<INPUT TYPE'TEXT' NAME='com_author' VALUE='%s' 
readonly>",comment_author);
                printf("</b></td></tr>\n");
                printf("<tr><td 
CLASS='optBoxRequiredItem'>Comment:</td><td><b>");
                printf("<INPUT TYPE='TEXT' NAME='com_data' VALUE='%s' 
SIZE=40>",comment_data);
@@ -969,7 +969,7 @@
                printf("<INPUT TYPE='checkbox' NAME='persistent' 
CHECKED>");
                printf("</b></td></tr>\n");
                printf("<tr><td CLASS='optBoxRequiredItem'>Author (Your 
Name):</td><td><b>");
-               printf("<INPUT TYPE='TEXT' NAME='com_author' 
VALUE='%s'>",comment_author);
+               printf("<INPUT TYPE='TEXT' NAME='com_author' VALUE='%s' 
readonly>",comment_author);
                printf("</b></td></tr>\n");
                printf("<tr><td 
CLASS='optBoxRequiredItem'>Comment:</td><td><b>");
                printf("<INPUT TYPE='TEXT' NAME='com_data' VALUE='%s' 
SIZE=40>",comment_data);
@@ -1152,7 +1152,7 @@
                        printf("<INPUT TYPE='TEXT' NAME='service' 
VALUE='%s'>",service_desc);
                        }
                printf("<tr><td CLASS='optBoxRequiredItem'>Author (Your 
Name):</td><td><b>");
-               printf("<INPUT TYPE='TEXT' NAME='com_author' 
VALUE='%s'>",comment_author);
+               printf("<INPUT TYPE='TEXT' NAME='com_author' VALUE='%s' 
readonly>",comment_author);
                printf("</b></td></tr>\n");
                printf("<tr><td 
CLASS='optBoxRequiredItem'>Comment:</td><td><b>");
                printf("<INPUT TYPE='TEXT' NAME='com_data' VALUE='%s' 
SIZE=40>",comment_data);
@@ -1284,7 +1284,7 @@
                        printf("</b></td></tr>\n");
                        }
                printf("<tr><td CLASS='optBoxRequiredItem'>Author (Your 
Name):</td><td><b>");
-               printf("<INPUT TYPE='TEXT' NAME='com_author' 
VALUE='%s'>",comment_author);
+               printf("<INPUT TYPE='TEXT' NAME='com_author' VALUE='%s' 
readonly>",comment_author);
                printf("</b></td></tr>\n");
                printf("<tr><td 
CLASS='optBoxRequiredItem'>Comment:</td><td><b>");
                printf("<INPUT TYPE='TEXT' NAME='com_data' VALUE='%s' 
SIZE=40>",comment_data);

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/




More information about the Developers mailing list