Skip to content
Snippets Groups Projects
Commit c1b9dbaf authored by Andreas Gohr's avatar Andreas Gohr
Browse files

metadebug parameter added

With DokuWiki's reliance on certain page metadata, it is sometimes necessary to
view the metadata of a page. This patch allows developers to append the parameter
?metadebug

darcs-hash:20060925193202-7ad00-6a42c7458aaa1cc40df3c7a61ad70df5d64be152.gz
parent 41396b71
No related branches found
No related tags found
No related merge requests found
......@@ -76,5 +76,8 @@
trigger_event('DOKUWIKI_DONE', $tmp=array());
//handle metadebug request
debug_meta($ID);
// xdebug_dump_function_profile(1);
?>
......@@ -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));
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment