From 08c17bfcaa6bce08d547afa719601139fcb0e8c6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 25 Feb 2010 21:06:16 -0800 Subject: [PATCH 1/6] try/catch on omb profile pings --- lib/profilequeuehandler.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/profilequeuehandler.php b/lib/profilequeuehandler.php index e8a00aef30..6ce93229b2 100644 --- a/lib/profilequeuehandler.php +++ b/lib/profilequeuehandler.php @@ -39,7 +39,11 @@ class ProfileQueueHandler extends QueueHandler if (Event::handle('StartBroadcastProfile', array($profile))) { require_once(INSTALLDIR.'/lib/omb.php'); - omb_broadcast_profile($profile); + try { + omb_broadcast_profile($profile); + } catch (Exception $e) { + common_log(LOG_ERR, "Failed sending OMB profiles: " . $e->getMessage()); + } } Event::handle('EndBroadcastProfile', array($profile)); return true; From b573c5e2603dab212bea99bc30beebcff91e2195 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 25 Feb 2010 21:27:46 -0800 Subject: [PATCH 2/6] Fix for group timeline feeds by name --- lib/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api.php b/lib/api.php index d79dc327ed..2af150ab99 100644 --- a/lib/api.php +++ b/lib/api.php @@ -1248,7 +1248,7 @@ class ApiAction extends Action if (empty($local)) { return null; } else { - return User_group::staticGet('id', $local->id); + return User_group::staticGet('id', $local->group_id); } } } From 3aee8e04486684c6aebbafbecac123bba4553427 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 25 Feb 2010 21:46:53 -0800 Subject: [PATCH 3/6] Fix a few keys that got dropped from statusnet.ini by mistake --- classes/statusnet.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes/statusnet.ini b/classes/statusnet.ini index 719dbedf57..3fb8ee208b 100644 --- a/classes/statusnet.ini +++ b/classes/statusnet.ini @@ -55,6 +55,7 @@ modified = 384 [conversation__keys] id = N +uri = U [deleted_notice] id = 129 @@ -102,6 +103,7 @@ modified = 384 [file__keys] id = N +url = U [file_oembed] file_id = 129 @@ -385,6 +387,7 @@ modified = 384 [oauth_application__keys] id = N +name = U [oauth_application_user] profile_id = 129 From eabae96fb40a51002a90961b3092b38d29b1f5f9 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 25 Feb 2010 22:02:40 -0800 Subject: [PATCH 4/6] Get ApiAction autoloading properly --- lib/{api.php => apiaction.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/{api.php => apiaction.php} (100%) diff --git a/lib/api.php b/lib/apiaction.php similarity index 100% rename from lib/api.php rename to lib/apiaction.php From 6cc26a613b7849103d8cfae674bb3a91a7161656 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 25 Feb 2010 22:06:31 -0800 Subject: [PATCH 5/6] Remove unnecessary requires --- actions/apistatusnetconfig.php | 2 -- actions/twitapisearchatom.php | 2 -- actions/twitapisearchjson.php | 1 - actions/twitapitrends.php | 2 -- lib/apiauth.php | 1 - plugins/Mapstraction/map.php | 2 -- plugins/Realtime/RealtimePlugin.php | 2 -- 7 files changed, 12 deletions(-) diff --git a/actions/apistatusnetconfig.php b/actions/apistatusnetconfig.php index dc1ab8685b..296376d195 100644 --- a/actions/apistatusnetconfig.php +++ b/actions/apistatusnetconfig.php @@ -32,8 +32,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; - /** * Gives a full dump of configuration variables for this instance * of StatusNet, minus variables that may be security-sensitive (like diff --git a/actions/twitapisearchatom.php b/actions/twitapisearchatom.php index e389ddec84..24aa619bd7 100644 --- a/actions/twitapisearchatom.php +++ b/actions/twitapisearchatom.php @@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/api.php'; - /** * Action for outputting search results in Twitter compatible Atom * format. diff --git a/actions/twitapisearchjson.php b/actions/twitapisearchjson.php index 741ed78d63..b5c006aa7b 100644 --- a/actions/twitapisearchjson.php +++ b/actions/twitapisearchjson.php @@ -31,7 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/api.php'; require_once INSTALLDIR.'/lib/jsonsearchresultslist.php'; /** diff --git a/actions/twitapitrends.php b/actions/twitapitrends.php index 779405e6d6..5a04569a22 100644 --- a/actions/twitapitrends.php +++ b/actions/twitapitrends.php @@ -31,8 +31,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/api.php'; - /** * Returns the top ten queries that are currently trending * diff --git a/lib/apiauth.php b/lib/apiauth.php index 25e2196cf2..5090871cfe 100644 --- a/lib/apiauth.php +++ b/lib/apiauth.php @@ -38,7 +38,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/api.php'; require_once INSTALLDIR . '/lib/apioauth.php'; /** diff --git a/plugins/Mapstraction/map.php b/plugins/Mapstraction/map.php index a33dfc7360..b809c1b8e2 100644 --- a/plugins/Mapstraction/map.php +++ b/plugins/Mapstraction/map.php @@ -142,8 +142,6 @@ class MapAction extends OwnerDesignAction // of refactoring from within a plugin, so I'm just abusing // the ApiAction method. Don't do this unless you're me! - require_once(INSTALLDIR.'/lib/api.php'); - $act = new ApiAction('/dev/null'); $arr = $act->twitterStatusArray($notice, true); diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 6c212453e4..2b3cb35f1d 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -244,8 +244,6 @@ class RealtimePlugin extends Plugin // of refactoring from within a plugin, so I'm just abusing // the ApiAction method. Don't do this unless you're me! - require_once(INSTALLDIR.'/lib/api.php'); - $act = new ApiAction('/dev/null'); $arr = $act->twitterStatusArray($notice, true); From 6ae39da198e391f57a901e24a2561e76afe11613 Mon Sep 17 00:00:00 2001 From: Michele Date: Fri, 26 Feb 2010 11:35:55 +0100 Subject: [PATCH 6/6] Fixed object name --- actions/editgroup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/editgroup.php b/actions/editgroup.php index d486db0c0a..4b596cade9 100644 --- a/actions/editgroup.php +++ b/actions/editgroup.php @@ -286,7 +286,7 @@ class EditgroupAction extends GroupDesignAction $group = Local_group::staticGet('nickname', $nickname); if (!empty($group) && - $group->id != $this->group->id) { + $group->group_id != $this->group->id) { return true; }