本文整理汇总了PHP中plugin_isdisabled函数的典型用法代码示例。如果您正苦于以下问题:PHP plugin_isdisabled函数的具体用法?PHP plugin_isdisabled怎么用?PHP plugin_isdisabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了plugin_isdisabled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugin_list
/**
* Returns a list of available plugins of given type
*
* @param $type string, plugin_type name;
* the type of plugin to return,
* use empty string for all types
* @param $all bool;
* false to only return enabled plugins,
* true to return both enabled and disabled plugins
*
* @return array of plugin names
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function plugin_list($type = '', $all = false)
{
$plugins = array();
if ($dh = opendir(DOKU_PLUGIN)) {
while (false !== ($plugin = readdir($dh))) {
if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp') {
continue;
}
if (is_file(DOKU_PLUGIN . $plugin)) {
continue;
}
// if required, skip disabled plugins
if (!$all && plugin_isdisabled($plugin)) {
continue;
}
if ($type == '' || @file_exists(DOKU_PLUGIN . "{$plugin}/{$type}.php")) {
$plugins[] = $plugin;
} else {
if ($dp = @opendir(DOKU_PLUGIN . "{$plugin}/{$type}/")) {
while (false !== ($component = readdir($dp))) {
if (substr($component, 0, 1) == '.' || strtolower(substr($component, -4)) != ".php") {
continue;
}
if (is_file(DOKU_PLUGIN . "{$plugin}/{$type}/{$component}")) {
$plugins[] = $plugin . '_' . substr($component, 0, -4);
}
}
closedir($dp);
}
}
}
closedir($dh);
}
return $plugins;
}
示例2: render
function render($mode, &$renderer, $indata)
{
if ($mode == 'xhtml') {
list($state, $data) = $indata;
switch ($state) {
case DOKU_LEXER_ENTER:
$pluginClass = $this->getConf('addStyling') ? 'blockquote-plugin' : '';
$attr = '';
if ($data && strlen($data) > 0 && !plugin_isdisabled('wrap')) {
// get attributes from wrap helper plugin (if installed)
$wrap =& plugin_load('helper', 'wrap');
$attr = $wrap->buildAttributes($data, $pluginClass);
} else {
if ($pluginClass) {
$attr = 'class="' . $pluginClass . '"';
}
}
$renderer->doc .= '<cite ' . $attr . '>';
break;
case DOKU_LEXER_UNMATCHED:
$renderer->doc .= $renderer->_xmlEntities($data);
break;
case DOKU_LEXER_EXIT:
$renderer->doc .= "</cite>";
break;
}
return true;
}
// unsupported $mode
return false;
}
示例3: html_pluginlist
function html_pluginlist()
{
global $ID;
global $plugin_protected;
foreach ($this->manager->plugin_list as $plugin) {
$disabled = plugin_isdisabled($plugin);
$protected = in_array($plugin, $plugin_protected);
$checked = $disabled ? '' : ' checked="checked"';
$check_disabled = $protected ? ' disabled="disabled"' : '';
// determine display class(es)
$class = array();
if (in_array($plugin, $this->downloaded)) {
$class[] = 'new';
}
if ($disabled) {
$class[] = 'disabled';
}
if ($protected) {
$class[] = 'protected';
}
$class = count($class) ? ' class="' . join(' ', $class) . '"' : '';
ptln(' <fieldset' . $class . '>');
ptln(' <legend>' . $plugin . '</legend>');
ptln(' <input type="checkbox" class="enable" name="enabled[]" id="dw__p_' . $plugin . '" value="' . $plugin . '"' . $checked . $check_disabled . ' />');
ptln(' <h3 class="legend"><label for="dw__p_' . $plugin . '">' . $plugin . '</label></h3>');
$this->html_button($plugin, 'info', false, 6);
if (in_array('settings', $this->manager->functions)) {
$this->html_button($plugin, 'settings', !@file_exists(DOKU_PLUGIN . $plugin . '/settings.php'), 6);
}
$this->html_button($plugin, 'update', !$this->plugin_readlog($plugin, 'url'), 6);
$this->html_button($plugin, 'delete', $protected, 6);
ptln(' </fieldset>');
}
}
示例4: tpl_actions
/**
* Prints the actions links
*
* @author Michael Klier <chi@chimeric.de>
*/
function tpl_actions()
{
$actions = array('admin', 'edit', 'history', 'recent', 'backlink', 'subscribe', 'subscribens', 'index', 'login', 'profile');
print '<div class="sidebar_box">' . DOKU_LF;
print ' <ul>' . DOKU_LF;
foreach ($actions as $action) {
if (!actionOK($action)) {
continue;
}
// start output buffering
if ($action == 'edit') {
// check if new page button plugin is available
if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npb = $npd->html_new_page_button(true);
if ($npb) {
print ' <li><div class="li">';
print $npb;
print '</div></li>' . DOKU_LF;
}
}
}
ob_start();
print ' <li><div class="li">';
if (tpl_actionlink($action)) {
print '</div></li>' . DOKU_LF;
ob_end_flush();
} else {
ob_end_clean();
}
}
print ' </ul>' . DOKU_LF;
print '</div>' . DOKU_LF;
}
示例5: render
/**
* Render Output
*/
function render($mode, &$renderer, $data)
{
// do cool stuff here
if (plugin_isdisabled('blogtng')) {
return;
}
// FIXME do nothing and scream
//$this->helper =& plugin_load('helper', 'blogtng_FIXME'));
if ($mode == 'xhtml') {
$renderer->info['cache'] = false;
$renderer->doc .= $this->_list($data);
}
}
示例6: render
/**
* Render xhtml output or metadata
*
* @param string $mode Renderer mode (supported modes: xhtml and metadata)
* @param Doku_Renderer $renderer The renderer
* @param array $data The data from the handler function
* @return bool If rendering was successful.
*/
function render($mode, &$renderer, $data)
{
global $lang;
$flags = $data;
if ($mode == 'xhtml') {
/* @var Doku_Renderer_xhtml $renderer */
// prevent caching to ensure content is always fresh
$renderer->info['cache'] = false;
/* @var helper_plugin_pagelist $pagelist */
// let Pagelist Plugin do the work for us
if (plugin_isdisabled('pagelist') || !($pagelist = plugin_load('helper', 'pagelist'))) {
msg($this->getLang('missing_pagelistplugin'), -1);
return false;
}
// Prepare the flags for the pagelist plugin
$configflags = explode(',', str_replace(" ", "", $this->getConf('pagelist_flags')));
$flags = array_merge($configflags, $flags);
foreach ($flags as $key => $flag) {
if ($flag == "") {
unset($flags[$key]);
}
}
// print the search form
$renderer->doc .= $this->getForm();
// get the tag input data
$tags = $this->getTagSearchString();
if ($tags != NULL) {
/* @var helper_plugin_tag $my */
if ($my =& plugin_load('helper', 'tag')) {
$pages = $my->getTopic($this->getNS(), '', $tags);
}
// Display a message when no pages were found
if (!isset($pages) || !$pages) {
$renderer->p_open();
$renderer->cdata($lang['nothingfound']);
$renderer->p_close();
} else {
// display the actual search results
$pagelist->setFlags($flags);
$pagelist->startList();
foreach ($pages as $page) {
$pagelist->addPage($page);
}
$renderer->doc .= $pagelist->finishList();
}
}
return true;
}
return false;
}
示例7: _get_firsttag
/**
* Optionally add a CSS class for the first tag
*
* @author Michael Klier <chi@chimeric.de>
*/
function _get_firsttag($page) {
if(plugin_isdisabled('tag') || (!$taghelper =& plugin_load('helper', 'tag'))) {
return false;
}
$subject = p_get_metadata($page, 'subject');
if (is_array($subject)) {
$tag = $subject[0];
} else {
list($tag, $rest) = explode(' ', $subject, 2);
}
if($tag) {
return $tag;
} else {
return false;
}
}
示例8: process
function process()
{
global $plugin_protected;
global $INPUT;
$count_enabled = $count_disabled = 0;
$this->enabled = $INPUT->arr('enabled');
foreach ($this->manager->plugin_list as $plugin) {
if (in_array($plugin, $plugin_protected)) {
continue;
}
$new = in_array($plugin, $this->enabled);
$old = !plugin_isdisabled($plugin);
if ($new != $old) {
switch ($new) {
// enable plugin
case true:
if (plugin_enable($plugin)) {
msg(sprintf($this->lang['enabled'], $plugin), 1);
$count_enabled++;
} else {
msg(sprintf($this->lang['notenabled'], $plugin), -1);
}
break;
case false:
if (plugin_disable($plugin)) {
msg(sprintf($this->lang['disabled'], $plugin), 1);
$count_disabled++;
} else {
msg(sprintf($this->lang['notdisabled'], $plugin), -1);
}
break;
}
}
}
// refresh plugins, including expiring any dokuwiki cache(s)
if ($count_enabled || $count_disabled) {
$this->refresh();
}
}
示例9: check_captcha_selection
function check_captcha_selection()
{
$list = plugin_list();
$this->captcha = $this->getConf('captcha');
if (!in_array('captcha', $list)) {
if (preg_match("/captcha/", $this->captcha)) {
$this->captcha = 'builtin';
}
return;
}
if ($this->captcha == 'none' || $this->captcha == 'builtin') {
return;
}
if (plugin_isdisabled('captcha')) {
$this->captcha = 'builtin';
return;
}
$this->captcha = 'captcha';
}
示例10: check
/**
* Run a few sanity checks
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function check()
{
global $conf;
global $INFO;
if ($INFO['isadmin'] || $INFO['ismanager']) {
msg('DokuWiki version: ' . getVersion(), 1);
}
if (version_compare(phpversion(), '5.2.0', '<')) {
msg('Your PHP version is too old (' . phpversion() . ' vs. 5.2.0+ needed)', -1);
} else {
msg('PHP version ' . phpversion(), 1);
}
$mem = (int) php_to_byte(ini_get('memory_limit'));
if ($mem) {
if ($mem < 16777216) {
msg('PHP is limited to less than 16MB RAM (' . $mem . ' bytes). Increase memory_limit in php.ini', -1);
} elseif ($mem < 20971520) {
msg('PHP is limited to less than 20MB RAM (' . $mem . ' bytes), you might encounter problems with bigger pages. Increase memory_limit in php.ini', -1);
} elseif ($mem < 33554432) {
msg('PHP is limited to less than 32MB RAM (' . $mem . ' bytes), but that should be enough in most cases. If not, increase memory_limit in php.ini', 0);
} else {
msg('More than 32MB RAM (' . $mem . ' bytes) available.', 1);
}
}
if (is_writable($conf['changelog'])) {
msg('Changelog is writable', 1);
} else {
if (@file_exists($conf['changelog'])) {
msg('Changelog is not writable', -1);
}
}
if (isset($conf['changelog_old']) && @file_exists($conf['changelog_old'])) {
msg('Old changelog exists', 0);
}
if (@file_exists($conf['changelog'] . '_failed')) {
msg('Importing old changelog failed', -1);
} else {
if (@file_exists($conf['changelog'] . '_importing')) {
msg('Importing old changelog now.', 0);
} else {
if (@file_exists($conf['changelog'] . '_import_ok')) {
msg('Old changelog imported', 1);
if (!plugin_isdisabled('importoldchangelog')) {
msg('Importoldchangelog plugin not disabled after import', -1);
}
}
}
}
if (is_writable(DOKU_CONF)) {
msg('conf directory is writable', 1);
} else {
msg('conf directory is not writable', -1);
}
if ($conf['authtype'] == 'plain') {
global $config_cascade;
if (is_writable($config_cascade['plainauth.users']['default'])) {
msg('conf/users.auth.php is writable', 1);
} else {
msg('conf/users.auth.php is not writable', 0);
}
}
if (function_exists('mb_strpos')) {
if (defined('UTF8_NOMBSTRING')) {
msg('mb_string extension is available but will not be used', 0);
} else {
msg('mb_string extension is available and will be used', 1);
if (ini_get('mbstring.func_overload') != 0) {
msg('mb_string function overloading is enabled, this will cause problems and should be disabled', -1);
}
}
} else {
msg('mb_string extension not available - PHP only replacements will be used', 0);
}
if (!UTF8_PREGSUPPORT) {
msg('PHP is missing UTF-8 support in Perl-Compatible Regular Expressions (PCRE)', -1);
}
if (!UTF8_PROPERTYSUPPORT) {
msg('PHP is missing Unicode properties support in Perl-Compatible Regular Expressions (PCRE)', -1);
}
$loc = setlocale(LC_ALL, 0);
if (!$loc) {
msg('No valid locale is set for your PHP setup. You should fix this', -1);
} elseif (stripos($loc, 'utf') === false) {
msg('Your locale <code>' . hsc($loc) . '</code> seems not to be a UTF-8 locale, you should fix this if you encounter problems.', 0);
} else {
msg('Valid locale ' . hsc($loc) . ' found.', 1);
}
if ($conf['allowdebug']) {
msg('Debugging support is enabled. If you don\'t need it you should set $conf[\'allowdebug\'] = 0', -1);
} else {
msg('Debugging support is disabled', 1);
}
if ($INFO['userinfo']['name']) {
msg('You are currently logged in as ' . $_SERVER['REMOTE_USER'] . ' (' . $INFO['userinfo']['name'] . ')', 0);
msg('You are part of the groups ' . join($INFO['userinfo']['grps'], ', '), 0);
//.........这里部分代码省略.........
示例11: _getTplPerNamespace
/**
* Get template from namespace/page and config
*
* @author Michael Klier <chi@chimeric.de>
* @author Anika Henke <anika@selfthinker.org>
*/
private function _getTplPerNamespace()
{
global $ID;
$config = DOKU_CONF . 'loadskin.conf';
if (@file_exists($config)) {
$data = unserialize(io_readFile($config, false));
$id = $ID;
// remove language path from $id before you check for a match (it would only be at the start)
if ($this->getConf('inheritInTranslations') && !plugin_isdisabled('translation')) {
$transplugin =& plugin_load('helper', 'translation');
$langPath = $transplugin->getLangPart($id) . ':';
$pos = strpos($id, $langPath);
if ($pos !== false && $pos == 0) {
$id = str_ireplace($langPath, '', $id);
}
}
if ($data[$id]) {
return $data[$id];
}
$path = explode(':', $id);
while (count($path) > 0) {
$id = implode(':', $path);
if ($data[$id]) {
return $data[$id];
}
array_pop($path);
}
}
return false;
}
示例12: switch
<div class="bar-left">
<?php
if (!tpl_getConf('closedwiki') || tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER'])) {
switch (tpl_getConf('wiki_actionlinks')) {
case 'buttons':
// check if new page button plugin is available
if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npd->html_new_page_button();
}
tpl_button('edit');
tpl_button('history');
tpl_button('media');
break;
case 'links':
// check if new page button plugin is available
if (!plugin_isdisabled('npd') && ($npd =& plugin_load('helper', 'npd'))) {
$npd->html_new_page_button();
}
tpl_actionlink('edit');
tpl_actionlink('history');
tpl_actionlink('media');
break;
}
}
?>
</div>
<div class="bar-right">
<?php
switch (tpl_getConf('wiki_actionlinks')) {
case 'buttons':
if (!tpl_getConf('closedwiki') || tpl_getConf('closedwiki') && isset($_SERVER['REMOTE_USER'])) {
示例13: render
function render($mode, &$renderer, $data)
{
global $conf;
list($type, $num, $namespaces) = $data;
if ($mode == 'xhtml') {
if ($type == 'tag') {
// we need the tag helper plugin
if (plugin_isdisabled('tag') || !($tag = plugin_load('helper', 'tag'))) {
msg('The Tag Plugin must be installed to display tag clouds.', -1);
return false;
}
$cloud = $this->_getTagCloud($num, $min, $max, $namespaces, $tag);
} elseif ($type == 'search') {
$helper = plugin_load('helper', 'searchstats');
if ($helper) {
$cloud = $helper->getSearchWordArray($num);
// calculate min/max values
$min = PHP_INT_MAX;
$max = 0;
foreach ($cloud as $size) {
$min = min($size, $min);
$max = max($size, $max);
}
} else {
msg('You have to install the searchstats plugin to use this feature.', -1);
return false;
}
} else {
$cloud = $this->_getWordCloud($num, $min, $max);
}
if (!is_array($cloud) || empty($cloud)) {
return false;
}
$delta = ($max - $min) / 16;
// prevent caching to ensure the included pages are always fresh
$renderer->info['cache'] = false;
// and render the cloud
$renderer->doc .= '<div class="cloud">' . DOKU_LF;
foreach ($cloud as $word => $size) {
if ($size < $min + round($delta)) {
$class = 'cloud1';
} elseif ($size < $min + round(2 * $delta)) {
$class = 'cloud2';
} elseif ($size < $min + round(4 * $delta)) {
$class = 'cloud3';
} elseif ($size < $min + round(8 * $delta)) {
$class = 'cloud4';
} else {
$class = 'cloud5';
}
$name = $word;
if ($type == 'tag') {
$id = $word;
$exists = false;
resolve_pageID($tag->namespace, $id, $exists);
if ($exists) {
$link = wl($id);
if ($conf['useheading']) {
$name = p_get_first_heading($id, false);
} else {
$name = $word;
}
} else {
$link = wl($id, array('do' => 'showtag', 'tag' => $word));
}
$title = $word;
$class .= $exists ? '_tag1' : '_tag2';
} else {
if ($conf['userewrite'] == 2) {
$link = wl($word, array('do' => 'search', 'id' => $word));
$title = $size;
} else {
$link = wl($word, 'do=search');
$title = $size;
}
}
$renderer->doc .= DOKU_TAB . '<a href="' . $link . '" class="' . $class . '"' . ' title="' . $title . '">' . hsc($name) . '</a>' . DOKU_LF;
}
$renderer->doc .= '</div>' . DOKU_LF;
return true;
}
return false;
}
示例14: handle
/**
* Handler to prepare matched data for the rendering process
*
* @param string $match The text matched by the patterns
* @param int $state The lexer state for the match
* @param int $pos The character position of the matched text
* @param Doku_Handler $handler The Doku_Handler object
* @return bool|array Return an array with all data you want to use in render, false don't add an instruction
*/
public function handle($match, $state, $pos, Doku_Handler $handler)
{
$match = substr($match, 6, -7);
// remove form wrap
$lines = explode("\n", $match);
$actions = $rawactions = array();
$thanks = '';
$labels = '';
// parse the lines into an command/argument array
$cmds = array();
while (count($lines) > 0) {
$line = trim(array_shift($lines));
if (!$line) {
continue;
}
$args = $this->_parse_line($line, $lines);
$args[0] = $this->_sanitizeClassName($args[0]);
if (in_array($args[0], array('action', 'thanks', 'labels'))) {
if (count($args) < 2) {
msg(sprintf($this->getLang('e_missingargs'), hsc($args[0]), hsc($args[1])), -1);
continue;
}
// is action element?
if ($args[0] == 'action') {
array_shift($args);
$rawactions[] = array('type' => array_shift($args), 'argv' => $args);
continue;
}
// is thank you text?
if ($args[0] == 'thanks') {
$thanks = $args[1];
continue;
}
// is labels?
if ($args[0] == 'labels') {
$labels = $args[1];
continue;
}
}
if (strpos($args[0], '_') === false) {
$name = 'bureaucracy_field' . $args[0];
} else {
//name convention: plugin_componentname
$name = $args[0];
}
/** @deprecated 6-11-2014 rename old field name*/
if ($name == 'bureaucracy_fielddataplugin') {
msg("Please rename the field 'dataplugin' into 'data_aliastextbox'", -1);
$name = 'data_aliastextbox';
}
/** @var helper_plugin_bureaucracy_field $field */
$field = $this->loadHelper($name, false);
if ($field) {
$field->initialize($args);
$cmds[] = $field;
} else {
/** @deprecated 6-11-2014 old date plugin installed */
if ($name == 'data_aliastextbox') {
msg("Please update the Data plugin for enabling the 'data_aliastextbox' field again (previous known as 'dataplugin' field)", -1);
}
msg(sprintf($this->getLang('e_unknowntype'), hsc($name)), -1);
}
}
// check if action is available
foreach ($rawactions as $action) {
$action['type'] = $this->_sanitizeClassName($action['type']);
if (strpos($action['type'], '_') === false) {
$action['actionname'] = 'bureaucracy_action' . $action['type'];
} else {
//name convention for other plugins: plugin_componentname
$action['actionname'] = $action['type'];
}
list($plugin, $component) = explode('_', $action['actionname']);
$alternativename = $action['type'] . '_' . $action['type'];
// bureaucracy_action<name> or <plugin>_<componentname>
if (!plugin_isdisabled($action['actionname']) || @file_exists(DOKU_PLUGIN . $plugin . '/helper/' . $component . '.php')) {
$actions[] = $action;
// shortcut for other plugins with component name <name>_<name>
} elseif (plugin_isdisabled($alternativename) || !@file_exists(DOKU_PLUGIN . $action['type'] . '/helper/' . $action['type'] . '.php')) {
$action['actionname'] = $alternativename;
$actions[] = $action;
// not found
} else {
msg(sprintf($this->getLang('e_unknownaction'), hsc($action['actionname'])), -1);
/** @deprecated 6-11-2014 old date plugin installed */
if ($action['actionname'] == 'pagemod_pagemod') {
msg("Please update the Pagemod plugin for enabling the 'pagemod_pagemod' field again (previous known as 'pagemod' field)", -1);
}
}
}
// action(s) found?
//.........这里部分代码省略.........
示例15: check
/**
* Run a few sanity checks
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function check()
{
global $conf;
global $INFO;
msg('DokuWiki version: ' . getVersion(), 1);
if (version_compare(phpversion(), '5.1.2', '<')) {
msg('Your PHP version is too old (' . phpversion() . ' vs. 5.1.2+ needed)', -1);
} else {
msg('PHP version ' . phpversion(), 1);
}
$mem = (int) php_to_byte(ini_get('memory_limit'));
if ($mem) {
if ($mem < 16777216) {
msg('PHP is limited to less than 16MB RAM (' . $mem . ' bytes). Increase memory_limit in php.ini', -1);
} elseif ($mem < 20971520) {
msg('PHP is limited to less than 20MB RAM (' . $mem . ' bytes), you might encounter problems with bigger pages. Increase memory_limit in php.ini', -1);
} elseif ($mem < 33554432) {
msg('PHP is limited to less than 32MB RAM (' . $mem . ' bytes), but that should be enough in most cases. If not, increase memory_limit in php.ini', 0);
} else {
msg('More than 32MB RAM (' . $mem . ' bytes) available.', 1);
}
}
if (is_writable($conf['changelog'])) {
msg('Changelog is writable', 1);
} else {
if (@file_exists($conf['changelog'])) {
msg('Changelog is not writable', -1);
}
}
if (isset($conf['changelog_old']) && @file_exists($conf['changelog_old'])) {
msg('Old changelog exists', 0);
}
if (@file_exists($conf['changelog'] . '_failed')) {
msg('Importing old changelog failed', -1);
} else {
if (@file_exists($conf['changelog'] . '_importing')) {
msg('Importing old changelog now.', 0);
} else {
if (@file_exists($conf['changelog'] . '_import_ok')) {
msg('Old changelog imported', 1);
if (!plugin_isdisabled('importoldchangelog')) {
msg('Importoldchangelog plugin not disabled after import', -1);
}
}
}
}
if (is_writable($conf['datadir'])) {
msg('Datadir is writable', 1);
} else {
msg('Datadir is not writable', -1);
}
if (is_writable($conf['olddir'])) {
msg('Attic is writable', 1);
} else {
msg('Attic is not writable', -1);
}
if (is_writable($conf['mediadir'])) {
msg('Mediadir is writable', 1);
} else {
msg('Mediadir is not writable', -1);
}
if (is_writable($conf['cachedir'])) {
msg('Cachedir is writable', 1);
} else {
msg('Cachedir is not writable', -1);
}
if (is_writable($conf['lockdir'])) {
msg('Lockdir is writable', 1);
} else {
msg('Lockdir is not writable', -1);
}
if ($conf['authtype'] == 'plain') {
if (is_writable(DOKU_CONF . 'users.auth.php')) {
msg('conf/users.auth.php is writable', 1);
} else {
msg('conf/users.auth.php is not writable', 0);
}
}
if (function_exists('mb_strpos')) {
if (defined('UTF8_NOMBSTRING')) {
msg('mb_string extension is available but will not be used', 0);
} else {
msg('mb_string extension is available and will be used', 1);
if (ini_get('mbstring.func_overload') != 0) {
msg('mb_string function overloading is enabled, this will cause problems and should be disabled', -1);
}
}
} else {
msg('mb_string extension not available - PHP only replacements will be used', 0);
}
if ($conf['allowdebug']) {
msg('Debugging support is enabled. If you don\'t need it you should set $conf[\'allowdebug\'] = 0', -1);
} else {
msg('Debugging support is disabled', 1);
}
//.........这里部分代码省略.........