From a54180c49f17794d1764b14033f97ccbe90fdfc8 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Mon, 24 Jun 2019 09:17:17 +0800 Subject: [PATCH] * Finish task #5821. --- module/webhook/model.php | 10 +++++++++- module/webhook/view/create.html.php | 2 +- module/webhook/view/edit.html.php | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/module/webhook/model.php b/module/webhook/model.php index 16eaef5907..0f7ea1983b 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -86,7 +86,15 @@ class webhookModel extends model $object->$field = ''; } - $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}]"; + $text = ''; + if(isset($data->markdown) and is_object($data->markdown)) + { + $text = substr($data->markdown->text, 0, strpos($data->markdown->text, '(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}]"; + } $log->action = $text; $log->actionURL = $this->getViewLink($action->objectType, $action->objectID); diff --git a/module/webhook/view/create.html.php b/module/webhook/view/create.html.php index 3f3ffb8526..6ca7b6f35e 100644 --- a/module/webhook/view/create.html.php +++ b/module/webhook/view/create.html.php @@ -18,7 +18,7 @@

webhook->create;?>

-
+ diff --git a/module/webhook/view/edit.html.php b/module/webhook/view/edit.html.php index d2d1076535..b878c5e682 100644 --- a/module/webhook/view/edit.html.php +++ b/module/webhook/view/edit.html.php @@ -17,7 +17,7 @@

webhook->edit;?>

- +
webhook->type;?>
webhook->type;?>