summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-16 21:59:40 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-16 21:59:40 +0000
commit864c4066a6f9ebe6c899fc3448365c6c2348a3c8 (patch)
treebaa2925a0ae42743db92d045cf9754245d887ffd
parentc3a44d2ab982c42aaece2785316416a8ea780873 (diff)
parent4d0e4f733bdfa281487f370b70f5f7440a7ef931 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-rw-r--r--lib/twitterapi.php2
-rwxr-xr-xscripts/jabberqueuehandler.php9
-rwxr-xr-xscripts/publicqueuehandler.php7
-rwxr-xr-xscripts/xmppconfirmhandler.php7
-rwxr-xr-xscripts/xmppdaemon.php7
5 files changed, 30 insertions, 2 deletions
diff --git a/lib/twitterapi.php b/lib/twitterapi.php
index b8357c688..6a90b4e28 100644
--- a/lib/twitterapi.php
+++ b/lib/twitterapi.php
@@ -418,7 +418,7 @@ class TwitterapiAction extends Action
function date_twitter($dt)
{
$t = strtotime($dt);
- return date("D M d G:i:s O Y", $t);
+ return date("D M d H:i:s O Y", $t);
}
// XXX: Candidate for a general utility method somewhere?
diff --git a/scripts/jabberqueuehandler.php b/scripts/jabberqueuehandler.php
index 924fc4545..8b6e974c0 100755
--- a/scripts/jabberqueuehandler.php
+++ b/scripts/jabberqueuehandler.php
@@ -54,6 +54,13 @@ class JabberQueueHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
@@ -63,4 +70,4 @@ $resource = ($argc > 1) ? $argv[1] : (common_config('xmpp','resource') . '-queue
$handler = new JabberQueueHandler($resource);
-$handler->runOnce(); \ No newline at end of file
+$handler->runOnce();
diff --git a/scripts/publicqueuehandler.php b/scripts/publicqueuehandler.php
index 5075c12df..b0fa22d43 100755
--- a/scripts/publicqueuehandler.php
+++ b/scripts/publicqueuehandler.php
@@ -52,6 +52,13 @@ class PublicQueueHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php
index 2b8b085ce..7f39235fe 100755
--- a/scripts/xmppconfirmhandler.php
+++ b/scripts/xmppconfirmhandler.php
@@ -140,6 +140,13 @@ class XmppConfirmHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index ef3f8c63d..0ce2f2a28 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -321,6 +321,13 @@ class XMPPDaemon extends Daemon
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);