diff --git a/conf/default.php b/conf/default.php index c619005..7c0d830 100644 --- a/conf/default.php +++ b/conf/default.php @@ -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 : diff --git a/conf/metadata.php b/conf/metadata.php index a0fa7b1..188d2f3 100644 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -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 : diff --git a/helper.php b/helper.php index e1084f1..8e2802f 100644 --- a/helper.php +++ b/helper.php @@ -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'); } /** @@ -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 @@ -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(); diff --git a/lang/en/settings.php b/lang/en/settings.php index 8aec307..e6667b8 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -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 :