Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
*
*/

if ( !defined ( 'DOKU_INC' ) ) die ( );

//require_once ( DOKU_INC.'inc/changelog.php' );

if ( !defined ( 'DOKU_LF' ) ) define ( 'DOKU_LF', "\n" );
if ( !defined ( 'DOKU_TAB' ) ) define ( 'DOKU_TAB', "\t" );
if ( !defined ( 'DOKU_PLUGIN' ) ) define ( 'DOKU_PLUGIN', DOKU_INC . 'lib/plugins/' );

class action_plugin_discordnotifier extends DokuWiki_Action_Plugin {

function register ( Doku_Event_Handler $controller ) {
Expand Down
5 changes: 2 additions & 3 deletions helper.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

// must be run within Dokuwiki
if (!defined('DOKU_INC')) die();
class helper_plugin_discordnotifier extends DokuWiki_Plugin {

var $_event = null;
Expand Down Expand Up @@ -101,7 +99,8 @@ public function set_payload_text ( $event ) {
if ( $this -> getConf ( 'notify_show_name' ) === 'real name' ) {
$user = $INFO['userinfo']['name'];
} elseif ( $this -> getConf ( 'notify_show_name' ) === 'username' ) {
$user = $_SERVER['REMOTE_USER'];
global $INPUT;
$user = $INPUT->server->str('REMOTE_USER');
} else {
throw new Exception('invalid notify_show_name value');
}
Expand Down