* Fix bug: super model must return.

This commit is contained in:
zhujinyong
2022-01-04 10:27:09 +08:00
parent c5bd97f292
commit 17384dcb06
+12 -10
View File
@@ -5,7 +5,7 @@
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
@@ -14,7 +14,7 @@
/**
* model基类。
* The base class of model.
*
*
* @package framework
*/
include dirname(__FILE__) . '/base/model.class.php';
@@ -42,13 +42,15 @@ class model extends baseModel
* @param string $table the table name
* @param string $id the id value of the record to be deleted
* @access public
* @return void
* @return bool
*/
public function delete($table, $id)
{
$this->dao->update($table)->set('deleted')->eq(1)->where('id')->eq($id)->exec();
$object = preg_replace('/^' . preg_quote($this->config->db->prefix) . '/', '', trim($table, '`'));
$this->loadModel('action')->create($object, $id, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
return true;
}
/**
@@ -68,7 +70,7 @@ class model extends baseModel
/**
* Get flow extend fields.
*
*
* @access public
* @return array
*/
@@ -81,9 +83,9 @@ class model extends baseModel
/**
* Check flow rule.
*
* @param object $field
* @param string $value
*
* @param object $field
* @param string $value
* @access public
* @return bool|string
*/
@@ -95,9 +97,9 @@ class model extends baseModel
}
/**
* Execute Hooks
*
* @param int $objectID
* Execute Hooks
*
* @param int $objectID
* @access public
* @return void
*/