2011-07-22 00:21:53 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
// Init owncloud
|
|
|
|
|
require_once('../../lib/base.php');
|
|
|
|
|
|
2011-09-23 16:22:59 -04:00
|
|
|
OC_JSON::checkLoggedIn();
|
2011-07-22 00:21:53 -04:00
|
|
|
|
|
|
|
|
// Get data
|
2012-01-15 14:48:38 -05:00
|
|
|
$dir = stripslashes($_GET["dir"]);
|
|
|
|
|
$file = stripslashes($_GET["file"]);
|
|
|
|
|
$target = stripslashes($_GET["target"]);
|
2011-07-22 00:21:53 -04:00
|
|
|
|
|
|
|
|
|
2011-07-29 15:36:03 -04:00
|
|
|
if(OC_Files::move($dir,$file,$target,$file)){
|
2011-09-23 16:22:59 -04:00
|
|
|
OC_JSON::success(array("data" => array( "dir" => $dir, "files" => $file )));
|
2011-07-22 00:21:53 -04:00
|
|
|
}else{
|
2012-01-01 18:45:26 -05:00
|
|
|
OC_JSON::error(array("data" => array( "message" => "Could not move $file" )));
|
2011-07-22 00:21:53 -04:00
|
|
|
}
|
|
|
|
|
|
2011-09-23 16:22:59 -04:00
|
|
|
?>
|