$string['dbmigrateconnecerror'] = 'Could not connect to the database specified.';
$string['dbmigrateencodingerror'] = 'The database specified has encoding $a rather than required UNICODE/UTF8.<br />Please specify another.';
$string['dbmigratepostgres'] = 'It seems that you are using PostgreSQL as the database server. To continue the migration process you need to manually create a new database with encoding \"UNICODE\"(PostgreSQL 7) or \"UTF8\" (PostgreSQL 8) to store the migrated data. Please enter your new database connection settings below to continue:';
+$string['debugnone'] = 'Do not show any debugging notices';
+$string['debugerror'] = 'E_ERROR: Show only fatal errors';
+$string['debugwarning'] = 'E_WARNING: show only serious warnings';
+$string['debugparse'] = 'E_PARSE: show parsing errors';
+$string['debugnotice'] = 'E_NOTICE: show informational notices';
+$string['debugall'] = 'E_ALL: show all reasonable feedback';
+$string['debugstrict'] = 'E_STRICT: show absolutely everything, even very minor errors';
$string['density'] = 'Density';
$string['download'] = 'Download';
$string['edithelpdocs'] = 'Edit help documents';
$string['updatetimezones'] = 'Update timezones';
$string['upwards'] = 'upwards';
-?>
\ No newline at end of file
+?>
}
}
-class admin_setting_special_debug extends admin_setting_configcheckbox {
+class admin_setting_special_debug extends admin_setting_configselect {
function admin_setting_special_debug() {
$name = 'debug';
$visiblename = get_string('debug', 'admin');
$description = get_string('configdebug', 'admin');
- parent::admin_setting_configcheckbox($name, $visiblename, $description, '');
+ $choices = array( 0 => get_string('debugnone', 'admin'),
+ E_ERROR => get_string('debugerror', 'admin'),
+ E_WARNING => get_string('debugwarning', 'admin'),
+ E_PARSE => get_string('debugparse', 'admin'),
+ E_NOTICE => get_string('debugnotice', 'admin'),
+ E_ALL => get_string('debugall', 'admin'),
+ E_STRICT => get_string('debugstrict', 'admin')
+ );
+ parent::admin_setting_configselect($name, $visiblename, $description, '', $choices);
}
- function write_setting($data) {
- if ($data == '1') {
- return (set_config($this->name,15) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
- } else {
- return (set_config($this->name,7) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
+ function get_setting() {
+ global $CFG;
+ if ($CFG->debug == 7) { // Old values
+ return 1;
+ }
+ if ($CFG->debug == 15) { // Old values
+ return 16;
}
+ return $CFG->debug;
}
- function output_html() {
- return '<tr><td width="100" align="right" valign="top">' . $this->visiblename . '</td>' .
- '<td align="left"><input type="checkbox" size="50" name="s_'. $this->name .'" value="1" ' . ($this->get_setting() == 15 ? 'checked="checked"' : '') . ' /></td></tr>' .
- '<tr><td> </td><td align="left">' . $this->description . '</td></tr>';
+ function write_setting($data) {
+ return (set_config($this->name,$data) ? '' : get_string('errorsetting', 'admin') . $this->visiblename . '<br />');
}
}