Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
This commit is contained in:
commit
00547ca898
|
@ -251,6 +251,8 @@ class File extends Memcached_DataObject
|
||||||
if($oembed->modified) $enclosure->modified=$oembed->modified;
|
if($oembed->modified) $enclosure->modified=$oembed->modified;
|
||||||
unset($oembed->size);
|
unset($oembed->size);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -288,11 +288,12 @@ class ApiAction extends Action
|
||||||
$twitter_status['attachments'] = array();
|
$twitter_status['attachments'] = array();
|
||||||
|
|
||||||
foreach ($attachments as $attachment) {
|
foreach ($attachments as $attachment) {
|
||||||
if ($attachment->isEnclosure()) {
|
$enclosure_o=$attachment->getEnclosure();
|
||||||
|
if ($enclosure_o) {
|
||||||
$enclosure = array();
|
$enclosure = array();
|
||||||
$enclosure['url'] = $attachment->url;
|
$enclosure['url'] = $enclosure_o->url;
|
||||||
$enclosure['mimetype'] = $attachment->mimetype;
|
$enclosure['mimetype'] = $enclosure_o->mimetype;
|
||||||
$enclosure['size'] = $attachment->size;
|
$enclosure['size'] = $enclosure_o->size;
|
||||||
$twitter_status['attachments'][] = $enclosure;
|
$twitter_status['attachments'][] = $enclosure;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class UnQueueManager extends QueueManager
|
||||||
|
|
||||||
$handler = $this->getHandler($queue);
|
$handler = $this->getHandler($queue);
|
||||||
if ($handler) {
|
if ($handler) {
|
||||||
$handler->handle_notice($notice);
|
$handler->handle($notice);
|
||||||
} else {
|
} else {
|
||||||
if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) {
|
if (Event::handle('UnqueueHandleNotice', array(&$notice, $queue))) {
|
||||||
throw new ServerException("UnQueueManager: Unknown queue: $queue");
|
throw new ServerException("UnQueueManager: Unknown queue: $queue");
|
||||||
|
|
15
lib/util.php
15
lib/util.php
|
@ -596,20 +596,13 @@ function common_linkify($url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($f)) {
|
if (!empty($f)) {
|
||||||
if ($f->isEnclosure()) {
|
if ($f->getEnclosure()) {
|
||||||
$is_attachment = true;
|
$is_attachment = true;
|
||||||
$attachment_id = $f->id;
|
$attachment_id = $f->id;
|
||||||
} else {
|
|
||||||
$foe = File_oembed::staticGet('file_id', $f->id);
|
|
||||||
if (!empty($foe)) {
|
|
||||||
// if it has OEmbed info, it's an attachment, too
|
|
||||||
$is_attachment = true;
|
|
||||||
$attachment_id = $f->id;
|
|
||||||
|
|
||||||
$thumb = File_thumbnail::staticGet('file_id', $f->id);
|
$thumb = File_thumbnail::staticGet('file_id', $f->id);
|
||||||
if (!empty($thumb)) {
|
if (!empty($thumb)) {
|
||||||
$has_thumb = true;
|
$has_thumb = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user