summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
authorKate Arzamastseva <pshns@ukr.net>2011-08-08 19:37:09 +0300
committerKate Arzamastseva <pshns@ukr.net>2011-08-08 19:37:09 +0300
commit6bdff0836f4bc1eee19aa8c30d03ba4bfc876733 (patch)
treed3240721d1a55cc0fe5453d266500ce3d88459cb /lib/exe/ajax.php
parentf517998ad64483b6394211a971db2d3a660518c6 (diff)
downloadrpg-6bdff0836f4bc1eee19aa8c30d03ba4bfc876733.tar.gz
rpg-6bdff0836f4bc1eee19aa8c30d03ba4bfc876733.tar.bz2
issue #44 overwrite checkbox added to uploader
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 391e951e5..7a4cea360 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -245,7 +245,7 @@ function ajax_mediadiff(){
if ($_REQUEST['image']) $image = cleanID($_REQUEST['image']);
$NS = $_POST['ns'];
$auth = auth_quickaclcheck("$ns:*");
- media_diff($image, $NS, $auth);
+ media_diff($image, $NS, $auth, true);
}
function ajax_mediaupload(){
@@ -259,7 +259,8 @@ function ajax_mediaupload(){
}
if($_FILES['qqfile']['tmp_name']){
- $id = $_FILES['qqfile']['name'];
+ $id = $_REQUEST['file_name'];
+ if (!$id) $id = $_FILES['qqfile']['name'];
$file = $_FILES['qqfile']['tmp_name'];
list($ext,$mime,$dl) = mimetype($id);
@@ -268,7 +269,7 @@ function ajax_mediaupload(){
'mime' => $mime,
'ext' => $ext),
$NS.':'.$id,
- false,
+ $_REQUEST['ow'],
$AUTH,
'move_uploaded_file'
);
@@ -296,7 +297,7 @@ function ajax_mediaupload(){
'mime' => $mime,
'ext' => $ext),
$NS.':'.$id,
- false,
+ (($_REQUEST['ow'] == 'true') ? true : false),
$AUTH,
'copy'
);