summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-16 21:32:51 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-16 21:32:51 -0400
commitb7b3a4920341f00e2f544ca7f883a93dab019756 (patch)
treeedc46c1f2baee65e7749587798ffcac6d102d7a3 /apps/files_sharing/ajax
parent0edce1796b1607dd349f7b1b70fa56aa2e792266 (diff)
downloadnextcloud-server-b7b3a4920341f00e2f544ca7f883a93dab019756.tar.gz
nextcloud-server-b7b3a4920341f00e2f544ca7f883a93dab019756.zip
Functions to get the token of a public link now stored by OC_Share, remove no longer needed ajax call to getlink.php
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r--apps/files_sharing/ajax/share.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/ajax/share.php b/apps/files_sharing/ajax/share.php
index f0166f391db..d9bf4ff7abe 100644
--- a/apps/files_sharing/ajax/share.php
+++ b/apps/files_sharing/ajax/share.php
@@ -11,7 +11,10 @@ foreach ($sources as $source) {
if ($source && OC_FILESYSTEM::file_exists($source) && OC_FILESYSTEM::is_readable($source)) {
$source = "/".OC_User::getUser()."/files".$source;
try {
- new OC_Share($source, $uid_shared_with, $permissions);
+ $shared = new OC_Share($source, $uid_shared_with, $permissions);
+ if ($uid_shared_with == OC_Share::PUBLICLINK) {
+ echo $shared->getToken();
+ }
} catch (Exception $exception) {
echo "false";
}