summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-11-15 11:57:31 -0500
committerEvan Prodromou <evan@status.net>2010-11-15 11:57:31 -0500
commit8a21b13ee93cf46626ba9e99a4fda44587e6d1a1 (patch)
treed48111cc0c91060f237ecc268a5ee2b0c69ce029 /actions
parentc1cee3b27ffa1529009195604c5495bef4f83bc2 (diff)
parent4f323efdf7abc5452152a87241e320aca20ce486 (diff)
Merge remote branch 'gitorious/0.9.x' into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/oembed.php6
-rw-r--r--actions/shownotice.php14
2 files changed, 15 insertions, 5 deletions
diff --git a/actions/oembed.php b/actions/oembed.php
index da3aa0c71..11d814583 100644
--- a/actions/oembed.php
+++ b/actions/oembed.php
@@ -112,6 +112,12 @@ class OembedAction extends Action
//$oembed['width']=
//$oembed['height']=
$oembed['url']=$attachment->url;
+ $thumb = $attachment->getThumbnail();
+ if ($thumb) {
+ $oembed['thumbnail_url'] = $thumb->url;
+ $oembed['thumbnail_width'] = $thumb->width;
+ $oembed['thumbnail_height'] = $thumb->height;
+ }
}else{
$oembed['type']='link';
$oembed['url']=common_local_url('attachment',
diff --git a/actions/shownotice.php b/actions/shownotice.php
index b7e61a137..b4af7dbaa 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -332,6 +332,15 @@ class SingleNoticeItem extends DoFollowListItem
}
/**
+ * For our zoomed-in special case we'll use a fuller list
+ * for the attachment info.
+ */
+ function showNoticeAttachments() {
+ $al = new AttachmentList($this->notice, $this->out);
+ $al->show();
+ }
+
+ /**
* show the avatar of the notice's author
*
* We use the larger size for single notice page.
@@ -356,9 +365,4 @@ class SingleNoticeItem extends DoFollowListItem
$this->profile->fullname :
$this->profile->nickname));
}
-
- function showNoticeAttachments() {
- $al = new AttachmentList($this->notice, $this->out);
- $al->show();
- }
}