* Finish task#7346.
This commit is contained in:
@@ -135,6 +135,19 @@ class webhook extends control
|
||||
*/
|
||||
public function log($id, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri);
|
||||
$this->session->set('productPlanList', $uri);
|
||||
$this->session->set('releaseList', $uri);
|
||||
$this->session->set('storyList', $uri);
|
||||
$this->session->set('projectList', $uri);
|
||||
$this->session->set('taskList', $uri);
|
||||
$this->session->set('buildList', $uri);
|
||||
$this->session->set('bugList', $uri);
|
||||
$this->session->set('caseList', $uri);
|
||||
$this->session->set('testtaskList', $uri);
|
||||
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
|
||||
@@ -87,10 +87,14 @@ class webhookModel extends model
|
||||
}
|
||||
|
||||
$text = '';
|
||||
if(isset($data->markdown) and is_object($data->markdown))
|
||||
if(isset($data->markdown->text))
|
||||
{
|
||||
$text = substr($data->markdown->text, 0, strpos($data->markdown->text, '(http'));
|
||||
}
|
||||
elseif(isset($data->markdown->content))
|
||||
{
|
||||
$text = substr($data->markdown->content, 0, strpos($data->markdown->content, '(http'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = substr($data->text, 0, strpos($data->text, '(http')) ? substr($data->text, 0, strpos($data->text, '(http')) : zget($users, $data->user, $this->app->user->realname) . $this->lang->action->label->{$action->action} . $this->lang->action->objectTypes[$action->objectType] . "[#{$action->objectID}::{$object->$field}]";
|
||||
@@ -321,9 +325,9 @@ class webhookModel extends model
|
||||
$this->saveData($id, $actionID, $postData, $actor);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$result = $this->fetchHook($webhook, $postData, $actionID);
|
||||
$this->saveLog($webhook, $actionID, $postData, $result);
|
||||
if(!empty($result)) $this->saveLog($webhook, $actionID, $postData, $result);
|
||||
}
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
<td class='text' title='<?php echo $webhook->url;?>'><?php echo $webhook->url;?></td>
|
||||
<td class='c-actions text-right'>
|
||||
<?php
|
||||
if($webhook->type == 'dinguser' or $webhook->type == 'wechatuser') common::printIcon('webhook', 'chooseDept', "webhookID=$id", '', 'list', 'link');
|
||||
if($webhook->type == 'dinguser') common::printIcon('webhook', 'chooseDept', "webhookID=$id", '', 'list', 'link');
|
||||
if($webhook->type == 'wechatuser') common::printIcon('webhook', 'bind', "webhookID=$id", '', 'list', 'link');
|
||||
common::printIcon('webhook', 'log', "webhookID=$id", '', 'list', 'file-text');
|
||||
common::printIcon('webhook', 'edit', "webhookID=$id", '', 'list');
|
||||
if(common::hasPriv('webhook', 'delete'))
|
||||
|
||||
Reference in New Issue
Block a user