  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: database.php 1290 2007-03-01 19:36:08Z hpdl $ |
| |
| 3 | + | $Id: database.php 1293 2007-03-02 00:07:08Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
296 | 296 | | $batch_select_field, |
| |
297 | 297 | | $logging = false, |
| |
298 | 298 | | $logging_module, |
  |
299 | | - | $logging_module_id = false, |
| |
| 299 | + | $logging_module_id, |
|
300 | 300 | | $logging_fields = array(), |
| |
301 | 301 | | $logging_changed = array(); |
| |
302 | 302 | | |
| |
|
|
 |
… |
|
535 | 535 | | |
| |
536 | 536 | | if ($this->affectedRows($this->query_handler) > 0) { |
| |
537 | 537 | | if (!empty($this->logging_changed)) { |
  |
538 | | - | if ( ($this->logging_action == 'insert') && ($this->logging_module_id === false) ) { |
| |
| 538 | + | if ( ($this->logging_action == 'insert') && !is_numeric($this->logging_module_id) ) { |
|
539 | 539 | | $this->logging_module_id = $this->db_class->nextID(); |
| |
540 | 540 | | $this->setNextID($this->logging_module_id); |
| |
541 | 541 | | } |
| |
|
|
 |
… |
|
580 | 580 | | $this->cache_expire = $expire; |
| |
581 | 581 | | } |
| |
582 | 582 | | |
  |
583 | | - | function setLogging($module, $id = false) { |
| |
| 583 | + | function setLogging($module, $id = null) { |
  |
584 | 584 | | $this->logging = true; |
| |
585 | 585 | | $this->logging_module = $module; |
| |
586 | 586 | | $this->logging_module_id = $id; |