aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-30 21:54:17 +0000
committerMario <mario@mariovavti.com>2018-12-02 10:17:29 +0100
commit4bf3d4d87ac23af339f6418055211037b020cf1d (patch)
treec3bb686b0e412d4008043618c11b864a167a1c2e
parent71cc980e96e7408c8f415d5c752f9f93c5c1ed45 (diff)
downloadvolse-hubzilla-4bf3d4d87ac23af339f6418055211037b020cf1d.tar.gz
volse-hubzilla-4bf3d4d87ac23af339f6418055211037b020cf1d.tar.bz2
volse-hubzilla-4bf3d4d87ac23af339f6418055211037b020cf1d.zip
attached photo permissions regression
(cherry picked from commit 6cade7d935a489349c56165139796bd2f9cf9be6)
-rwxr-xr-xinclude/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index c1613ea8c..72bb1dca4 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4610,10 +4610,10 @@ function fix_attached_photo_permissions($uid,$xchan_hash,$body,
if(! stristr($image,z_root() . '/photo/'))
continue;
$image_uri = substr($image,strrpos($image,'/') + 1);
- if(strpos($image_uri,'-') !== false)
- $image_uri = substr($image_uri,0, strpos($image_uri,'-'));
- if(strpos($image_uri,'.') !== false)
- $image_uri = substr($image_uri,0, strpos($image_uri,'.'));
+ if(strrpos($image_uri,'-') !== false)
+ $image_uri = substr($image_uri,0, strrpos($image_uri,'-'));
+ if(strrpos($image_uri,'.') !== false)
+ $image_uri = substr($image_uri,0, strrpos($image_uri,'.'));
if(! strlen($image_uri))
continue;
$srch = '<' . $xchan_hash . '>';