1<?php 2/** 3 * Bootstrap Wrapper: Popup helper 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> 7 * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 */ 9 10$doku_inc_dirs = array( 11 '/opt/bitnami/dokuwiki', # Bitnami (Docker) 12 '/usr/share/webapps/dokuwiki', # Arch Linux 13 '/usr/share/dokuwiki', # Debian/Ubuntu 14 '/app/dokuwiki', # LinuxServer.io (Docker), 15 realpath(dirname(__FILE__) . '/../../../../'), # Default DokuWiki path 16); 17 18# Load doku_inc.php file 19# 20if (file_exists(dirname(__FILE__) . '/../doku_inc.php')) { 21 require_once dirname(__FILE__) . '/../doku_inc.php'; 22} 23 24if (!defined('DOKU_INC')) { 25 foreach ($doku_inc_dirs as $dir) { 26 if (!defined('DOKU_INC') && @file_exists("$dir/inc/init.php")) { 27 define('DOKU_INC', "$dir/"); 28 } 29 } 30} 31 32if (!file_exists(DOKU_INC)) { 33 print 'Problem with DOKU_INC directory. Please check your DokuWiki installation directory!'; 34 die; 35} 36 37define('DOKU_MEDIAMANAGER', 1); // needed to get proper CSS/JS 38 39global $lang; 40global $INPUT; 41global $ACT; 42global $INFO; 43 44require_once DOKU_INC . 'inc/init.php'; 45 46session_write_close(); //close session 47 48$syntax = $INPUT->get->str('syntax'); 49 50if ($syntax) { 51 52 $help_file = dirname(__FILE__) . '/help/' . $syntax . '.txt'; 53 54 if (file_exists($help_file)) { 55 56 $INFO['exists'] = true; 57 $ACT = 'show'; 58 59 $help_content = file_get_contents($help_file); 60 61 echo str_replace(array('class="inline"'), array('class="inline table"'), p_render('xhtml', p_get_instructions($help_content), $info)); 62 63 } 64 65} 66