diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2012-06-28 22:04:10 -0400 |
---|---|---|
committer | Tom N Harris <tnharris@whoopdedo.org> | 2012-06-28 22:04:10 -0400 |
commit | bfd0f5975e6e3578b4fa0c712e9779a0861fdc72 (patch) | |
tree | 53c6fbab61f8178f567c293521fad66fa91099d6 /lib | |
parent | 7d01a0eac854c623a74ff7936d5eba9413aefe79 (diff) | |
download | rpg-bfd0f5975e6e3578b4fa0c712e9779a0861fdc72.tar.gz rpg-bfd0f5975e6e3578b4fa0c712e9779a0861fdc72.tar.bz2 |
Input wrapper for exe scripts
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/css.php | 8 | ||||
-rw-r--r-- | lib/exe/detail.php | 4 | ||||
-rw-r--r-- | lib/exe/fetch.php | 8 | ||||
-rw-r--r-- | lib/exe/indexer.php | 7 |
4 files changed, 14 insertions, 13 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index 69b512205..5cc4ab830 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -29,14 +29,14 @@ function css_out(){ global $conf; global $lang; global $config_cascade; + global $INPUT; $mediatype = 'screen'; - if (isset($_REQUEST['s']) && - in_array($_REQUEST['s'], array('all', 'print', 'feed'))) { - $mediatype = $_REQUEST['s']; + if (in_array($INPUT->str('s'), array('all', 'print', 'feed'))) { + $mediatype = $INPUT->str('s'); } - $tpl = trim(preg_replace('/[^\w-]+/','',$_REQUEST['t'])); + $tpl = trim(preg_replace('/[^\w-]+/','',$INPUT->str('t'))); if($tpl){ $tplinc = DOKU_INC.'lib/tpl/'.$tpl.'/'; $tpldir = DOKU_BASE.'lib/tpl/'.$tpl.'/'; diff --git a/lib/exe/detail.php b/lib/exe/detail.php index 35186f5dd..ea46bc037 100644 --- a/lib/exe/detail.php +++ b/lib/exe/detail.php @@ -6,9 +6,9 @@ require_once(DOKU_INC.'inc/init.php'); session_write_close(); $IMG = getID('media'); -$ID = cleanID($_REQUEST['id']); +$ID = cleanID($INPUT->str('id')); -if($conf['allowdebug'] && $_REQUEST['debug']){ +if($conf['allowdebug'] && $INPUT->has('debug')){ print '<pre>'; foreach(explode(' ','basedir userewrite baseurl useslash') as $x){ print '$'."conf['$x'] = '".$conf[$x]."';\n"; diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php index 143d40f22..60843460e 100644 --- a/lib/exe/fetch.php +++ b/lib/exe/fetch.php @@ -17,10 +17,10 @@ //get input $MEDIA = stripctl(getID('media',false)); // no cleaning except control chars - maybe external - $CACHE = calc_cache($_REQUEST['cache']); - $WIDTH = (int) $_REQUEST['w']; - $HEIGHT = (int) $_REQUEST['h']; - $REV = (int) @$_REQUEST['rev']; + $CACHE = calc_cache($INPUT->str('cache')); + $WIDTH = $INPUT->int('w'); + $HEIGHT = $INPUT->int('h'); + $REV = &$INPUT->ref('rev'); //sanitize revision $REV = preg_replace('/[^0-9]/','',$REV); diff --git a/lib/exe/indexer.php b/lib/exe/indexer.php index 738a29503..e149770c0 100644 --- a/lib/exe/indexer.php +++ b/lib/exe/indexer.php @@ -20,10 +20,10 @@ if(!$defer){ sendGIF(); // send gif } -$ID = cleanID($_REQUEST['id']); +$ID = cleanID($INPUT->str('id')); // Catch any possible output (e.g. errors) -$output = isset($_REQUEST['debug']) && $conf['allowdebug']; +$output = $INPUT->has('debug') && $conf['allowdebug']; if(!$output) ob_start(); // run one of the jobs @@ -261,7 +261,8 @@ function sendDigest() { * @author Harry Fuecks <fuecks@gmail.com> */ function sendGIF(){ - if(isset($_REQUEST['debug'])){ + global $INPUT; + if($INPUT->has('debug')){ header('Content-Type: text/plain'); return; } |