From dbd7dc8e229b08ed2adb060d445a5516c94f3c5d Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 24 Jun 2012 14:42:45 +0200 Subject: use INPUT wrapper in doku.php --- doku.php | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'doku.php') 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 + * + * @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(); -- cgit v1.2.3