From ba5e90164c6af58d63aa2984de8afd4552c9b706 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 2 Oct 2013 14:07:53 +0200 Subject: [PATCH] Plugin onAutoload replaces _ with / in lib paths, this renames some classes. --- plugins/Irc/IrcPlugin.php | 2 +- plugins/Irc/lib/{fake_irc.php => fakeirc.php} | 2 +- plugins/Xmpp/XmppPlugin.php | 4 ++-- plugins/Xmpp/lib/{queued_xmpp.php => queuedxmpp.php} | 2 +- plugins/Xmpp/lib/{sharing_xmpp.php => sharingxmpp.php} | 2 +- plugins/Xmpp/lib/xmppmanager.php | 2 +- plugins/YammerImport/README | 4 ++-- .../lib/{sn_yammerclient.php => snyammerclient.php} | 2 +- plugins/YammerImport/lib/yammerimporter.php | 2 +- plugins/YammerImport/lib/yammerrunner.php | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) rename plugins/Irc/lib/{fake_irc.php => fakeirc.php} (96%) rename plugins/Xmpp/lib/{queued_xmpp.php => queuedxmpp.php} (99%) rename plugins/Xmpp/lib/{sharing_xmpp.php => sharingxmpp.php} (97%) rename plugins/YammerImport/lib/{sn_yammerclient.php => snyammerclient.php} (99%) diff --git a/plugins/Irc/IrcPlugin.php b/plugins/Irc/IrcPlugin.php index 18d1a0afe1..0610625a13 100644 --- a/plugins/Irc/IrcPlugin.php +++ b/plugins/Irc/IrcPlugin.php @@ -356,7 +356,7 @@ class IrcPlugin extends ImPlugin { $this->regcheck = true; } - $this->fake_irc = new Fake_Irc; + $this->fake_irc = new FakeIrc; /* * Commands allowed to return output to a channel diff --git a/plugins/Irc/lib/fake_irc.php b/plugins/Irc/lib/fakeirc.php similarity index 96% rename from plugins/Irc/lib/fake_irc.php rename to plugins/Irc/lib/fakeirc.php index 81b867643e..ea5e433d75 100644 --- a/plugins/Irc/lib/fake_irc.php +++ b/plugins/Irc/lib/fakeirc.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -class Fake_Irc extends Phergie_Driver_Streams { +class FakeIrc extends Phergie_Driver_Streams { public $would_be_sent = null; /** diff --git a/plugins/Xmpp/XmppPlugin.php b/plugins/Xmpp/XmppPlugin.php index 61b2998656..51139a6684 100644 --- a/plugins/Xmpp/XmppPlugin.php +++ b/plugins/Xmpp/XmppPlugin.php @@ -390,7 +390,7 @@ class XmppPlugin extends ImPlugin * Build a queue-proxied XMPP interface object. Any outgoing messages * will be run back through us for enqueing rather than sent directly. * - * @return Queued_XMPP + * @return QueuedXMPP * @throws Exception if server settings are invalid. */ function queuedConnection(){ @@ -411,7 +411,7 @@ class XmppPlugin extends ImPlugin throw new Exception(_m('You must specify a password in the configuration.')); } - return new Queued_XMPP($this, $this->host ? + return new QueuedXMPP($this, $this->host ? $this->host : $this->server, $this->port, diff --git a/plugins/Xmpp/lib/queued_xmpp.php b/plugins/Xmpp/lib/queuedxmpp.php similarity index 99% rename from plugins/Xmpp/lib/queued_xmpp.php rename to plugins/Xmpp/lib/queuedxmpp.php index aeb758421f..5a3c464ef4 100644 --- a/plugins/Xmpp/lib/queued_xmpp.php +++ b/plugins/Xmpp/lib/queuedxmpp.php @@ -31,7 +31,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -class Queued_XMPP extends XMPPHP_XMPP +class QueuedXMPP extends XMPPHP_XMPP { /** * Reference to the XmppPlugin object we're hooked up to. diff --git a/plugins/Xmpp/lib/sharing_xmpp.php b/plugins/Xmpp/lib/sharingxmpp.php similarity index 97% rename from plugins/Xmpp/lib/sharing_xmpp.php rename to plugins/Xmpp/lib/sharingxmpp.php index 4b69125da3..99e1978a37 100644 --- a/plugins/Xmpp/lib/sharing_xmpp.php +++ b/plugins/Xmpp/lib/sharingxmpp.php @@ -34,7 +34,7 @@ if (!defined('STATUSNET')) { exit(1); } -class Sharing_XMPP extends XMPPHP_XMPP +class SharingXMPP extends XMPPHP_XMPP { function getSocket() { diff --git a/plugins/Xmpp/lib/xmppmanager.php b/plugins/Xmpp/lib/xmppmanager.php index c7d4c15dd6..372824ce54 100644 --- a/plugins/Xmpp/lib/xmppmanager.php +++ b/plugins/Xmpp/lib/xmppmanager.php @@ -131,7 +131,7 @@ class XmppManager extends ImManager { if (!$this->conn || $this->conn->isDisconnected()) { $resource = 'queue' . posix_getpid(); - $this->conn = new Sharing_XMPP($this->plugin->host ? + $this->conn = new SharingXMPP($this->plugin->host ? $this->plugin->host : $this->plugin->server, $this->plugin->port, diff --git a/plugins/YammerImport/README b/plugins/YammerImport/README index db16744dce..47fc07023a 100644 --- a/plugins/YammerImport/README +++ b/plugins/YammerImport/README @@ -146,10 +146,10 @@ Standalone classes ------------------ YammerRunner: encapsulates the iterative process of retrieving the various users, - groups, and messages via SN_YammerClient and saving them locally + groups, and messages via SNYammerClient and saving them locally via YammerImporter. -SN_YammerClient: encapsulates HTTP+OAuth interface to Yammer API, returns data +SNYammerClient: encapsulates HTTP+OAuth interface to Yammer API, returns data as straight decoded JSON object trees. YammerImporter: encapsulates logic to pull information from the returned API data diff --git a/plugins/YammerImport/lib/sn_yammerclient.php b/plugins/YammerImport/lib/snyammerclient.php similarity index 99% rename from plugins/YammerImport/lib/sn_yammerclient.php rename to plugins/YammerImport/lib/snyammerclient.php index 2827bdc53a..a322157ec5 100644 --- a/plugins/YammerImport/lib/sn_yammerclient.php +++ b/plugins/YammerImport/lib/snyammerclient.php @@ -23,7 +23,7 @@ * @package YammerImportPlugin * @author Brion Vibber */ -class SN_YammerClient +class SNYammerClient { protected $apiBase = "https://www.yammer.com"; protected $consumerKey, $consumerSecret; diff --git a/plugins/YammerImport/lib/yammerimporter.php b/plugins/YammerImport/lib/yammerimporter.php index f589753796..1542b5909d 100644 --- a/plugins/YammerImport/lib/yammerimporter.php +++ b/plugins/YammerImport/lib/yammerimporter.php @@ -27,7 +27,7 @@ class YammerImporter { protected $client; - function __construct(SN_YammerClient $client) + function __construct(SNYammerClient $client) { $this->client = $client; } diff --git a/plugins/YammerImport/lib/yammerrunner.php b/plugins/YammerImport/lib/yammerrunner.php index 5907ce0c32..0da2fc9db4 100644 --- a/plugins/YammerImport/lib/yammerrunner.php +++ b/plugins/YammerImport/lib/yammerrunner.php @@ -62,7 +62,7 @@ class YammerRunner { $this->state = $state; - $this->client = new SN_YammerClient( + $this->client = new SNYammerClient( common_config('yammer', 'consumer_key'), common_config('yammer', 'consumer_secret'), $this->state->oauth_token,