From bf0df016e568c2079c0842490aa52a6ddb4e9ca2 Mon Sep 17 00:00:00 2001 From: Chimo Date: Mon, 4 Jan 2016 10:36:05 -0500 Subject: [PATCH 1/3] OpenID plugin: 'openid_only' should be 'openidonly' To match everywhere else. --- plugins/OpenID/OpenIDPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 2e9ada9806..4e5a0bfe0c 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -414,7 +414,7 @@ class OpenIDPlugin extends Plugin */ function onRedirectToLogin($action, $user) { - if (common_config('site', 'openid_only') || (!empty($user) && User_openid::hasOpenID($user->id))) { + if (common_config('site', 'openidonly') || (!empty($user) && User_openid::hasOpenID($user->id))) { common_redirect(common_local_url('openidlogin'), 303); } return true; From e10691abea2a9948e8f4b6d89e1c1c85993aa66c Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 5 Jan 2016 14:19:33 +0000 Subject: [PATCH 2/3] only count post-notices (i.e. don't include activity-notices in statuses_count in the API) --- classes/Profile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 945d1a74ca..65758f3e36 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -824,6 +824,7 @@ class Profile extends Managed_DataObject $notices = new Notice(); $notices->profile_id = $this->id; + $notices->whereAdd("verb = '".ActivityVerb::POST."'"); $cnt = (int) $notices->count('distinct id'); if (!empty($c)) { @@ -1696,4 +1697,4 @@ class Profile extends Managed_DataObject { return $this->getUser()->getConnectedApps($offset, $limit); } -} +} \ No newline at end of file From 32549cfd8c747ab82f8979d8f180d5290b27c064 Mon Sep 17 00:00:00 2001 From: hannes Date: Tue, 5 Jan 2016 23:29:48 +0000 Subject: [PATCH 3/3] $notices->verb = ActivityVerb::POST; --- classes/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Profile.php b/classes/Profile.php index 65758f3e36..620772b0a4 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -824,7 +824,7 @@ class Profile extends Managed_DataObject $notices = new Notice(); $notices->profile_id = $this->id; - $notices->whereAdd("verb = '".ActivityVerb::POST."'"); + $notices->verb = ActivityVerb::POST; $cnt = (int) $notices->count('distinct id'); if (!empty($c)) {