* Merge 18 code.
This commit is contained in:
@@ -575,7 +575,7 @@ class jobModel extends model
|
||||
{
|
||||
$pipeline = json_decode($job->pipeline);
|
||||
|
||||
$pipelineParams = new stdclass;
|
||||
$pipelineParams = new stdclass;
|
||||
$pipelineParams->ref = zget($pipeline, 'reference', '');
|
||||
if(!$pipelineParams->ref)
|
||||
{
|
||||
|
||||
@@ -627,11 +627,19 @@ class webhookModel extends model
|
||||
*
|
||||
* @param int $webhookID
|
||||
* @param int $actionID
|
||||
* @param string $toList
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getOpenIdList($webhookID, $actionID)
|
||||
public function getOpenIdList($webhookID, $actionID, $toList = '')
|
||||
{
|
||||
if($toList)
|
||||
{
|
||||
$openIdList = $this->getBoundUsers($webhookID, $toList);
|
||||
$openIdList = join(',', $openIdList);
|
||||
return $openIdList;
|
||||
}
|
||||
|
||||
if(empty($actionID)) return false;
|
||||
|
||||
$action = $this->dao->select('*')->from(TABLE_ACTION)->where('id')->eq($actionID)->fetch();
|
||||
@@ -663,10 +671,11 @@ class webhookModel extends model
|
||||
* @param object $webhook
|
||||
* @param string $sendData
|
||||
* @param int $actionID
|
||||
* @param string $appendUser
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function fetchHook($webhook, $sendData, $actionID = 0)
|
||||
public function fetchHook($webhook, $sendData, $actionID = 0, $appendUser = '')
|
||||
{
|
||||
if(!extension_loaded('curl')) return print(helper::jsonEncode($this->lang->webhook->error->curl));
|
||||
|
||||
@@ -674,7 +683,7 @@ class webhookModel extends model
|
||||
{
|
||||
if(is_string($webhook->secret)) $webhook->secret = json_decode($webhook->secret);
|
||||
|
||||
$openIdList = $this->getOpenIdList($webhook->id, $actionID);
|
||||
$openIdList = $this->getOpenIdList($webhook->id, $actionID, $appendUser);
|
||||
if(empty($openIdList)) return false;
|
||||
if($webhook->type == 'dinguser')
|
||||
{
|
||||
@@ -790,7 +799,7 @@ class webhookModel extends model
|
||||
$log->url = $webhook->url;
|
||||
$log->contentType = $webhook->contentType;
|
||||
$log->data = $data;
|
||||
$log->result = $result;
|
||||
$log->result = (string)$result;
|
||||
|
||||
$this->dao->insert(TABLE_LOG)->data($log)->exec();
|
||||
return !dao::isError();
|
||||
|
||||
Reference in New Issue
Block a user