summaryrefslogtreecommitdiff
path: root/scripts/enjitqueuehandler.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-20 14:58:47 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-20 14:58:47 -0700
commit198afa0a1d61c4db2cf6b66e5801af506462ab9b (patch)
treed42ba4a5afae56af975ebddc784c93be820cbcdb /scripts/enjitqueuehandler.php
parent45430d2b3b952dda31d232c2726e5980a7e6e56a (diff)
change scripts to take server and path from commandline
Diffstat (limited to 'scripts/enjitqueuehandler.php')
-rwxr-xr-xscripts/enjitqueuehandler.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/enjitqueuehandler.php b/scripts/enjitqueuehandler.php
index 40f60da5d..37fef0b04 100755
--- a/scripts/enjitqueuehandler.php
+++ b/scripts/enjitqueuehandler.php
@@ -27,6 +27,11 @@ if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
define('LACONICA', true);
+// Preset the server at the command line
+
+$server = ($argc > 2) ? $argv[2] : null;
+$path = ($argc > 3) ? $argv[3] : null;
+
require_once(INSTALLDIR . '/lib/common.php');
require_once(INSTALLDIR . '/lib/mail.php');
require_once(INSTALLDIR . '/lib/queuehandler.php');
@@ -35,7 +40,6 @@ set_error_handler('common_error_handler');
class EnjitQueueHandler extends QueueHandler
{
-
function transport()
{
return 'enjit';
@@ -60,7 +64,6 @@ class EnjitQueueHandler extends QueueHandler
return "skipped";
}
-
#
# Build an Atom message from the notice
#
@@ -93,8 +96,8 @@ class EnjitQueueHandler extends QueueHandler
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
-
- curl_setopt($ch, CURLOPT_HEADER, 1);
+
+ curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1) ;
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
@@ -103,7 +106,7 @@ class EnjitQueueHandler extends QueueHandler
#
# curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
# curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- # curl_setopt($ch, CURLOPT_VERBOSE, 1);
+ # curl_setopt($ch, CURLOPT_VERBOSE, 1);
$result = curl_exec($ch);
@@ -115,7 +118,6 @@ class EnjitQueueHandler extends QueueHandler
return $code;
}
-
}