Project

General

Profile

« Previous | Next » 

Revision 44c42356

Added by Phil Davis over 8 years ago

Report problems applying changes

1) Strictly keep track of the accumulating $retval from calls to various
functions that apply changes.
2) Use new function print_apply_result_box() to print a suitable message
in a suitable severity based on $retval

View differences:

src/usr/local/www/services_ntpd.php
151 151

  
152 152
		write_config("Updated NTP Server Settings");
153 153

  
154
		$changes_applied = true;
154 155
		$retval = 0;
155
		$retval = system_ntp_configure();
156
		$savemsg = get_std_save_message($retval);
156
		$retval |= system_ntp_configure();
157 157
	}
158 158
}
159 159

  
......
192 192
if ($input_errors) {
193 193
	print_input_errors($input_errors);
194 194
}
195
if ($savemsg) {
196
	print_info_box($savemsg, 'success');
195

  
196
if ($changes_applied) {
197
	print_apply_result_box($retval);
197 198
}
198 199

  
199 200
$tab_array = array();

Also available in: Unified diff