summaryrefslogtreecommitdiff
path: root/it_dbi.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_dbi.class')
-rw-r--r--it_dbi.class7
1 files changed, 4 insertions, 3 deletions
diff --git a/it_dbi.class b/it_dbi.class
index a183239..ec152d7 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -408,8 +408,9 @@ function _read_post_process()
* Pre-process data before writing a record.
* This is a stub-function that can be overloaded.
* @param $tags Reference to update/create tags, can be modified as needed
+ * @param $command SQL command ('INSERT', 'REPLACE' or 'UPDATE')
*/
-function _write_pre_process(/* &$tags */)
+function _write_pre_process(&$tags, $command) # NOPHPLINT
{
}
@@ -643,7 +644,7 @@ function insert($tags = array(), $command = "INSERT")
$this->_connect();
/* Pre-processing, $tags is passed by reference and may be modified here */
- $this->_write_pre_process($tags);
+ $this->_write_pre_process($tags, $command);
if ($this->_p['randomid'] && !isset($tags[$this->_p['keyfield']]))
$tags[$this->_p['keyfield']] = md5(uniqid(mt_rand()));
@@ -688,7 +689,7 @@ function update($tags = array(), $where = null)
$result = true;
/* Pre-processing, $tags is passed by reference and may be modified here */
- $this->_write_pre_process($tags);
+ $this->_write_pre_process($tags, 'UPDATE');
if ($set = $this->_set($tags, isset($where)))
{