summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-08-24 09:43:50 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-08-24 09:43:50 +0200
commit64273335d1bae12b2fe7d9664e1665d6e69d47af (patch)
treeeb6877ac97ab240f61aaa30679d49ca7aab97b42 /lib/exe/ajax.php
parentc51e95703cc34aca498b87ae89f78034a7cb8a54 (diff)
downloadrpg-64273335d1bae12b2fe7d9664e1665d6e69d47af.tar.gz
rpg-64273335d1bae12b2fe7d9664e1665d6e69d47af.tar.bz2
more $INPUT use FS#2577
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php24
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 945091f34..496b2f1a1 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -162,7 +162,8 @@ function ajax_lock(){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function ajax_draftdel(){
- $id = cleanID($_REQUEST['id']);
+ global $INPUT;
+ $id = cleanID($INPUT->str('id'));
if(empty($id)) return;
$client = $_SERVER['REMOTE_USER'];
@@ -218,11 +219,11 @@ function ajax_medialist(){
* @author Kate Arzamastseva <pshns@ukr.net>
*/
function ajax_mediadetails(){
- global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf;
+ global $DEL, $NS, $IMG, $AUTH, $JUMPTO, $REV, $lang, $fullscreen, $conf, $INPUT;
$fullscreen = true;
require_once(DOKU_INC.'lib/exe/mediamanager.php');
- if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
+ if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
if (isset($IMG)) $image = $IMG;
if (isset($JUMPTO)) $image = $JUMPTO;
if (isset($REV) && !$JUMPTO) $rev = $REV;
@@ -237,25 +238,26 @@ function ajax_mediadetails(){
*/
function ajax_mediadiff(){
global $NS;
+ global $INPUT;
- if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
+ if ($INPUT->has('image')) $image = cleanID($INPUT->str('image'));
$NS = $_POST['ns'];
- $auth = auth_quickaclcheck("$ns:*");
+ $auth = auth_quickaclcheck("$NS:*");
media_diff($image, $NS, $auth, true);
}
function ajax_mediaupload(){
- global $NS, $MSG;
+ global $NS, $MSG, $INPUT;
if ($_FILES['qqfile']['tmp_name']) {
- $id = ((empty($_POST['mediaid'])) ? $_FILES['qqfile']['name'] : $_POST['mediaid']);
- } elseif (isset($_GET['qqfile'])) {
- $id = $_GET['qqfile'];
+ $id = $INPUT->post->str('mediaid', $_FILES['qqfile']['name']);
+ } elseif ($INPUT->get->has('qqfile')) {
+ $id = $INPUT->get->str('qqfile');
}
$id = cleanID($id);
- $NS = $_REQUEST['ns'];
+ $NS = $INPUT->str('ns');
$ns = $NS.':'.getNS($id);
$AUTH = auth_quickaclcheck("$ns:*");
@@ -264,7 +266,7 @@ function ajax_mediaupload(){
if ($_FILES['qqfile']['error']) unset($_FILES['qqfile']);
if ($_FILES['qqfile']['tmp_name']) $res = media_upload($NS, $AUTH, $_FILES['qqfile']);
- if (isset($_GET['qqfile'])) $res = media_upload_xhr($NS, $AUTH);
+ if ($INPUT->get->has('qqfile')) $res = media_upload_xhr($NS, $AUTH);
if ($res) $result = array('success' => true,
'link' => media_managerURL(array('ns' => $ns, 'image' => $NS.':'.$id), '&'),