aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-30 13:54:17 -0800
committerzotlabs <mike@macgirvin.com>2018-11-30 13:54:17 -0800
commit6cade7d935a489349c56165139796bd2f9cf9be6 (patch)
tree8dc4b13ac3bb6f3ca9a151bddafb8cd1357ff190 /include
parent19e4f3c2f082278e524c463cce7ce0858a2258f8 (diff)
downloadvolse-hubzilla-6cade7d935a489349c56165139796bd2f9cf9be6.tar.gz
volse-hubzilla-6cade7d935a489349c56165139796bd2f9cf9be6.tar.bz2
volse-hubzilla-6cade7d935a489349c56165139796bd2f9cf9be6.zip
attached photo permissions regression
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/items.php b/include/items.php
index 4ccc3e01c..8eaeb61b7 100755
--- a/include/items.php
+++ b/include/items.php
@@ -4631,10 +4631,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 . '>';