aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorHabeas Codice <habeascodice@federated.social>2014-11-19 21:11:11 -0800
committerHabeas Codice <habeascodice@federated.social>2014-11-19 21:11:11 -0800
commitc8af19c69c03b39d5eded833a2d9d8ed9ab5826c (patch)
tree16ded6330f1baa9d8e889978c9e093f1e90d7d85 /mod/photos.php
parent92d0a9404ff92da23b558f9a73a3150f97b6a08e (diff)
parent18cae8a78cb3df8ffcd9e4787c3b572c799036da (diff)
downloadvolse-hubzilla-c8af19c69c03b39d5eded833a2d9d8ed9ab5826c.tar.gz
volse-hubzilla-c8af19c69c03b39d5eded833a2d9d8ed9ab5826c.tar.bz2
volse-hubzilla-c8af19c69c03b39d5eded833a2d9d8ed9ab5826c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/mod/photos.php b/mod/photos.php
index ab848c709..7a9229cc4 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -952,6 +952,7 @@ function photos_content(&$a) {
'lockstate' => $lockstate[0],
'help_tags' => t('Example: @bob, @Barbara_Jensen, @jim@example.com'),
'item_id' => ((count($linked_items)) ? $link_item['id'] : 0),
+ 'adult_enabled' => feature_enabled($owner_uid,'adult_photo_flagging'),
'adult' => array('adult',t('Flag as adult in album view'), (($ph[0]['photo_flags'] & PHOTO_ADULT) ? 1 : 0),''),
'submit' => t('Submit'),
'delete' => t('Delete Photo')
@@ -1175,7 +1176,7 @@ function photos_content(&$a) {
$r = q("SELECT p.resource_id, p.id, p.filename, p.type, p.album, p.scale, p.created FROM photo p INNER JOIN
(SELECT resource_id, max(scale) scale FROM photo
WHERE uid=%d AND album != '%s' AND album != '%s'
- AND (photo_flags = %d or photo_flags = %d ) $sql_extra group by resource_id) ph
+ AND (photo_flags = %d or ( photo_flags & %d ) > 0 ) $sql_extra group by resource_id) ph
ON (p.resource_id = ph.resource_id and p.scale = ph.scale) ORDER by p.created DESC LIMIT %d OFFSET %d",
intval($a->data['channel']['channel_id']),
dbesc('Contact Photos'),