aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_publiclink/ajax
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-06-02 02:45:35 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-06-02 02:46:50 +0200
commit8c5a06028aa4bf7a29d79d63a713361ce2f50633 (patch)
tree3b94337d8bbbef5844dfe08d4478b34938655221 /apps/files_publiclink/ajax
parent6c6871336d6570b02b030d521d18eb4d28f2a83f (diff)
downloadnextcloud-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.php11
-rw-r--r--apps/files_publiclink/ajax/makelink.php19
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