diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-07-17 15:44:02 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-07-17 17:41:46 +0200 |
commit | f4121339afc887190291a14360ecb6765106efec (patch) | |
tree | 42616a8d17d1483a65c3c6303022d9c1566288d4 /apps/files_publiclink | |
parent | 6935f036a5faa75383c18b21a1f7710b6d20c38c (diff) | |
download | nextcloud-server-f4121339afc887190291a14360ecb6765106efec.tar.gz nextcloud-server-f4121339afc887190291a14360ecb6765106efec.zip |
Fix expiring of public links
Diffstat (limited to 'apps/files_publiclink')
-rw-r--r-- | apps/files_publiclink/lib_public.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_publiclink/lib_public.php b/apps/files_publiclink/lib_public.php index 93ccc52d0e9..b4bc86505ae 100644 --- a/apps/files_publiclink/lib_public.php +++ b/apps/files_publiclink/lib_public.php @@ -26,8 +26,8 @@ class OC_PublicLink{ */ public static function getPath($token){ //remove expired links - $query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE expire_time < NOW() AND expire_time!=0"); - $query->execute(); + $query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE expire_time < ? AND expire_time!=0"); + $query->execute(array(time())); //get the path and the user $query=OC_DB::prepare("SELECT user,path FROM *PREFIX*publiclink WHERE token=?"); |