diff options
-rw-r--r-- | db.class | 10 | ||||
-rw-r--r-- | db_record.class | 10 | ||||
-rw-r--r-- | db_table.class | 4 | ||||
-rw-r--r-- | debug.class | 2 | ||||
-rw-r--r-- | mail.class | 2 | ||||
-rw-r--r-- | text.class | 4 |
6 files changed, 16 insertions, 16 deletions
@@ -56,10 +56,10 @@ function it_db($databasename, $username, $password, $host='localhost', $host_upd $this->name = $databasename; } else - internal_error("Can't select database \"$databasename\" on host \"$host\"."); + it::fatal("Can't select database \"$databasename\" on host \"$host\"."); } else - internal_error("Can't connect to database server \"$host\" as user \"$username\"."); + it::fatal("Can't connect to database server \"$host\" as user \"$username\"."); if ($host_update) { @@ -92,12 +92,12 @@ function sql_query($sql) if (mysql_select_db($this->name, $this->link)) $this->host = $this->host_update; else - internal_error('Error selecting update database "'.$this->name.'" on host "'.$this->host_update.'".'); + it::fatal('Error selecting update database "'.$this->name.'" on host "'.$this->host_update.'".'); $this->host_update=''; } else - internal_error('Error connecting to update database server "'.$this->host_update.'" as user "'.$this->username.'".'); + it::fatal('Error connecting to update database server "'.$this->host_update.'" as user "'.$this->username.'".'); } return mysql_query($sql, $this->link); @@ -200,7 +200,7 @@ function _get_table_info() $this->tablenames[$i] = $name; } } - else internal_error("mysql_list_tables($this->name,$this->link) failed."); + else it::fatal("mysql_list_tables($this->name,$this->link) failed."); } diff --git a/db_record.class b/db_record.class index 9470df7..a716117 100644 --- a/db_record.class +++ b/db_record.class @@ -239,7 +239,7 @@ function update($tags) $this->_write_pre_process($tags); if ($this->key == "") - internal_error("it_db_record::update(): can't update undefined record"); + it::fatal("it_db_record::update(): can't update undefined record"); /* If we have nothing to do, return instead of performing an invalid SQL query */ if (!count($tags)) @@ -265,7 +265,7 @@ function update($tags) if ($ti[0] == $this->key) { if ($this->data[$this->keyfieldname] != $ti[0]) - internal_error("$sql: trying to change key from $this->key."); + it::fatal("$sql: trying to change key from $this->key."); } $this->data[$ti[0]] = $ti[1]; @@ -296,7 +296,7 @@ function delete($key="") if (!$key) $key = $this->key; if (($this->table->name == "") || ($this->keyfieldname == "") || ($key == "")) - internal_error("it_db_record::delete(): no record\n"); + it::fatal("it_db_record::delete(): no record\n"); $sql = "DELETE FROM " . $this->table->name . " WHERE ". $this->keyfieldname . "='" . mysql_real_escape_string($key) . "'"; if ($result = $this->table->db->sql_query($sql)) @@ -320,9 +320,9 @@ function safe_get_field($field) { if (isset($this->data[$field])) return $this->data[$field]; - else internal_error("it_db_record::safe_get_field(): field \"$field\" not present in record."); + else it::fatal("it_db_record::safe_get_field(): field \"$field\" not present in record."); } - else internal_error("it_db_record::safe_get_field(): empty field name"); + else it::fatal("it_db_record::safe_get_field(): empty field name"); } diff --git a/db_table.class b/db_table.class index 567bb7f..5536ccf 100644 --- a/db_table.class +++ b/db_table.class @@ -94,7 +94,7 @@ function _get_field_info() /* debug("name='" . $this->fieldnames[$i] . "', len=" . $this->fieldlengths[$i] . ", type='" . $this->fieldtypes[$i] . "', flags='" . $this->fieldflags[$i] . "'\n", 6); */ } } - else internal_error("mysql_list_fields($this->db->name, $this->name, $this->db->link) failed."); + else it::fatal("mysql_list_fields($this->db->name, $this->name, $this->db->link) failed."); } @@ -307,7 +307,7 @@ function make_select($name, $selected, $globaloption, $optionfield, $description function drop() { if ($this->name == '') - internal_error("it_db_table::drop(): no table\n"); + it::fatal("it_db_table::drop(): no table\n"); if ($result = $this->db->sql_query('DROP TABLE IF EXISTS '.$this->name)) { diff --git a/debug.class b/debug.class index fa6f314..cabe365 100644 --- a/debug.class +++ b/debug.class @@ -72,7 +72,7 @@ function mail($text, $level = 0) /** - * Display error message or maintenance page and terminate processing. Mail message and vardump to maintainer + * DEPRECATED. Display error message or maintenance page and terminate processing. Mail message and vardump to maintainer * @param $text Message to display * @return This function never returns */ @@ -140,7 +140,7 @@ function add_body($text, $type = IT_MAIL_PLAIN) break; default: - internal_error("it_mail::add_body invalid type $type"); + it::fatal("it_mail::add_body invalid type $type"); break; } } @@ -262,13 +262,13 @@ function transmogrify($text, $values = null) /** - * when running it_text in debug mode, you can use this to die (internal_error) + * when running it_text in debug mode, you can use this to die * in case there were unknown labels with a list of all unknown labels */ function checkout_unknown_labels() { if ($this->unknown_labels) - internal_error('No text found for labels: ' . implode(',', $this->unknown_labels)); + it::fatal('No text found for labels: ' . implode(',', $this->unknown_labels)); } |