From 0ba53edd968ceb53d520351d2846faa97d31bb6f Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 4 Oct 2015 22:31:07 +0200 Subject: [PATCH 1/6] Can't use return-value in empty() --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 09f9ca71d1..5ef77a9506 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -144,7 +144,7 @@ class Profile extends Managed_DataObject public function hasPassword() { try { - return !empty($this->getUser()->hasPassword()); + return $this->getUser()->hasPassword(); } catch (NoSuchUserException $e) { return false; } From 4c2bc465a0fe841db4942a0116f3b90989df1cf9 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 27 Oct 2015 03:16:39 +0000 Subject: [PATCH 2/6] Accept 204 for PuSH subscription Some hubs (notably, pushpress, used by wordpress.com) return 204 to mean success. This used to be allowed by the spec, so no harm in accepting it. --- plugins/OStatus/classes/FeedSub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index d0ac83b56d..6585e9ffb7 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -355,7 +355,7 @@ class FeedSub extends Managed_DataObject $response = $client->post($hub, $headers, $post); $status = $response->getStatus(); // PuSH specificed response status code - if ($status == 202) { + if ($status == 202 || $status == 204) { common_log(LOG_INFO, __METHOD__ . ': sub req ok, awaiting verification callback'); return; } else if ($status >= 200 && $status < 300) { From 03c68d283d85e75cb6ee286d2c53a7507cef729a Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 27 Oct 2015 03:18:04 +0000 Subject: [PATCH 3/6] Respect isPermalLink=false on RSS guid --- lib/activityobject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/activityobject.php b/lib/activityobject.php index 2fe52eefcc..87eea13727 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -298,7 +298,7 @@ class ActivityObject if (!empty($guidEl)) { $this->id = $guidEl->textContent; - if ($guidEl->hasAttribute('isPermaLink')) { + if ($guidEl->hasAttribute('isPermaLink') && $guidEl->getAttribute('isPermaLink') != 'false') { // overwrites $this->link = $this->id; } From 54e87dd2c37e1645231378a4b17b0c549807fa78 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 27 Oct 2015 17:19:03 +0000 Subject: [PATCH 4/6] Morkup correct author for a repeat The original author is not the author of this entry, but of the original entry. --- lib/noticelistitem.php | 3 ++- plugins/Share/SharePlugin.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php index dc171409f4..7701cd8a6c 100644 --- a/lib/noticelistitem.php +++ b/lib/noticelistitem.php @@ -235,8 +235,9 @@ class NoticeListItem extends Widget function showAuthor() { $attrs = array('href' => $this->profile->profileurl, - 'class' => 'h-card p-author', + 'class' => 'h-card', 'title' => $this->profile->getNickname()); + if(empty($this->repeat)) { $attrs['class'] .= ' p-author'; } if (Event::handle('StartShowNoticeItemAuthor', array($this->profile, $this->out, &$attrs))) { $this->out->elementStart('a', $attrs); diff --git a/plugins/Share/SharePlugin.php b/plugins/Share/SharePlugin.php index c337efbaec..c31686e445 100644 --- a/plugins/Share/SharePlugin.php +++ b/plugins/Share/SharePlugin.php @@ -204,7 +204,7 @@ class SharePlugin extends ActivityVerbHandlerPlugin 'class' => 'h-card p-author', 'title' => $repeater->getFancyName()); - $nli->out->elementStart('span', 'repeat h-entry'); + $nli->out->elementStart('span', 'repeat'); // TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname. $nli->out->raw(_('Repeated by').' '); From e1de6e0aa9bb130780b012eb8ab0c99c8f8a01a8 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 27 Oct 2015 18:43:57 +0000 Subject: [PATCH 5/6] Support more author types on RSS Specifically, any ActivityStreams or ATOM namespaces being used on an rss channel. --- plugins/OStatus/classes/Ostatus_profile.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 1c4428b16d..da7a4b4244 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -1003,11 +1003,13 @@ class Ostatus_profile extends Managed_DataObject } } + $obj = ActivityUtils::getFeedAuthor($feedEl); + // @todo FIXME: We should check whether this feed has elements // with different or elements, and... I dunno. // Do something about that. - $obj = ActivityObject::fromRssChannel($feedEl); + if(empty($obj)) { $obj = ActivityObject::fromRssChannel($feedEl); } return self::ensureActivityObjectProfile($obj, $hints); } From ba623d2b4e9928ddf9ca4676fac4d46bba4bd181 Mon Sep 17 00:00:00 2001 From: Matthias Fritzsche Date: Wed, 4 Nov 2015 12:31:23 +0100 Subject: [PATCH 6/6] update URL bugz.foocorp.net and gitorious.net are outdated git.gnu.io is current --- UPGRADE | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UPGRADE b/UPGRADE index d2cd365e55..3a1dd8a9b9 100644 --- a/UPGRADE +++ b/UPGRADE @@ -27,13 +27,13 @@ and follow this procedure: The upgrade script will likely take a long time because it will upgrade the tables to another character encoding and make other automated upgrades. Make sure it ends without errors. If you get - errors, create a new task on https://bugz.foocorp.net/ + errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues 4. Start your queue daemons again (you can run this command even if you do not use the queue daemons): $ bash scripts/startdaemons.sh -5. Report any issues at https://bugz.foocorp.net/ (tag GNU social) +5. Report any issues at https://git.gnu.io/gnu/gnu-social/issues If you are using ssh keys to log in to your server, you can make this procedure pretty painless (assuming you have automated backups already). @@ -69,7 +69,7 @@ variant of this command (you will be prompted for the database password): 2. Unpack your GNU social code to a fresh directory. You can do this by cloning our git repository: - $ git clone https://gitorious.org/social/mainline.git gnusocial + $ git clone https://git.gnu.io/gnu/gnu-social.git gnusocial 3. Synchronize your local files to the GNU social directory. These will be the local files such as avatars, config and files: @@ -91,8 +91,8 @@ variant of this command (you will be prompted for the database password): The upgrade script will likely take a long time because it will upgrade the tables to another character encoding and make other automated upgrades. Make sure it ends without errors. If you get - errors, create a new task on https://bugz.foocorp.net/ + errors, create a new task on https://git.gnu.io/gnu/gnu-social/issues 6. Start your queue daemons: 'bash scripts/startdaemons.sh' -7. Report any issues at https://bugz.foocorp.net/ (tag GNU social) +7. Report any issues at https://git.gnu.io/gnu/gnu-social/issues