From 5efe588174c71979fc1970353c9a556ea441f138 Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 26 Aug 2009 00:59:06 +0000 Subject: [PATCH] Moved the rest of the Twitter stuff into the TwitterBridge plugin --- lib/common.php | 1 - plugins/TwitterBridge/TwitterBridgePlugin.php | 2 +- .../TwitterBridge/daemons}/synctwitterfriends.php | 3 ++- .../TwitterBridge/daemons}/twitterqueuehandler.php | 7 +++---- .../TwitterBridge/daemons}/twitterstatusfetcher.php | 5 +++-- {lib => plugins/TwitterBridge}/twitter.php | 0 plugins/TwitterBridge/twitterauthorization.php | 2 ++ plugins/TwitterBridge/twittersettings.php | 4 ++-- 8 files changed, 13 insertions(+), 11 deletions(-) rename {scripts => plugins/TwitterBridge/daemons}/synctwitterfriends.php (98%) rename {scripts => plugins/TwitterBridge/daemons}/twitterqueuehandler.php (90%) rename {scripts => plugins/TwitterBridge/daemons}/twitterstatusfetcher.php (98%) rename {lib => plugins/TwitterBridge}/twitter.php (100%) diff --git a/lib/common.php b/lib/common.php index 62cf5640d6..d23d9da7d1 100644 --- a/lib/common.php +++ b/lib/common.php @@ -409,7 +409,6 @@ require_once INSTALLDIR.'/lib/theme.php'; require_once INSTALLDIR.'/lib/mail.php'; require_once INSTALLDIR.'/lib/subs.php'; require_once INSTALLDIR.'/lib/Shorturl_api.php'; -require_once INSTALLDIR.'/lib/twitter.php'; require_once INSTALLDIR.'/lib/clientexception.php'; require_once INSTALLDIR.'/lib/serverexception.php'; diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index f7daa9a222..a8de1c6644 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -90,7 +90,7 @@ class TwitterBridgePlugin extends Plugin require_once(INSTALLDIR.'/plugins/TwitterBridge/' . strtolower(mb_substr($cls, 0, -6)) . '.php'); return false; case 'TwitterOAuthClient': - require_once(INSTALLDIR.'/plugins/TwitterBridge/twitteroAuthclient.php'); + require_once(INSTALLDIR.'/plugins/TwitterBridge/twitteroauthclient.php'); return false; default: return true; diff --git a/scripts/synctwitterfriends.php b/plugins/TwitterBridge/daemons/synctwitterfriends.php similarity index 98% rename from scripts/synctwitterfriends.php rename to plugins/TwitterBridge/daemons/synctwitterfriends.php index 2de464bccc..b7be5d043a 100755 --- a/scripts/synctwitterfriends.php +++ b/plugins/TwitterBridge/daemons/synctwitterfriends.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); $shortoptions = 'di::'; $longoptions = array('id::', 'debug'); @@ -32,6 +32,7 @@ END_OF_TRIM_HELP; require_once INSTALLDIR . '/scripts/commandline.inc'; require_once INSTALLDIR . '/lib/parallelizingdaemon.php'; +require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; /** * Daemon to sync local friends with Twitter friends diff --git a/scripts/twitterqueuehandler.php b/plugins/TwitterBridge/daemons/twitterqueuehandler.php similarity index 90% rename from scripts/twitterqueuehandler.php rename to plugins/TwitterBridge/daemons/twitterqueuehandler.php index 00e735d983..9aa9d1ed0a 100755 --- a/scripts/twitterqueuehandler.php +++ b/plugins/TwitterBridge/daemons/twitterqueuehandler.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); $shortoptions = 'i::'; $longoptions = array('id::'); @@ -30,10 +30,9 @@ Daemon script for pushing new notices to Twitter. END_OF_ENJIT_HELP; -require_once INSTALLDIR.'/scripts/commandline.inc'; - -require_once INSTALLDIR . '/lib/twitter.php'; +require_once INSTALLDIR . '/scripts/commandline.inc'; require_once INSTALLDIR . '/lib/queuehandler.php'; +require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; class TwitterQueueHandler extends QueueHandler { diff --git a/scripts/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php similarity index 98% rename from scripts/twitterstatusfetcher.php rename to plugins/TwitterBridge/daemons/twitterstatusfetcher.php index f5289c5f4b..3023bf423b 100755 --- a/scripts/twitterstatusfetcher.php +++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php @@ -18,7 +18,7 @@ * along with this program. If not, see . */ -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../../..')); // Tune number of processes and how often to poll Twitter // XXX: Should these things be in config.php? @@ -36,8 +36,9 @@ Batch script for retrieving Twitter messages from foreign service. END_OF_TRIM_HELP; -require_once INSTALLDIR .'/scripts/commandline.inc'; +require_once INSTALLDIR . '/scripts/commandline.inc'; require_once INSTALLDIR . '/lib/daemon.php'; +require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; /** * Fetcher for statuses from Twitter diff --git a/lib/twitter.php b/plugins/TwitterBridge/twitter.php similarity index 100% rename from lib/twitter.php rename to plugins/TwitterBridge/twitter.php diff --git a/plugins/TwitterBridge/twitterauthorization.php b/plugins/TwitterBridge/twitterauthorization.php index b04f353278..a545284342 100644 --- a/plugins/TwitterBridge/twitterauthorization.php +++ b/plugins/TwitterBridge/twitterauthorization.php @@ -31,6 +31,8 @@ if (!defined('LACONICA')) { exit(1); } +require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; + /** * Class for doing OAuth authentication against Twitter * diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php index a3e02e1256..b3d4a971f6 100644 --- a/plugins/TwitterBridge/twittersettings.php +++ b/plugins/TwitterBridge/twittersettings.php @@ -31,8 +31,8 @@ if (!defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/connectsettingsaction.php'; -require_once INSTALLDIR.'/lib/twitter.php'; +require_once INSTALLDIR . '/lib/connectsettingsaction.php'; +require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php'; /** * Settings for Twitter integration -- 2.39.5