Skip to content

Commit

Permalink
mail_send() replaced, some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Klap-in committed Aug 3, 2022
1 parent 301b6d0 commit ebba3ee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions action/receive.php
Expand Up @@ -14,15 +14,15 @@ class action_plugin_linkback_receive extends DokuWiki_Action_Plugin {
* Register the eventhandlers.
*/
function register(Doku_Event_Handler $controller) {
$controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'handle_act_render', array ());
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_metaheader_output', array ());
$controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'handle_headers_send', array ());
$controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'addTrackbackLink', array ());
$controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'addPingbackLinkToMetaheader', array ());
$controller->register_hook('ACTION_HEADERS_SEND', 'BEFORE', $this, 'addPingbackLinkToHTTPHeader', array ());
}

/**
* Handler for the TPL_ACT_RENDER event
*/
function handle_act_render(Doku_Event $event, $params) {
function addTrackbackLink(Doku_Event $event, $params) {
global $ID;

// Action not 'show'? Quit
Expand Down Expand Up @@ -71,7 +71,7 @@ function handle_act_render(Doku_Event $event, $params) {
* @param $params
* @return bool|void
*/
function handle_metaheader_output(Doku_Event $event, $params) {
function addPingbackLinkToMetaheader(Doku_Event $event, $params) {
global $ID;

// Pingbacks disabled? Quit
Expand Down Expand Up @@ -111,7 +111,7 @@ function handle_metaheader_output(Doku_Event $event, $params) {
* @param $params
* @return bool|void
*/
function handle_headers_send(Doku_Event $event, $params) {
function addPingbackLinkToHTTPHeader(Doku_Event $event, $params) {
global $ID;

// Pingbacks disabled? Quit
Expand Down
7 changes: 5 additions & 2 deletions tools.php
Expand Up @@ -103,8 +103,11 @@ function notify($ID, $linkback) {

$subject = '[' . $conf['title'] . '] ' . $this->getLang('mail_newlinkback');

mail_send($to, $subject, $text, $conf['mailfrom'], '');

$mail = new Mailer();
$mail->to($to);
$mail->subject($subject);
$mail->setBody($text);
$mail->send();
}

/**
Expand Down

0 comments on commit ebba3ee

Please sign in to comment.