summaryrefslogtreecommitdiff
path: root/scripts/xmppdaemon.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:21:29 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:21:29 -0500
commiteb2f9c98ac115ce67e9a740b200c832153ffa05c (patch)
tree562e524f12420a97fc66a5c9db0ccd6a1f9aea09 /scripts/xmppdaemon.php
parentedbc0c665cc65875b4d14b79939233b1c9c06bb6 (diff)
replace NULL with null
Another global search-and-replace update. Here, I've replaced the PHP keyword 'NULL' with its lowercase version. This is another PEAR code standards change. darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
Diffstat (limited to 'scripts/xmppdaemon.php')
-rwxr-xr-xscripts/xmppdaemon.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index cd27a2c14..ead842928 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -39,7 +39,7 @@ set_error_handler('common_error_handler');
class XMPPDaemon extends Daemon {
- function XMPPDaemon($resource=NULL) {
+ function XMPPDaemon($resource=null) {
static $attrs = array('server', 'port', 'user', 'password', 'host');
foreach ($attrs as $attr)
@@ -71,7 +71,7 @@ class XMPPDaemon extends Daemon {
$this->conn->setReconnectTimeout(600);
jabber_send_presence("Send me a message to post a notice", 'available',
- NULL, 'available', 100);
+ null, 'available', 100);
return !$this->conn->isDisconnected();
}
@@ -92,7 +92,7 @@ class XMPPDaemon extends Daemon {
function handle_reconnect(&$pl) {
$this->conn->processUntil('session_start');
- $this->conn->presence('Send me a message to post a notice', 'available', NULL, 'available', 100);
+ $this->conn->presence('Send me a message to post a notice', 'available', null, 'available', 100);
}
function get_user($from) {
@@ -165,30 +165,30 @@ class XMPPDaemon extends Daemon {
$addresses = $xml->sub('addresses');
if (!$addresses) {
$this->log(LOG_WARNING, 'Forwarded message without addresses');
- return NULL;
+ return null;
}
$address = $addresses->sub('address');
if (!$address) {
$this->log(LOG_WARNING, 'Forwarded message without address');
- return NULL;
+ return null;
}
if (!array_key_exists('type', $address->attrs)) {
$this->log(LOG_WARNING, 'No type for forwarded message');
- return NULL;
+ return null;
}
$type = $address->attrs['type'];
if ($type != 'ofrom') {
$this->log(LOG_WARNING, 'Type of forwarded message is not ofrom');
- return NULL;
+ return null;
}
if (!array_key_exists('jid', $address->attrs)) {
$this->log(LOG_WARNING, 'No jid for forwarded message');
- return NULL;
+ return null;
}
$jid = $address->attrs['jid'];
if (!$jid) {
$this->log(LOG_WARNING, 'Could not get jid from address');
- return NULL;
+ return null;
}
$this->log(LOG_DEBUG, 'Got message forwarded from jid ' . $jid);
return $jid;