summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/daemons
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TwitterBridge/daemons')
-rwxr-xr-xplugins/TwitterBridge/daemons/synctwitterfriends.php10
-rwxr-xr-xplugins/TwitterBridge/daemons/twitterstatusfetcher.php9
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/TwitterBridge/daemons/synctwitterfriends.php b/plugins/TwitterBridge/daemons/synctwitterfriends.php
index 0668c6222..ed2bf48a2 100755
--- a/plugins/TwitterBridge/daemons/synctwitterfriends.php
+++ b/plugins/TwitterBridge/daemons/synctwitterfriends.php
@@ -33,6 +33,8 @@ END_OF_TRIM_HELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
require_once INSTALLDIR . '/lib/parallelizingdaemon.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
+require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
+require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
/**
* Daemon to sync local friends with Twitter friends
@@ -45,14 +47,6 @@ require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
* @link http://status.net/
*/
-$helptext = <<<END_OF_TWITTER_HELP
-Batch script for synching local friends with Twitter friends.
-
-END_OF_TWITTER_HELP;
-
-require_once INSTALLDIR . '/scripts/commandline.inc';
-require_once INSTALLDIR . '/lib/parallelizingdaemon.php';
-
class SyncTwitterFriendsDaemon extends ParallelizingDaemon
{
/**
diff --git a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
index 4752ada7c..81bbbc7c5 100755
--- a/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
+++ b/plugins/TwitterBridge/daemons/twitterstatusfetcher.php
@@ -37,8 +37,11 @@ Batch script for retrieving Twitter messages from foreign service.
END_OF_TRIM_HELP;
require_once INSTALLDIR . '/scripts/commandline.inc';
+require_once INSTALLDIR . '/lib/common.php';
require_once INSTALLDIR . '/lib/daemon.php';
require_once INSTALLDIR . '/plugins/TwitterBridge/twitter.php';
+require_once INSTALLDIR . '/plugins/TwitterBridge/twitterbasicauthclient.php';
+require_once INSTALLDIR . '/plugins/TwitterBridge/twitteroauthclient.php';
/**
* Fetcher for statuses from Twitter
@@ -497,8 +500,6 @@ class TwitterStatusFetcher extends ParallelizingDaemon
$avatar->filename = $filename;
$avatar->url = Avatar::url($filename);
- common_debug($this->name() . " - New filename: $avatar->url");
-
$avatar->created = common_sql_now();
$id = $avatar->insert();
@@ -516,9 +517,7 @@ class TwitterStatusFetcher extends ParallelizingDaemon
function fetchAvatar($url, $filename)
{
- $avatar_dir = INSTALLDIR . '/avatar/';
-
- $avatarfile = $avatar_dir . $filename;
+ $avatarfile = Avatar::path($filename);
$out = fopen($avatarfile, 'wb');
if (!$out) {