summaryrefslogtreecommitdiff
path: root/inc/init.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-06-24 14:00:49 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-06-24 14:00:49 +0200
commit89177306a2278255d6a2203b5fff4a839183d3cd (patch)
tree01117ed85283fd12a25809a6f3d9e360b4c860f1 /inc/init.php
parent3791b5891b0644625c7b05b63fc27fc5086a0f2c (diff)
downloadrpg-89177306a2278255d6a2203b5fff4a839183d3cd.tar.gz
rpg-89177306a2278255d6a2203b5fff4a839183d3cd.tar.bz2
Introducing a $_REQUEST/POST/GET wrapper
This new wrapper ensures types are correct and accessed parameters are actually set (with custom default fallbacks). The wrapper is available in the global $INPUT variable. It accesses $_REQUEST by default. If POST or GET is required, the post and get members can be used: $INPUT->int('foo',false); // access $_REQUEST['foo'], default false $INPUT->post->int('foo'); // access $_POST['foo'], default 0 $INPUT->get->int('foo'); // access $_GET['foo'], default 0 The codebase still needs to be updated to make use of this.
Diffstat (limited to 'inc/init.php')
-rw-r--r--inc/init.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/inc/init.php b/inc/init.php
index 403fbe4ab..1907aea09 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -197,6 +197,10 @@ if (empty($plugin_controller_class)) $plugin_controller_class = 'Doku_Plugin_Con
// load libraries
require_once(DOKU_INC.'inc/load.php');
+// input handle class
+global $INPUT;
+$INPUT = new Input();
+
// initialize plugin controller
$plugin_controller = new $plugin_controller_class();