use INPUT wrapper in doku.php
This commit is contained in:
parent
fd50d5c713
commit
dbd7dc8e22
29
doku.php
29
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();
|
||||
|
|
Loading…
Reference in New Issue