[icinga-checkins] icinga.org: icinga-core/rbartels/cgis: Revert " new config option to set initial state of persistence for"

git at icinga.org git at icinga.org
Sat Sep 4 12:32:53 CEST 2010


Module: icinga-core
Branch: rbartels/cgis
Commit: bac99a4db8c4ae60ccdc81278688dd57a49f3e98
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=bac99a4db8c4ae60ccdc81278688dd57a49f3e98

Author: Christoph Maser <cmr at financial.com>
Date:   Sun Jul 25 10:03:57 2010 +0200

Revert "new config option to set initial state of persistence for"

This reverts commit 46a5151fe022f2a116cdc757e6aafeb3db152881.

---

 cgi/cgiutils.c           |    5 -----
 cgi/cmd.c                |   14 ++------------
 sample-config/cgi.cfg.in |    8 --------
 3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/cgi/cgiutils.c b/cgi/cgiutils.c
index cd07287..b84f4c9 100644
--- a/cgi/cgiutils.c
+++ b/cgi/cgiutils.c
@@ -109,8 +109,6 @@ int             refresh_rate=DEFAULT_REFRESH_RATE;
 
 int             escape_html_tags=FALSE;
 
-int             persistent_ack_comments=FALSE;
-
 int             use_ssl_authentication=FALSE;
 
 int             default_statusmap_layout_method=0;
@@ -431,9 +429,6 @@ int read_cgi_config_file(char *filename){
 		else if(!strcmp(var,"escape_html_tags"))
 			escape_html_tags=(atoi(val)>0)?TRUE:FALSE;
 
-		else if(!strcmp(var,"persistent_ack_comments"))
-			persistent_ack_comments=(atoi(val)>0)?TRUE:FALSE;
-
 		else if(!strcmp(var,"lock_author_names"))
 			lock_author_names=(atoi(val)>0)?TRUE:FALSE;
 
diff --git a/cgi/cmd.c b/cgi/cmd.c
index f6866ca..f8cde83 100644
--- a/cgi/cmd.c
+++ b/cgi/cmd.c
@@ -50,8 +50,6 @@ extern int  use_authentication;
 
 extern int  lock_author_names;
 
-extern int  persistent_ack_comments;
-
 extern scheduled_downtime *scheduled_downtime_list;
 extern comment *comment_list;
 
@@ -962,11 +960,7 @@ void request_command_data(int cmd){
 			printf("</b></td></tr>\n");
 		        }
 		printf("<tr><td CLASS='optBoxItem'>Persistent%s:</td><td><b>",(cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM)?" Comment":"");
-		if ( (persistent_ack_comments==TRUE) && (cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM) ) {
-			printf("<INPUT TYPE='checkbox' NAME='persistent' %s>","CHECKED");
-		} else {
-			printf("<INPUT TYPE='checkbox' NAME='persistent' %s>","");
-		}
+		printf("<INPUT TYPE='checkbox' NAME='persistent' %s>",(cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM)?"":"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' %s>",escape_string(comment_author),(lock_author_names==TRUE)?"READONLY DISABLED":"");
@@ -992,11 +986,7 @@ void request_command_data(int cmd){
 			printf("</b></td></tr>\n");
 		        }
 		printf("<tr><td CLASS='optBoxItem'>Persistent%s:</td><td><b>",(cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM)?" Comment":"");
-		if ( (persistent_ack_comments==TRUE) && (cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM) ){
-			printf("<INPUT TYPE='checkbox' NAME='persistent' %s","CHECKED");
-		} else {
-			printf("<INPUT TYPE='checkbox' NAME='persistent' %s","");
-		}
+		printf("<INPUT TYPE='checkbox' NAME='persistent' %s",(cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM)?"":"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' %s>",escape_string(comment_author),(lock_author_names==TRUE)?"READONLY DISABLED":"");
diff --git a/sample-config/cgi.cfg.in b/sample-config/cgi.cfg.in
index 9458fef..200cdd0 100644
--- a/sample-config/cgi.cfg.in
+++ b/sample-config/cgi.cfg.in
@@ -292,14 +292,6 @@ escape_html_tags=1
 
 
 
-# PERSISTENT ACKNOWLEDGEMENT COMMENTS
-# This options determines whether wether the initial state
-# of the checkbox "Persistent Comment:" for service and host
-# problem acknowledgements is checked or uncheckd
-
-persistent_ack_comments=0
-
-
 
 # SOUND OPTIONS
 # These options allow you to specify an optional audio file





More information about the icinga-checkins mailing list