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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
@@ -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.');
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -35,7 +35,7 @@ set_error_handler('common_error_handler');
|
||||
|
||||
class JabberQueueHandler extends XmppQueueHandler {
|
||||
|
||||
var $conn = NULL;
|
||||
var $conn = null;
|
||||
|
||||
function transport() {
|
||||
return 'jabber';
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user