Question

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)) {
        return 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;
}`
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top