aboutsummaryrefslogtreecommitdiffstats
path: root/mod/photos.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-02 17:51:34 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-02 17:51:34 +0100
commit36ac48779c85ae324d2d702714677e360af5930d (patch)
treef6e78cb3cefe3abf5dcac291938005d75ecb0bff /mod/photos.php
parent0cd82ec680e6a5a352781861a63685038fea723a (diff)
parent88669fa033d5b43d4cdad7b95c9af05bf9467d3b (diff)
downloadvolse-hubzilla-36ac48779c85ae324d2d702714677e360af5930d.tar.gz
volse-hubzilla-36ac48779c85ae324d2d702714677e360af5930d.tar.bz2
volse-hubzilla-36ac48779c85ae324d2d702714677e360af5930d.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/photos.php')
-rw-r--r--mod/photos.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index f1b7aceed..d6105c580 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -660,6 +660,10 @@ function photos_content(&$a) {
$album = (($datum) ? hex2bin($datum) : '');
+
+ $a->page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . $a->cmd) . '" title="oembed" />' . "\r\n";
+
+
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` = '%s'
AND `scale` <= 4 and photo_usage IN ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
intval($owner_uid),
@@ -804,6 +808,8 @@ function photos_content(&$a) {
if($datatype === 'image') {
+ $a->page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . $a->cmd) . '" title="oembed" />' . "\r\n";
+
// fetch image, item containing image, then comments
$ph = q("SELECT id,aid,uid,xchan,resource_id,created,edited,title,`description`,album,filename,`type`,height,width,`size`,scale,photo_usage,is_nsfw,allow_cid,allow_gid,deny_cid,deny_gid FROM `photo` WHERE `uid` = %d AND `resource_id` = '%s'
@@ -1226,6 +1232,9 @@ function photos_content(&$a) {
// Default - show recent photos with upload link (if applicable)
//$o = '';
+ $a->page['htmlhead'] .= "\r\n" . '<link rel="alternate" type="application/json+oembed" href="' . z_root() . '/oep?f=&url=' . urlencode(z_root() . '/' . $a->cmd) . '" title="oembed" />' . "\r\n";
+
+
$r = q("SELECT `resource_id`, max(`scale`) AS `scale` FROM `photo` WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s'
and photo_usage in ( %d, %d ) and is_nsfw = %d $sql_extra GROUP BY `resource_id`",
intval($a->data['channel']['channel_id']),