Skip to content
Snippets Groups Projects
Commit f4121339 authored by Robin Appelman's avatar Robin Appelman
Browse files

Fix expiring of public links

parent 6935f036
No related branches found
No related tags found
No related merge requests found
......@@ -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=?");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment