aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-11-07 05:15:39 -0800
committerfriendica <info@friendica.com>2014-11-07 05:15:39 -0800
commit1cc1bc8e811ccee8dedd340dcaa156c7c1a3fed1 (patch)
tree0b851496b4a73abafe69edac4dd1bb51811914ec /mod/photos.php
parent26343b8856d6145b6c1fd62ff648e34b376eddc5 (diff)
downloadvolse-hubzilla-1cc1bc8e811ccee8dedd340dcaa156c7c1a3fed1.tar.gz
volse-hubzilla-1cc1bc8e811ccee8dedd340dcaa156c7c1a3fed1.tar.bz2
volse-hubzilla-1cc1bc8e811ccee8dedd340dcaa156c7c1a3fed1.zip
fix broken photo edits when adult flag is changed
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 0a3d6c704..9d8e68134 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -274,11 +274,9 @@ function photos_post(&$a) {
}
}
- $p = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `uid` = %d and ((photo_flags = %d) or (photo_flags & %d )) ORDER BY `scale` DESC",
+ $p = q("SELECT * FROM `photo` WHERE `resource_id` = '%s' AND `uid` = %d ORDER BY `scale` DESC",
dbesc($resource_id),
- intval($page_owner_uid),
- intval(PHOTO_NORMAL),
- intval(PHOTO_PROFILE)
+ intval($page_owner_uid)
);
if($p) {
$ext = $phototypes[$p[0]['type']];
@@ -322,10 +320,11 @@ function photos_post(&$a) {
intval($item_id),
intval($page_owner_uid)
);
- }
- if($r) {
- $old_tag = $r[0]['tag'];
- $old_inform = $r[0]['inform'];
+
+ if($r) {
+ $old_tag = $r[0]['tag'];
+ $old_inform = $r[0]['inform'];
+ }
}