18 require_once SQ_LIB_PATH.
'/config/config.inc';
19 require_once SQ_LIB_PATH.
'/html_form/html_form.inc';
39 var $config_vars = Array(
40 'SQ_MS_LOG_TO_FILE_WHITE_LIST' => Array(
'editable' => 1,
'default' =>
'*'),
41 'SQ_MS_LOG_TO_FILE_BLACK_LIST' => Array(
'editable' => 1,
'default' =>
"asset.attributes\nasset.workflow.invitation\nasset.workflow.announce\nasset.workflow.invitation.*\nasset.workflow.announce.*"),
42 'SQ_MS_LOG_TO_DB_WHITE_LIST' => Array(
'editable' => 1,
'default' =>
'*'),
43 'SQ_MS_LOG_TO_DB_BLACK_LIST' => Array(
'editable' => 1,
'default' =>
"asset.attributes.fulllog\nasset.workflow.invitation\nasset.workflow.announce\nasset.workflow.invitation.*\nasset.workflow.announce.*\ninstall.*"),
44 'SQ_MS_SEND_MAIL_WHITE_LIST' => Array(
'editable' => 1,
'default' =>
"asset.locking.forced\nconfig.*\nhipo.*\ninbox.*\nasset.status.notify\nasset.workflow.invitation\nasset.workflow.announce\nasset.workflow.invitation.*\nasset.workflow.announce.*\nasset.workflow.stale\nasset.workflow.bundle.*\ncron.deadlock"),
45 'SQ_MS_SEND_MAIL_BLACK_LIST' => Array(
'editable' => 1,
'default' =>
''),
55 parent::__construct();
56 $this->config_file = SQ_DATA_PATH.
'/private/conf/messaging_service.inc';
75 parent::paintBackend($o);
78 $class = get_class_lower($this);
80 require_once SQ_ATTRIBUTES_PATH.
'/option_list/option_list.inc';
83 $option_list->setEditParam(
'width', 60);
85 $o->openSection(translate(
'messaging_service_configuration'));
86 $o->openField(translate(
'messaging_service_file_white_list'));
88 $option_list->value = SQ_MS_LOG_TO_FILE_WHITE_LIST;
89 $option_list->paint(
'SQ_MS_LOG_TO_FILE_WHITE_LIST');
91 echo nl2br(SQ_MS_LOG_TO_FILE_WHITE_LIST);
93 $o->note(translate(
'messaging_service_file_white_list_note'));
95 $o->openField(translate(
'messaging_service_file_black_list'));
97 $option_list->value = SQ_MS_LOG_TO_FILE_BLACK_LIST;
98 $option_list->paint(
'SQ_MS_LOG_TO_FILE_BLACK_LIST');
100 echo nl2br(SQ_MS_LOG_TO_FILE_BLACK_LIST);
102 $o->note(translate(
'messaging_service_file_black_list_note'));
104 $o->openField(translate(
'messaging_service_db_white_list'));
106 $option_list->value = SQ_MS_LOG_TO_DB_WHITE_LIST;
107 $option_list->paint(
'SQ_MS_LOG_TO_DB_WHITE_LIST');
109 echo nl2br(SQ_MS_LOG_TO_DB_WHITE_LIST);
111 $o->note(translate(
'messaging_service_db_white_list_note'));
113 $o->openField(translate(
'messaging_service_db_black_list'));
115 $option_list->value = SQ_MS_LOG_TO_DB_BLACK_LIST;
116 $option_list->paint(
'SQ_MS_LOG_TO_DB_BLACK_LIST');
118 echo nl2br(SQ_MS_LOG_TO_DB_BLACK_LIST);
120 $o->note(translate(
'messaging_service_db_black_list_note'));
122 $o->openField(translate(
'messaging_service_mail_white_list'));
124 $option_list->value = SQ_MS_SEND_MAIL_WHITE_LIST;
125 $option_list->paint(
'SQ_MS_SEND_MAIL_WHITE_LIST');
127 echo nl2br(SQ_MS_SEND_MAIL_WHITE_LIST);
129 $o->note(translate(
'messaging_service_mail_white_list_note'));
131 $o->openField(translate(
'messaging_service_mail_black_list'));
133 $option_list->value = SQ_MS_SEND_MAIL_BLACK_LIST;
134 $option_list->paint(
'SQ_MS_SEND_MAIL_BLACK_LIST');
136 echo nl2br(SQ_MS_SEND_MAIL_BLACK_LIST);
138 $o->note(translate(
'messaging_service_mail_black_list_note'));
142 if ($write_access) $o->commitButton(
'', TRUE);
159 if (!$write_access)
return parent::processBackend($o);
161 $class = get_class_lower($this);
163 require_once SQ_ATTRIBUTES_PATH.
'/option_list/option_list.inc';
167 $message_types = Array(
173 foreach ($message_types as $message_type) {
175 $w =
'SQ_MS_'.$message_type.
'_WHITE_LIST';
176 $b =
'SQ_MS_'.$message_type.
'_BLACK_LIST';
179 $option_list->process($w);
180 $_POST[$class][$w] = $option_list->value;
182 $option_list->process($b);
183 $_POST[$class][$b] = $option_list->value;
185 return parent::processBackend($o);