summaryrefslogtreecommitdiff
path: root/db_record.class
diff options
context:
space:
mode:
authorUrban Müller2007-07-23 11:52:02 +0000
committerUrban Müller2007-07-23 11:52:02 +0000
commite604ad4231a127ae417dc7bfcf300af3ca69a016 (patch)
treef876faa93de047bf22121ea8ac0d82c100d6645d /db_record.class
parent4dd2ce87fa30735e2654689d915740bc23a0dc49 (diff)
downloaditools-e604ad4231a127ae417dc7bfcf300af3ca69a016.tar.gz
itools-e604ad4231a127ae417dc7bfcf300af3ca69a016.tar.bz2
itools-e604ad4231a127ae417dc7bfcf300af3ca69a016.zip
eliminated internal_error()
Diffstat (limited to 'db_record.class')
-rw-r--r--db_record.class10
1 files changed, 5 insertions, 5 deletions
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");
}