aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-18 20:55:25 -0700
committerfriendica <info@friendica.com>2013-07-18 20:55:25 -0700
commit247d132e17a86ae4fe5c10eda23cfd9d7c64dd9e (patch)
tree779a3c35841713999786afd0ce1c4366f56ba48b /include
parent4aff3d4217f72fe8e0903897951d3fd08637eb04 (diff)
downloadvolse-hubzilla-247d132e17a86ae4fe5c10eda23cfd9d7c64dd9e.tar.gz
volse-hubzilla-247d132e17a86ae4fe5c10eda23cfd9d7c64dd9e.tar.bz2
volse-hubzilla-247d132e17a86ae4fe5c10eda23cfd9d7c64dd9e.zip
start using profile_flags in photo queries so we can start creating PHOTO_THING's
Diffstat (limited to 'include')
-rw-r--r--include/photos.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/photos.php b/include/photos.php
index 5568a4257..8902761c4 100644
--- a/include/photos.php
+++ b/include/photos.php
@@ -244,8 +244,11 @@ function photos_albums_list($channel,$observer) {
$sql_extra = permissions_sql($channel_id);
- $albums = q("SELECT distinct album from photo where uid = %d $sql_extra order by created desc",
- intval($channel_id)
+ $albums = q("SELECT distinct album from photo where uid = %d and ( photo_flags = %d or photo_flags = %d ) $sql_extra order by created desc",
+ intval($channel_id),
+ intval(PHOTO_NORMAL),
+ intval(PHOTO_PROFILE)
+
);
// add various encodings to the array so we can just loop through and pick them out in a template
@@ -299,8 +302,10 @@ function photos_list_photos($channel,$observer,$album = '') {
$ret = array('success' => false);
- $r = q("select resource_id, created, edited, title, `desc`, album, filename, `type`, height, width, `size`, `scale`, profile, allow_cid, allow_gid, deny_cid, deny_gid from photo where uid = %d $sql_extra ",
- intval($channel_id)
+ $r = q("select resource_id, created, edited, title, `desc`, album, filename, `type`, height, width, `size`, `scale`, profile, allow_cid, allow_gid, deny_cid, deny_gid from photo where uid = %d and ( photo_flags = %d or photo_flags = %d ) $sql_extra ",
+ intval($channel_id),
+ intval(PHOTO_NORMAL),
+ intval(PHOTO_PROFILE)
);
if($r) {