diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-06-02 02:45:35 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-06-02 02:46:50 +0200 |
commit | 8c5a06028aa4bf7a29d79d63a713361ce2f50633 (patch) | |
tree | 3b94337d8bbbef5844dfe08d4478b34938655221 /apps/files_publiclink/ajax | |
parent | 6c6871336d6570b02b030d521d18eb4d28f2a83f (diff) | |
download | nextcloud-server-8c5a06028aa4bf7a29d79d63a713361ce2f50633.tar.gz nextcloud-server-8c5a06028aa4bf7a29d79d63a713361ce2f50633.zip |
port sharing by publiclink fully to the 2.0 codebase and provide a simple gui for it
Diffstat (limited to 'apps/files_publiclink/ajax')
-rw-r--r-- | apps/files_publiclink/ajax/deletelink.php | 11 | ||||
-rw-r--r-- | apps/files_publiclink/ajax/makelink.php | 19 |
2 files changed, 30 insertions, 0 deletions
diff --git a/apps/files_publiclink/ajax/deletelink.php b/apps/files_publiclink/ajax/deletelink.php new file mode 100644 index 00000000000..e2e4ff944a6 --- /dev/null +++ b/apps/files_publiclink/ajax/deletelink.php @@ -0,0 +1,11 @@ +<?php +$RUNTIME_NOAPPS=true; //no need to load the apps + +require_once '../../../lib/base.php'; + +require_once '../lib_public.php'; + +$token=$_GET['token']; + +OC_PublicLink::delete($token); +?>
\ No newline at end of file diff --git a/apps/files_publiclink/ajax/makelink.php b/apps/files_publiclink/ajax/makelink.php new file mode 100644 index 00000000000..5abd1e829c5 --- /dev/null +++ b/apps/files_publiclink/ajax/makelink.php @@ -0,0 +1,19 @@ +<?php +$RUNTIME_NOAPPS=true; //no need to load the apps + +require_once '../../../lib/base.php'; + +require_once '../lib_public.php'; + +$path=$_GET['path']; +$expire=(isset($_GET['expire']))?$_GET['expire']:0; +if($expire!==0){ + + $expire=strtotime($expire); +} +// echo $expire; +// die(); + +$link=new OC_PublicLink($path,$expire); +echo $link->getToken(); +?>
\ No newline at end of file |