summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-09-25 21:32:02 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-09-25 21:32:02 +0200
commitc1b9dbaf11fd4b48e8c70aa0613cc81c82cc81cc (patch)
treeeb96d7dcffa014d4aa65d61e93d471800d1dbdc4 /inc/infoutils.php
parent41396b7169938033ad2fa43497d53fe53b83093d (diff)
downloadrpg-c1b9dbaf11fd4b48e8c70aa0613cc81c82cc81cc.tar.gz
rpg-c1b9dbaf11fd4b48e8c70aa0613cc81c82cc81cc.tar.bz2
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
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php18
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));
+}