* Fix bugs.

+ Save log when an entry visit zentao.
This commit is contained in:
liugang
2017-10-25 17:20:27 +08:00
parent a192a26348
commit 14ab071b46
9 changed files with 35 additions and 12 deletions
+4 -3
View File
@@ -69,7 +69,7 @@ class webhookModel extends model
$this->loadModel('action');
$actions = $this->dao->select('*')->from(TABLE_ACTION)->where('id')->in($actions)->fetchAll('id');
$users = $this->loadModel('user')->getPairs('noletter');
foreach($logs as $log)
{
if(!isset($actions[$log->action]))
@@ -100,7 +100,7 @@ class webhookModel extends model
*/
public function getDataList()
{
return $this->dao->select('*')->from(TABLE_WEBHOOKDATA)->where('status')->eq('wait')->orderBy('id')->fetchAll('id');
return $this->dao->select('*')->from(TABLE_WEBHOOKDATAS)->where('status')->eq('wait')->orderBy('id')->fetchAll('id');
}
/**
@@ -317,6 +317,7 @@ class webhookModel extends model
$oldOnlyBody = 'yes';
unset($_GET['onlybody']);
}
if($objectType == 'case') $objectType = 'testcase';
$viewLink = helper::createLink($objectType, 'view', "id=$objectID");
if($oldOnlyBody) $_GET['onlybody'] = $oldOnlyBody;
@@ -401,7 +402,7 @@ class webhookModel extends model
$webhookData->createdBy = $this->app->user->account;
$webhookData->createdDate = helper::now();
$this->dao->insert(TABLE_WEBHOOKDATA)->data($webhookData)->exec();
$this->dao->insert(TABLE_WEBHOOKDATAS)->data($webhookData)->exec();
return !dao::isError();
}