开发者

dokuwiki: disabling versioning in dokuwiki

i need help regarding dokuwiki i want to remove versioning from wiki. any tip our help will be highly appreciated. Thanks in advance I have looked into this code but so far didnt get any idea

`class cache_renderer extends cache_parser { function _useCache() { global $conf;

    if (!parent::_useCache()) return false;

    if (!isset($this->page)) {
        r开发者_开发问答eturn true;
    }

    // check current link existence is consistent with cache version
    // first check the purgefile
    // - if the cache is more recent than the purgefile we know no links can have been updated
    if ($this->_time >= @filemtime($conf['cachedir'].'/purgefile')) {
        return true;
    }

    // for wiki pages, check metadata dependencies
    $metadata = p_get_metadata($this->page);

    if (!isset($metadata['relation']['references']) ||
            empty($metadata['relation']['references'])) {
        return true;
    }

    foreach ($metadata['relation']['references'] as $id => $exists) {
        if ($exists != page_exists($id,'',false)) return false;
    }

    return true;
}`


Search for the function saveOldRevision() in inc/common.php.

Btw. I would suggest to ask such questions in the official forum/mailinglist. There you'll find the people who know the sourcecode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜