Skip to content

New noinstructionscache flag #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conf/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@
$conf['depth'] = 1; // maximum depth of namespace includes, 0 for unlimited depth
$conf['readmore'] = 1; // Show readmore link in case of firstsection only
$conf['debugoutput'] = 0; // print debug information to debuglog if global allowdebug is enabled
$conf['noinstructionscache'] = 0;// don't use instructions cache during rendering included page content
//Setup VIM: ex: et ts=2 :
1 change: 1 addition & 0 deletions conf/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
$meta['depth'] = array('numeric', '_min' => 0);
$meta['readmore'] = array('onoff');
$meta['debugoutput'] = array('onoff');
$meta['noinstructionscache'] = array('onoff');
//Setup VIM: ex: et ts=2 :
10 changes: 9 additions & 1 deletion helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function __construct() {
$this->defaults['rsort'] = $this->getConf('rsort');
$this->defaults['depth'] = $this->getConf('depth');
$this->defaults['readmore'] = $this->getConf('readmore');
$this->defaults['noinstructionscache'] = $this->getConf('noinstructionscache');
}

/**
Expand Down Expand Up @@ -220,6 +221,9 @@ function get_flags($setflags) {
case 'exclude':
$flags['exclude'] = $value;
break;
case 'noinstructionscache':
$flags['noinstructionscache'] = 1;
break;
}
}
// the include_content URL parameter overrides flags
Expand Down Expand Up @@ -266,7 +270,11 @@ function _get_instructions($page, $sect, $mode, $lvl, $flags, $root_id = null, $
global $ID;
$backupID = $ID;
$ID = $page; // Change the global $ID as otherwise plugins like the discussion plugin will save data for the wrong page
$ins = p_cached_instructions(wikiFN($page), false, $page);
if ($flags['noinstructionscache']) {
$ins = p_get_instructions(io_readWikiPage(wikiFN($page), $page));
} else {
$ins = p_cached_instructions(wikiFN($page), false, $page);
}
$ID = $backupID;
} else {
$ins = array();
Expand Down
1 change: 1 addition & 0 deletions lang/en/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@
$lang['depth'] = 'Maximum depth of namespace includes, 0 for unlimited depth';
$lang['readmore'] = 'Show or not the \'Read More\' link in case of firstsection only';
$lang['debugoutput'] = 'Print verbose debug information to the dokuwiki debuglog if the global "allowdebug" option is enabled';
$lang['noinstructionscache'] = 'Don\'t use instructions cache during rendering included page content.';
//Setup VIM: ex: et ts=2 :