Skip to content

Commit

Permalink
Added check for syntax.php in plugin's root directory with msg to remove
Browse files Browse the repository at this point in the history
  • Loading branch information
turnermm committed Jul 27, 2021
1 parent 8fec020 commit 795ba7e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions action.php
Expand Up @@ -5,11 +5,20 @@
*/
// must be run within Dokuwiki
if(!defined('DOKU_INC')) die();
if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
class action_plugin_nodisp extends DokuWiki_Action_Plugin {
public function register(Doku_Event_Handler $controller) {
$controller->register_hook('TPL_CONTENT_DISPLAY', 'BEFORE', $this, 'handle_wiki_content');
}

function __construct() {

if(file_exists(DOKU_PLUGIN . 'nodisp/syntax.php')) {
msg("Please remove syntax.php from lib/plugins/nodisp or remove the plugin and reinstall");
}

}

function handle_wiki_content(Doku_Event $event, $param) {
global $ACT;
$act = act_clean($ACT);
Expand Down

0 comments on commit 795ba7e

Please sign in to comment.