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

// Init owncloud
require_once('../../lib/base.php');

OC_JSON::checkLoggedIn();

// Get data
$dir = $_GET["dir"];
$file = $_GET["file"];
$target = $_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 move $file" )));
}

?>