function dir_init_log_path() { global $conf; $logstats_accessconf = $this->getConf('hitslog'); if ($logstats_accessconf == "") { nice_die('Error in directions plugin (logger component): the configuration variable $conf[\'plugin\'][\'directions\'][\'hitslog\'] is not set or the default value cannot be read.'); } $tmp_accesslogname = DOKU_INC . $logstats_accessconf; $tmp_accesslogname = init_path($tmp_accesslogname); if ($tmp_accesslogname == "") { $this->dir_init_log_file(DOKU_INC . $logstats_accessconf); } }
/** * update changed setting with user provided value $input * - if changed value fails error check, save it to $this->_input (to allow echoing later) * - if changed value passes error check, set $this->_local to the new value * * @param mixed $input the new value * @return boolean true if changed, false otherwise (also on error) */ function update($input) { if ($this->is_protected()) { return false; } $value = is_null($this->_local) ? $this->_default : $this->_local; if ($value == $input) { return false; } if (!init_path($input)) { $this->_error = true; $this->_input = $input; return false; } $this->_local = $input; return true; }
/** * Checks paths from config file */ function init_paths() { global $conf; $paths = array('datadir' => 'pages', 'olddir' => 'attic', 'mediadir' => 'media', 'metadir' => 'meta', 'cachedir' => 'cache', 'indexdir' => 'index', 'lockdir' => 'locks', 'tmpdir' => 'tmp'); foreach ($paths as $c => $p) { if (empty($conf[$c])) { $conf[$c] = $conf['savedir'] . '/' . $p; } $conf[$c] = init_path($conf[$c]); if (empty($conf[$c])) { nice_die("The {$c} ('{$p}') does not exist, isn't accessible or writable.\n You should check your config and permission settings.\n Or maybe you want to <a href=\"install.php\">run the\n installer</a>?"); } } // path to old changelog only needed for upgrading $conf['changelog_old'] = init_path(isset($conf['changelog']) ? $conf['changelog'] : $conf['savedir'] . '/changes.log'); if ($conf['changelog_old'] == '') { unset($conf['changelog_old']); } // hardcoded changelog because it is now a cache that lives in meta $conf['changelog'] = $conf['metadir'] . '/_dokuwiki.changes'; $conf['media_changelog'] = $conf['metadir'] . '/_media.changes'; }
function _create_dir($path) { global $conf; $res = init_path($path); if (empty($res)) { // let's create it, recursively $res = io_mkdir_p($path); //$res = mkdir($path, $conf['dmode'], true); if (!$res) { die("Unable to create directory {$path}, please create it."); } } }
function epub_get_data_media() { static $dir; global $conf; if (!$dir) { $dir = init_path($conf['savedir']) . '/media/'; } return $dir; }