Skip to content
Permalink
Browse files

Change for use with rocketchat

  • Loading branch information...
cmol committed Aug 1, 2016
1 parent d8c3b99 commit 94512879475ad23cb21105bd7f28767d030cf482
Showing with 9 additions and 7 deletions.
  1. +9 −7 action.php
@@ -22,7 +22,9 @@ function register(Doku_Event_Handler $controller) {
function handle_action_act_preprocess(Doku_Event $event, $param) {
if (isset($event->data['save'])) {
$this->handle();
if ($event->data['save'] == $lang['btn_save']) {
$this->handle();
}
}
return;
}
@@ -64,11 +66,10 @@ private function handle() {
// attachments
if (!empty($SUM)) {
$data['attachments'] = array(array(
"title_link" = > "{$this->urlize()}",
"title" = > "Summary",
"text" = > "{$SUM}\n- {$fullname}",
"image_url" = > "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Dokuwiki_logo.svg/128px-Dokuwiki_logo.svg.png",
"color" = > "#AB4531"
"title_link" => "{$this->urlize()}",
"title" => "Summary",
"text" => "{$SUM}\n- {$fullname}",
"color" => "#AB4531"
));
}
@@ -100,8 +101,9 @@ private function handle() {
}
// submit payload
$pay = urlencode($json);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, array('payload' => $json));
curl_setopt($ch, CURLOPT_POSTFIELDS, "payload={$pay}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);

0 comments on commit 9451287

Please sign in to comment.
You can’t perform that action at this time.