* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
* @link http://status.net/
*/
-
class ActivityObject
{
const ARTICLE = 'http://activitystrea.ms/schema/1.0/article';
*
* @param DOMElement $element DOM thing to turn into an Activity thing
*/
-
function __construct($element = null)
{
if (empty($element)) {
$title = ActivityUtils::childHtmlContent($element, self::TITLE);
- $this->title = html_entity_decode(strip_tags($title));
+ $this->title = html_entity_decode(strip_tags($title), ENT_QUOTES, 'UTF-8');
$this->source = $this->_getSource($element);
}
}
- // @fixme rationalize with Activity::_fromRssItem()
-
+ // @todo FIXME: rationalize with Activity::_fromRssItem()
private function _fromRssItem($item)
{
$this->title = ActivityUtils::childContent($item, ActivityObject::TITLE, Activity::RSS);
$alink->height = $size;
$alink->width = $size;
$alink->url = Avatar::defaultImage($size);
+
+ if ($size == AVATAR_PROFILE_SIZE) {
+ // Hack for Twitter import: we don't have a 96x96 image,
+ // but we do have a 73x73 image. For now, fake it with that.
+ $avatar = $profile->getAvatar(73);
+ if ($avatar) {
+ $alink = AvatarLink::fromAvatar($avatar);
+ $alink->height= $size;
+ $alink->width = $size;
+ }
+ }
}
$object->avatarLinks[] = $alink;