diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-05 14:56:52 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2012-05-05 15:18:14 -0400 |
commit | ef9511c713980faecc65b898b15a50163218cbaa (patch) | |
tree | 8fa487718506015d392bef810cb432d384edab65 /apps/files_sharing/ajax/setpermissions.php | |
parent | d764585d8be605067731effb7a114e9349d87598 (diff) | |
download | nextcloud-server-ef9511c713980faecc65b898b15a50163218cbaa.tar.gz nextcloud-server-ef9511c713980faecc65b898b15a50163218cbaa.zip |
Refactor sharing UI; bug fixes, code clean-up, and more efficient with less ajax calls
Diffstat (limited to 'apps/files_sharing/ajax/setpermissions.php')
-rwxr-xr-x | apps/files_sharing/ajax/setpermissions.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/files_sharing/ajax/setpermissions.php b/apps/files_sharing/ajax/setpermissions.php index 73f59d73db2..2f4c5da9788 100755 --- a/apps/files_sharing/ajax/setpermissions.php +++ b/apps/files_sharing/ajax/setpermissions.php @@ -1,13 +1,14 @@ <?php -//$RUNTIME_NOAPPS = true; +require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php'); - OCP\JSON::checkAppEnabled('files_sharing'); -require_once(OC::$APPSROOT . '/apps/files_sharing/lib_share.php'); +OCP\JSON::checkLoggedIn(); -$source = "/".OCP\USER::getUser()."/files".$_GET['source']; -$uid_shared_with = $_GET['uid_shared_with']; -$permissions = $_GET['permissions']; +$source = '/'.OCP\USER::getUser().'/files'.$_POST['source']; +$uid_shared_with = $_POST['uid_shared_with']; +$permissions = $_POST['permissions']; OC_Share::setPermissions($source, $uid_shared_with, $permissions); +OCP\JSON::success(); + ?> |