2011-07-22 08:21:53 +04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Init owncloud
|
|
|
|
require_once('../../lib/base.php');
|
|
|
|
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::checkLoggedIn();
|
2011-07-22 08:21:53 +04:00
|
|
|
|
|
|
|
// Get data
|
|
|
|
$dir = $_GET["dir"];
|
|
|
|
$file = $_GET["file"];
|
|
|
|
$target = $_GET["target"];
|
|
|
|
|
|
|
|
|
2011-07-29 23:36:03 +04:00
|
|
|
if(OC_Files::move($dir,$file,$target,$file)){
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
|
2011-07-22 08:21:53 +04:00
|
|
|
}else{
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::error(array("data" => array( "message" => "Could move $file" )));
|
2011-07-22 08:21:53 +04:00
|
|
|
}
|
|
|
|
|
2011-09-24 00:22:59 +04:00
|
|
|
?>
|