summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/enjitqueuehandler.php2
-rwxr-xr-xscripts/fixup_inboxes.php2
-rwxr-xr-xscripts/fixup_notices_rendered.php2
-rwxr-xr-xscripts/jabberqueuehandler.php2
-rwxr-xr-xscripts/maildaemon.php8
-rwxr-xr-xscripts/ombqueuehandler.php2
-rwxr-xr-xscripts/smsqueuehandler.php2
-rwxr-xr-xscripts/xmppconfirmhandler.php8
-rwxr-xr-xscripts/xmppdaemon.php18
9 files changed, 23 insertions, 23 deletions
diff --git a/scripts/enjitqueuehandler.php b/scripts/enjitqueuehandler.php
index cfb253753..1c033603f 100755
--- a/scripts/enjitqueuehandler.php
+++ b/scripts/enjitqueuehandler.php
@@ -117,7 +117,7 @@ class EnjitQueueHandler extends QueueHandler {
mb_internal_encoding('UTF-8');
-$id = ($argc > 1) ? $argv[1] : NULL;
+$id = ($argc > 1) ? $argv[1] : null;
$handler = new EnjitQueueHandler($id);
diff --git a/scripts/fixup_inboxes.php b/scripts/fixup_inboxes.php
index e631a80ed..a5c8a0a5a 100755
--- a/scripts/fixup_inboxes.php
+++ b/scripts/fixup_inboxes.php
@@ -34,7 +34,7 @@ define('LACONICA', true);
require_once(INSTALLDIR . '/lib/common.php');
-$start_at = ($argc > 1) ? $argv[1] : NULL;
+$start_at = ($argc > 1) ? $argv[1] : null;
common_log(LOG_INFO, 'Updating user inboxes.');
diff --git a/scripts/fixup_notices_rendered.php b/scripts/fixup_notices_rendered.php
index 1fa9f394e..c27185546 100755
--- a/scripts/fixup_notices_rendered.php
+++ b/scripts/fixup_notices_rendered.php
@@ -31,7 +31,7 @@ require_once(INSTALLDIR . '/lib/common.php');
common_log(LOG_INFO, 'Starting to render old notices.');
-$start_at = ($argc > 1) ? $argv[1] : NULL;
+$start_at = ($argc > 1) ? $argv[1] : null;
$notice = new Notice();
if ($start_at) {
diff --git a/scripts/jabberqueuehandler.php b/scripts/jabberqueuehandler.php
index 8e33cfaf0..271aab22b 100755
--- a/scripts/jabberqueuehandler.php
+++ b/scripts/jabberqueuehandler.php
@@ -35,7 +35,7 @@ set_error_handler('common_error_handler');
class JabberQueueHandler extends XmppQueueHandler {
- var $conn = NULL;
+ var $conn = null;
function transport() {
return 'jabber';
diff --git a/scripts/maildaemon.php b/scripts/maildaemon.php
index 6d8507514..886e72ba7 100755
--- a/scripts/maildaemon.php
+++ b/scripts/maildaemon.php
@@ -42,7 +42,7 @@ class MailerDaemon {
function handle_message($fname='php://stdin') {
list($from, $to, $msg) = $this->parse_message($fname);
if (!$from || !$to || !$msg) {
- $this->error(NULL, _('Could not parse message.'));
+ $this->error(null, _('Could not parse message.'));
}
common_log(LOG_INFO, "Mail from $from to $to: " .substr($msg, 0, 20));
$user = $this->user_from($from);
@@ -74,7 +74,7 @@ class MailerDaemon {
function user_from($from_hdr) {
$froms = mailparse_rfc822_parse_addresses($from_hdr);
if (!$froms) {
- return NULL;
+ return null;
}
$from = $froms[0];
$addr = common_canonical_email($from['address']);
@@ -140,7 +140,7 @@ class MailerDaemon {
'decode_headers' => true,
'decode_bodies' => true));
if (!$parsed) {
- return NULL;
+ return null;
}
$from = $parsed->headers['from'];
@@ -167,7 +167,7 @@ class MailerDaemon {
}
function unsupported_type($type) {
- $this->error(NULL, "Unsupported message type: " . $type);
+ $this->error(null, "Unsupported message type: " . $type);
}
function cleanup_msg($msg) {
diff --git a/scripts/ombqueuehandler.php b/scripts/ombqueuehandler.php
index 31ae20f00..43c0980b6 100755
--- a/scripts/ombqueuehandler.php
+++ b/scripts/ombqueuehandler.php
@@ -67,7 +67,7 @@ ini_set("max_input_time", "0");
set_time_limit(0);
mb_internal_encoding('UTF-8');
-$id = ($argc > 1) ? $argv[1] : NULL;
+$id = ($argc > 1) ? $argv[1] : null;
$handler = new OmbQueueHandler($id);
diff --git a/scripts/smsqueuehandler.php b/scripts/smsqueuehandler.php
index f17429d96..f8b2e9d53 100755
--- a/scripts/smsqueuehandler.php
+++ b/scripts/smsqueuehandler.php
@@ -57,7 +57,7 @@ ini_set("max_input_time", "0");
set_time_limit(0);
mb_internal_encoding('UTF-8');
-$id = ($argc > 1) ? $argv[1] : NULL;
+$id = ($argc > 1) ? $argv[1] : null;
$handler = new SmsQueueHandler($id);
diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php
index 454616ca0..9e177b3fa 100755
--- a/scripts/xmppconfirmhandler.php
+++ b/scripts/xmppconfirmhandler.php
@@ -101,8 +101,8 @@ class XmppConfirmHandler extends XmppQueueHandler {
function next_confirm() {
$confirm = new Confirm_address();
- $confirm->whereAdd('claimed IS NULL');
- $confirm->whereAdd('sent IS NULL');
+ $confirm->whereAdd('claimed IS null');
+ $confirm->whereAdd('sent IS null');
# XXX: eventually we could do other confirmations in the queue, too
$confirm->address_type = 'jabber';
$confirm->orderBy('modified DESC');
@@ -122,12 +122,12 @@ class XmppConfirmHandler extends XmppQueueHandler {
return false;
}
}
- return NULL;
+ return null;
}
function clear_old_confirm_claims() {
$confirm = new Confirm();
- $confirm->claimed = NULL;
+ $confirm->claimed = null;
$confirm->whereAdd('now() - claimed > '.CLAIM_TIMEOUT);
$confirm->update(DB_DATAOBJECT_WHEREADD_ONLY);
$confirm->free();
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;