From 7175e7c7a10222cef0bbf69c06c70464b757e00b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 2 Mar 2010 15:38:52 -0800 Subject: OStatus fix: look for s in the current element's children, not in all its descendants. Was breaking notice URL transfer, pulling a profile link by mistake. --- lib/activity.php | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/activity.php b/lib/activity.php index b20153213..7926d0569 100644 --- a/lib/activity.php +++ b/lib/activity.php @@ -344,16 +344,18 @@ class ActivityUtils static function getLink(DOMNode $element, $rel, $type=null) { - $links = $element->getElementsByTagnameNS(self::ATOM, self::LINK); + $els = $element->childNodes; - foreach ($links as $link) { + foreach ($els as $link) { + if ($link->localName == self::LINK && $link->namespaceURI == self::ATOM) { - $linkRel = $link->getAttribute(self::REL); - $linkType = $link->getAttribute(self::TYPE); + $linkRel = $link->getAttribute(self::REL); + $linkType = $link->getAttribute(self::TYPE); - if ($linkRel == $rel && - (is_null($type) || $linkType == $type)) { - return $link->getAttribute(self::HREF); + if ($linkRel == $rel && + (is_null($type) || $linkType == $type)) { + return $link->getAttribute(self::HREF); + } } } @@ -362,17 +364,19 @@ class ActivityUtils static function getLinks(DOMNode $element, $rel, $type=null) { - $links = $element->getElementsByTagnameNS(self::ATOM, self::LINK); + $els = $element->childNodes; $out = array(); - foreach ($links as $link) { + foreach ($els as $link) { + if ($link->localName == self::LINK && $link->namespaceURI == self::ATOM) { - $linkRel = $link->getAttribute(self::REL); - $linkType = $link->getAttribute(self::TYPE); + $linkRel = $link->getAttribute(self::REL); + $linkType = $link->getAttribute(self::TYPE); - if ($linkRel == $rel && - (is_null($type) || $linkType == $type)) { - $out[] = $link; + if ($linkRel == $rel && + (is_null($type) || $linkType == $type)) { + $out[] = $link; + } } } -- cgit v1.2.3-54-g00ecf From fd4eefe6b4a2a64b21e1f924afe1d8d749cd89e0 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 4 Mar 2010 11:43:31 -0500 Subject: OStatus enabled by default --- lib/default.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/default.php b/lib/default.php index 8e99a0e1c..bdd78d4d8 100644 --- a/lib/default.php +++ b/lib/default.php @@ -280,6 +280,7 @@ $default = 'TightUrl' => array('shortenerName' => '2tu.us', 'freeService' => true,'serviceUrl'=>'http://2tu.us/?save=y&url=%1$s'), 'Geonames' => null, 'Mapstraction' => null, + 'OStatus' => null, 'WikiHashtags' => null, 'OpenID' => null), ), -- cgit v1.2.3-54-g00ecf From 0ddd1ef191389ed38988091d098463b19aa86f68 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 4 Mar 2010 08:55:36 -0800 Subject: Ignore API 'since' silently as Twitter does instead of throwing a 403 error. Getting extra results is less disruptive than total failure. Threw in an X-StatusNet-Warning header on the off chance some API client developer notices it. :) --- lib/apiaction.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/apiaction.php b/lib/apiaction.php index eef0ba637..e4a1df3d1 100644 --- a/lib/apiaction.php +++ b/lib/apiaction.php @@ -86,7 +86,7 @@ class ApiAction extends Action $this->since_id = (int)$this->arg('since_id', 0); if ($this->arg('since')) { - $this->clientError(_("since parameter is disabled for performance; use since_id"), 403); + header('X-StatusNet-Warning: since parameter is disabled; use since_id'); } return true; -- cgit v1.2.3-54-g00ecf From 74dbd37e9af4dabd5c157b78dc331ccfb6d69131 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Thu, 4 Mar 2010 12:49:42 -0500 Subject: Bringing aside back because it is needed for Design values. Will hide from CSS instead. --- lib/adminpanelaction.php | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib') diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index d1aab3dfc..d43ea7698 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -189,16 +189,6 @@ class AdminPanelAction extends Action $this->elementEnd('div'); } - /** - * There is no data for aside, so, we don't output - * - * @return nothing - */ - function showAside() - { - - } - /** * show human-readable instructions for the page, or * a success/failure on save. -- cgit v1.2.3-54-g00ecf