* remove the undelete method to action module.

This commit is contained in:
wangchunsheng
2013-01-20 01:36:20 +00:00
parent 0648fe3560
commit 0168fb63bf
-17
View File
@@ -244,21 +244,4 @@ class model
$object = str_replace($this->config->db->prefix, '', $table);
$this->loadModel('action')->create($object, $id, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
}
/**
* Undelete an record.
*
* @param int $actionID
* @access public
* @return void
*/
public function undelete($actionID)
{
$action = $this->loadModel('action')->getById($actionID);
if($action->action != 'deleted') return;
$table = $this->config->objectTables[$action->objectType];
$this->dao->update($table)->set('deleted')->eq(0)->where('id')->eq($action->objectID)->exec();
$this->dao->update(TABLE_ACTION)->set('extra')->eq(ACTIONMODEL::BE_UNDELETED)->where('id')->eq($actionID)->exec();
$this->action->create($action->objectType, $action->objectID, 'undeleted');
}
}