From 177c33be10a2cfb7deb23daa9aeece2eab3d4400 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 23 Jun 2014 16:05:00 -0700 Subject: block edit/delete ability for everybody but the owner --- include/reddav.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'include/reddav.php') diff --git a/include/reddav.php b/include/reddav.php index 141c73ffe..852a18869 100644 --- a/include/reddav.php +++ b/include/reddav.php @@ -880,6 +880,8 @@ class RedBrowser extends DAV\Browser\Plugin { public function generateDirectoryIndex($path) { + $is_owner = ((local_user() && $this->auth->owner_id == local_user()) ? true : false); + if($this->auth->timezone) date_default_timezone_set($this->auth->timezone); @@ -887,7 +889,7 @@ class RedBrowser extends DAV\Browser\Plugin { require_once('include/conversation.php'); if($this->auth->channel_name) - $html = profile_tabs(get_app(),(($this->auth->owner_id == local_user()) ? true : false),$this->auth->owner_nick); + $html = profile_tabs(get_app(),(($is_owner) ? true : false),$this->auth->owner_nick); $html .= " @@ -1027,14 +1029,21 @@ class RedBrowser extends DAV\Browser\Plugin { } $attachId = $this->findAttachIdByHash($attachHash); $fileStorageUrl = str_replace("cloud/","filestorage/",$path); - $attachIcon = ""; + $attachIcon = ""; // ""; $html.= " $icon - {$displayName} - " . (($size) ? $attachIcon : '') . " - - - {$type} + {$displayName}"; + + if($is_owner) { + $html .= "" . (($size) ? $attachIcon : '') . " + + "; + } + else { + $html .= ""; + } + $html .= + "{$type} ". $size ." " . (($lastmodified) ? datetime_convert('UTC', date_default_timezone_get(),$lastmodified) : '') . " "; -- cgit v1.2.3