From 5d5401b371a7e88140219216f3daa9f9c6fecaaf Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 17 Jul 2009 18:09:03 -0700 Subject: Fix setting id. --- scripts/twitterstatusfetcher.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'scripts/twitterstatusfetcher.php') diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php index 8b10bfbad..248cf86f1 100755 --- a/scripts/twitterstatusfetcher.php +++ b/scripts/twitterstatusfetcher.php @@ -32,7 +32,7 @@ $helptext = <<set_id($id); + } + } + /** * Name of this daemon * @@ -640,6 +649,8 @@ if (have_option('i')) { $id = null; } +common_debug("id set to $id"); + $fetcher = new TwitterStatusFetcher($id); $fetcher->runOnce(); -- cgit v1.2.3-54-g00ecf From 9e8bcff5ddfc7d3e5785161078c5b1eaafea2f1e Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Fri, 17 Jul 2009 18:36:13 -0700 Subject: Allow -d (debug logging) command line argument --- scripts/twitterstatusfetcher.php | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'scripts/twitterstatusfetcher.php') diff --git a/scripts/twitterstatusfetcher.php b/scripts/twitterstatusfetcher.php index 248cf86f1..e2ba1d003 100755 --- a/scripts/twitterstatusfetcher.php +++ b/scripts/twitterstatusfetcher.php @@ -25,19 +25,18 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); define('MAXCHILDREN', 2); define('POLL_INTERVAL', 60); // in seconds -$shortoptions = 'i::'; -$longoptions = array('id::'); +$shortoptions = 'di::'; +$longoptions = array('id::', 'debug'); $helptext = <<name() . + ': debugging log output enabled.'); + } + do { $flinks = $this->refreshFlinks(); @@ -649,7 +653,9 @@ if (have_option('i')) { $id = null; } -common_debug("id set to $id"); +if (have_option('d') || have_option('debug')) { + define('SCRIPT_DEBUG', true); +} $fetcher = new TwitterStatusFetcher($id); $fetcher->runOnce(); -- cgit v1.2.3-54-g00ecf