summaryrefslogtreecommitdiffstats
path: root/apps/files/ajax/move.php
blob: 0ad314f873c26b20606bdadd26461b0a9a74d17d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

// Init owncloud


OC_JSON::checkLoggedIn();

// Get data
$dir = stripslashes($_GET["dir"]);
$file = stripslashes($_GET["file"]);
$target = stripslashes($_GET["target"]);


if(OC_Files::move($dir,$file,$target,$file)){
	OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
}else{
	OC_JSON::error(array("data" => array( "message" => "Could not move $file" )));
}

?>