diff options
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r-- | inc/infoutils.php | 18 |
1 files changed, 18 insertions, 0 deletions
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)); +} |