summaryrefslogtreecommitdiff
path: root/doku.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-06-24 14:42:45 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-06-24 14:42:45 +0200
commitdbd7dc8e229b08ed2adb060d445a5516c94f3c5d (patch)
tree8b33370750a8d3e3e715fa51d8366b29950d09c9 /doku.php
parentfd50d5c713878b03fdcd8d21f8209f968fe55646 (diff)
downloadrpg-dbd7dc8e229b08ed2adb060d445a5516c94f3c5d.tar.gz
rpg-dbd7dc8e229b08ed2adb060d445a5516c94f3c5d.tar.bz2
use INPUT wrapper in doku.php
Diffstat (limited to 'doku.php')
-rw-r--r--doku.php29
1 files changed, 14 insertions, 15 deletions
diff --git a/doku.php b/doku.php
index 97e594cb3..63756d6e2 100644
--- a/doku.php
+++ b/doku.php
@@ -4,6 +4,8 @@
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <andi@splitbrain.org>
+ *
+ * @global Input $INPUT
*/
// update message version
@@ -27,29 +29,26 @@ if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){
require_once(DOKU_INC.'inc/init.php');
//import variables
-$_REQUEST['id'] = str_replace("\xC2\xAD",'',$_REQUEST['id']); //soft-hyphen
-$QUERY = trim($_REQUEST['id']);
+$_REQUEST['id'] = str_replace("\xC2\xAD",'',$INPUT->str('id')); //soft-hyphen
+$QUERY = trim($INPUT->str('id'));
$ID = getID();
// deprecated 2011-01-14
$NS = getNS($ID);
-$REV = $_REQUEST['rev'];
-$IDX = $_REQUEST['idx'];
-$DATE = $_REQUEST['date'];
-$RANGE = $_REQUEST['range'];
-$HIGH = $_REQUEST['s'];
+$REV = $INPUT->int('rev');
+$IDX = $INPUT->str('idx');
+$DATE = $INPUT->int('date');
+$RANGE = $INPUT->str('range');
+$HIGH = $INPUT->param('s');
if(empty($HIGH)) $HIGH = getGoogleQuery();
-if (isset($_POST['wikitext'])) {
- $TEXT = cleanText($_POST['wikitext']);
+if ($INPUT->post->has('wikitext')) {
+ $TEXT = cleanText($INPUT->post->str('wikitext'));
}
-$PRE = cleanText(substr($_POST['prefix'], 0, -1));
-$SUF = cleanText($_POST['suffix']);
-$SUM = $_REQUEST['summary'];
-
-//sanitize revision
-$REV = preg_replace('/[^0-9]/','',$REV);
+$PRE = cleanText(substr($INPUT->post->str('prefix'), 0, -1));
+$SUF = cleanText($INPUT->post->str('suffix'));
+$SUM = $INPUT->post->str('summary');
//make infos about the selected page available
$INFO = pageinfo();