diff options
Diffstat (limited to 'apps/files_publiclink/lib_public.php')
-rw-r--r-- | apps/files_publiclink/lib_public.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_publiclink/lib_public.php b/apps/files_publiclink/lib_public.php index b4bc86505ae..ff1df130834 100644 --- a/apps/files_publiclink/lib_public.php +++ b/apps/files_publiclink/lib_public.php @@ -6,8 +6,8 @@ class OC_PublicLink{ * @param int (optional) expiretime time the link expires, as timestamp */ public function __construct($path,$expiretime=0){ - if($path and OC_FILESYSTEM::file_exists($path) and OC_FILESYSTEM::is_readable($path)){ - $user=OC_USER::getUser(); + if($path and OC_Filesystem::file_exists($path) and OC_Filesystem::is_readable($path)){ + $user=OC_User::getUser(); $token=sha1("$user-$path-$expiretime"); $query=OC_DB::prepare("INSERT INTO *PREFIX*publiclink VALUES(?,?,?,?)"); $result=$query->execute(array($token,$path,$user,$expiretime)); @@ -38,7 +38,7 @@ class OC_PublicLink{ $user=$data[0]['user']; //prepare the filesystem - OC_UTIL::setupFS($user); + OC_Util::setupFS($user); return $path; }else{ @@ -60,7 +60,7 @@ class OC_PublicLink{ */ static public function getLinks(){ $query=OC_DB::prepare("SELECT * FROM *PREFIX*publiclink WHERE user=?"); - return $query->execute(array(OC_USER::getUser()))->fetchAll(); + return $query->execute(array(OC_User::getUser()))->fetchAll(); } /** @@ -69,7 +69,7 @@ class OC_PublicLink{ static public function delete($token){ $query=OC_DB::prepare("SELECT user,path FROM *PREFIX*publiclink WHERE token=?"); $result=$query->execute(array($token))->fetchAll(); - if(count($result)>0 and $result[0]['user']==OC_USER::getUser()){ + if(count($result)>0 and $result[0]['user']==OC_User::getUser()){ $query=OC_DB::prepare("DELETE FROM *PREFIX*publiclink WHERE token=?"); $query->execute(array($token)); } |