diff options
-rw-r--r-- | doku.php | 3 | ||||
-rw-r--r-- | inc/infoutils.php | 18 |
2 files changed, 21 insertions, 0 deletions
@@ -76,5 +76,8 @@ trigger_event('DOKUWIKI_DONE', $tmp=array()); + //handle metadebug request + debug_meta($ID); + // xdebug_dump_function_profile(1); ?> diff --git a/inc/infoutils.php b/inc/infoutils.php index 98bd22352..ab8bc8deb 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -247,4 +247,22 @@ function dbglog($msg){ } } +/** + * Prints the metadata of a given page + * + * Only prints when debugging is allowed and the metadebug request + * parameter is set + * + * The data is dumped after tpl_action and thus after the template's + * closing html tag. This makes the HTML invalid, but this is for + * debugging only anyway. + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function debug_meta($id){ + global $conf; + if(!$conf['allowdebug']) return; + if(!$_REQUEST['metadebug']) return; + dbg(p_get_metadata($id)); +} |