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:
Evan Prodromou
2008-12-23 14:21:29 -05:00
parent edbc0c665c
commit eb2f9c98ac
219 changed files with 2170 additions and 28881 deletions

View File

@@ -21,7 +21,7 @@ class Avatar extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Avatar',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Avatar',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -72,7 +72,7 @@ class Avatar extends Memcached_DataObject
if ($scaled->insert()) {
return $scaled;
} else {
return NULL;
return null;
}
}
@@ -85,7 +85,7 @@ class Avatar extends Memcached_DataObject
} else if ($this->mediatype == 'image/png') {
return imagecreatefrompng($filepath);
} else {
return NULL;
return null;
}
}

View File

@@ -38,13 +38,13 @@ class Channel {
}
function source() {
return NULL;
return null;
}
}
class XMPPChannel extends Channel {
var $conn = NULL;
var $conn = null;
function source() {
return 'xmpp';
@@ -111,7 +111,7 @@ class WebChannel extends Channel {
# XXX: even better, redirect to appropriate page
# depending on what command was run
common_show_header(_('Command results'));
common_element('p', NULL, $text);
common_element('p', null, $text);
common_show_footer();
}
@@ -149,13 +149,13 @@ class AjaxWebChannel extends WebChannel {
class MailChannel extends Channel {
var $addr = NULL;
var $addr = null;
function source() {
return 'mail';
}
function __construct($addr=NULL) {
function __construct($addr=null) {
$this->addr = $addr;
}

View File

@@ -23,9 +23,9 @@ require_once(INSTALLDIR.'/classes/Channel.php');
class Command {
var $user = NULL;
var $user = null;
function __construct($user=NULL) {
function __construct($user=null) {
$this->user = $user;
}
@@ -47,7 +47,7 @@ class TrackOffCommand extends UnimplementedCommand {
}
class TrackCommand extends UnimplementedCommand {
var $word = NULL;
var $word = null;
function __construct($user, $word) {
parent::__construct($user);
$this->word = $word;
@@ -55,7 +55,7 @@ class TrackCommand extends UnimplementedCommand {
}
class UntrackCommand extends UnimplementedCommand {
var $word = NULL;
var $word = null;
function __construct($user, $word) {
parent::__construct($user);
$this->word = $word;
@@ -63,7 +63,7 @@ class UntrackCommand extends UnimplementedCommand {
}
class NudgeCommand extends UnimplementedCommand {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
$this->other = $other;
@@ -71,7 +71,7 @@ class NudgeCommand extends UnimplementedCommand {
}
class InviteCommand extends UnimplementedCommand {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
$this->other = $other;
@@ -104,7 +104,7 @@ class StatsCommand extends Command {
class FavCommand extends Command {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
@@ -148,7 +148,7 @@ class FavCommand extends Command {
}
class WhoisCommand extends Command {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
$this->other = $other;
@@ -182,8 +182,8 @@ class WhoisCommand extends Command {
}
class MessageCommand extends Command {
var $other = NULL;
var $text = NULL;
var $other = null;
var $text = null;
function __construct($user, $other, $text) {
parent::__construct($user);
$this->other = $other;
@@ -225,7 +225,7 @@ class MessageCommand extends Command {
class GetCommand extends Command {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
@@ -255,7 +255,7 @@ class GetCommand extends Command {
class SubCommand extends Command {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
@@ -281,7 +281,7 @@ class SubCommand extends Command {
class UnsubCommand extends Command {
var $other = NULL;
var $other = null;
function __construct($user, $other) {
parent::__construct($user);
@@ -305,8 +305,8 @@ class UnsubCommand extends Command {
}
class OffCommand extends Command {
var $other = NULL;
function __construct($user, $other=NULL) {
var $other = null;
function __construct($user, $other=null) {
parent::__construct($user);
$this->other = $other;
}
@@ -324,8 +324,8 @@ class OffCommand extends Command {
}
class OnCommand extends Command {
var $other = NULL;
function __construct($user, $other=NULL) {
var $other = null;
function __construct($user, $other=null) {
parent::__construct($user);
$this->other = $other;
}

View File

@@ -37,14 +37,14 @@ class CommandInterpreter {
switch(strtolower($cmd)) {
case 'help':
if ($arg) {
return NULL;
return null;
}
return new HelpCommand($user);
case 'on':
if ($arg) {
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new OnCommand($user, $other);
}
@@ -55,7 +55,7 @@ class CommandInterpreter {
if ($arg) {
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new OffCommand($user, $other);
}
@@ -65,105 +65,105 @@ class CommandInterpreter {
case 'stop':
case 'quit':
if ($arg) {
return NULL;
return null;
} else {
return new OffCommand($user);
}
case 'follow':
case 'sub':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new SubCommand($user, $other);
}
case 'leave':
case 'unsub':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new UnsubCommand($user, $other);
}
case 'get':
case 'last':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new GetCommand($user, $other);
}
case 'd':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if (!$extra) {
return NULL;
return null;
} else {
return new MessageCommand($user, $other, $extra);
}
case 'whois':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new WhoisCommand($user, $other);
}
case 'fav':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new FavCommand($user, $other);
}
case 'nudge':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new NudgeCommand($user, $other);
}
case 'stats':
if ($arg) {
return NULL;
return null;
}
return new StatsCommand($user);
case 'invite':
if (!$arg) {
return NULL;
return null;
}
list($other, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else {
return new InviteCommand($user, $other);
}
case 'track':
if (!$arg) {
return NULL;
return null;
}
list($word, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else if ($word == 'off') {
return new TrackOffCommand($user);
} else {
@@ -171,11 +171,11 @@ class CommandInterpreter {
}
case 'untrack':
if (!$arg) {
return NULL;
return null;
}
list($word, $extra) = explode(' ', $arg, 2);
if ($extra) {
return NULL;
return null;
} else if ($word == 'all') {
return new TrackOffCommand($user);
} else {
@@ -184,7 +184,7 @@ class CommandInterpreter {
case 'tracks':
case 'tracking':
if ($arg) {
return NULL;
return null;
}
return new TrackingCommand($user);
default:

View File

@@ -20,7 +20,7 @@ class Confirm_address extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Confirm_address',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Confirm_address',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -16,7 +16,7 @@ class Consumer extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Consumer',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Consumer',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -15,7 +15,7 @@ class Fave extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Fave',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Fave',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -21,7 +21,7 @@ class Foreign_link extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Foreign_link',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Foreign_link',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -38,7 +38,7 @@ class Foreign_link extends Memcached_DataObject
return $flink;
}
return NULL;
return null;
}
static function getByForeignID($foreign_id, $service) {
@@ -51,7 +51,7 @@ class Foreign_link extends Memcached_DataObject
return $flink;
}
return NULL;
return null;
}
# Convenience methods
@@ -66,7 +66,7 @@ class Foreign_link extends Memcached_DataObject
return $fuser;
}
return NULL;
return null;
}
function getUser() {

View File

@@ -17,7 +17,7 @@ class Foreign_service extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Foreign_service',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Foreign_service',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -16,7 +16,7 @@ class Foreign_subscription extends Memcached_DataObject
public $created; // datetime() not_null
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Foreign_subscription',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Foreign_subscription',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -18,7 +18,7 @@ class Foreign_user extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Foreign_user',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Foreign_user',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -36,7 +36,7 @@ class Foreign_user extends Memcached_DataObject
return $fuser;
}
return NULL;
return null;
}
function updateKeys(&$orig) {

View File

@@ -17,7 +17,7 @@ class Invitation extends Memcached_DataObject
public $created; // datetime() not_null
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Invitation',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Invitation',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -23,7 +23,7 @@ require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
class Memcached_DataObject extends DB_DataObject
{
function &staticGet($cls, $k, $v=NULL) {
function &staticGet($cls, $k, $v=null) {
if (is_null($v)) {
$v = $k;
# XXX: HACK!
@@ -56,7 +56,7 @@ class Memcached_DataObject extends DB_DataObject
if ($i->find(true)) {
$i->encache();
} else {
$i = NULL;
$i = null;
}
return $i;
}
@@ -67,7 +67,7 @@ class Memcached_DataObject extends DB_DataObject
return $result;
}
function update($orig=NULL) {
function update($orig=null) {
if (is_object($orig) && $orig instanceof Memcached_DataObject) {
$orig->decache(); # might be different keys
}

View File

@@ -22,7 +22,7 @@ class Message extends Memcached_DataObject
public $source; // varchar(32)
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Message',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Message',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -18,7 +18,7 @@ class Nonce extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Nonce',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Nonce',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -48,7 +48,7 @@ class Notice extends Memcached_DataObject
public $source; // varchar(32)
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Notice',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Notice',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -91,7 +91,7 @@ class Notice extends Memcached_DataObject
return true;
}
static function saveNew($profile_id, $content, $source=NULL, $is_local=1, $reply_to=NULL, $uri=NULL) {
static function saveNew($profile_id, $content, $source=null, $is_local=1, $reply_to=null, $uri=null) {
$profile = Profile::staticGet($profile_id);
@@ -293,7 +293,7 @@ class Notice extends Memcached_DataObject
# XXX: too many args; we need to move to named params or even a separate
# class for notice streams
static function getStream($qry, $cachekey, $offset=0, $limit=20, $since_id=0, $before_id=0, $order=NULL, $since=NULL) {
static function getStream($qry, $cachekey, $offset=0, $limit=20, $since_id=0, $before_id=0, $order=null, $since=null) {
if (common_config('memcached', 'enabled')) {
@@ -383,7 +383,7 @@ class Notice extends Memcached_DataObject
# If outside our cache window, just go to the DB
if ($offset + $limit > NOTICE_CACHE_WINDOW) {
return Notice::getStreamDirect($qry, $offset, $limit, NULL, NULL, $order, NULL);
return Notice::getStreamDirect($qry, $offset, $limit, null, null, $order, null);
}
# Get the cache; if we can't, just go to the DB
@@ -391,7 +391,7 @@ class Notice extends Memcached_DataObject
$cache = common_memcache();
if (!$cache) {
return Notice::getStreamDirect($qry, $offset, $limit, NULL, NULL, $order, NULL);
return Notice::getStreamDirect($qry, $offset, $limit, null, null, $order, null);
}
# Get the notices out of the cache
@@ -423,7 +423,7 @@ class Notice extends Memcached_DataObject
# bet with our DB.
$new_notice = Notice::getStreamDirect($qry, 0, NOTICE_CACHE_WINDOW,
$last_id, NULL, $order, NULL);
$last_id, null, $order, null);
if ($new_notice) {
$new_notices = array();
@@ -447,7 +447,7 @@ class Notice extends Memcached_DataObject
# Otherwise, get the full cache window out of the DB
$notice = Notice::getStreamDirect($qry, 0, NOTICE_CACHE_WINDOW, NULL, NULL, $order, NULL);
$notice = Notice::getStreamDirect($qry, 0, NOTICE_CACHE_WINDOW, null, null, $order, null);
# If there are no hits, just return the value
@@ -477,7 +477,7 @@ class Notice extends Memcached_DataObject
return $wrapper;
}
function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0, $since=NULL) {
function publicStream($offset=0, $limit=20, $since_id=0, $before_id=0, $since=null) {
$parts = array();
@@ -496,7 +496,7 @@ class Notice extends Memcached_DataObject
return Notice::getStream($qry,
'public',
$offset, $limit, $since_id, $before_id, NULL, $since);
$offset, $limit, $since_id, $before_id, null, $since);
}
function addToInboxes() {

View File

@@ -35,7 +35,7 @@ class NoticeWrapper extends Notice {
public $is_local; // tinyint(1)
public $source; // varchar(32)
var $notices = NULL;
var $notices = null;
var $i = -1;
function __construct($arr) {

View File

@@ -33,7 +33,7 @@ class Notice_inbox extends Memcached_DataObject
public $source; // tinyint(1) default_1
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Notice_inbox',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Notice_inbox',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -17,7 +17,7 @@ class Notice_source extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Notice_source',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Notice_source',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -30,7 +30,7 @@ class Notice_tag extends Memcached_DataObject
public $created; // datetime() not_null
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Notice_tag',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Notice_tag',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -41,12 +41,12 @@ class Profile extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Profile',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
function getAvatar($width, $height=NULL) {
function getAvatar($width, $height=null) {
if (is_null($height)) {
$height = $width;
}
@@ -62,7 +62,7 @@ class Profile extends Memcached_DataObject
if ($avatar->find(true)) {
return $avatar;
} else {
return NULL;
return null;
}
}
@@ -71,12 +71,12 @@ class Profile extends Memcached_DataObject
$info = @getimagesize($source);
if (!$info) {
return NULL;
return null;
}
$filename = common_avatar_filename($this->id,
image_type_to_extension($info[2]),
NULL, common_timestamp());
null, common_timestamp());
$filepath = common_avatar_path($filename);
copy($source, $filepath);
@@ -96,12 +96,12 @@ class Profile extends Memcached_DataObject
if (!$this->delete_avatars()) {
@unlink($filepath);
return NULL;
return null;
}
if (!$avatar->insert()) {
@unlink($filepath);
return NULL;
return null;
}
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
@@ -109,7 +109,7 @@ class Profile extends Memcached_DataObject
if (!($avatar->width == $size && $avatar->height == $size)) {
$s = $avatar->scale($size);
if (!$s) {
return NULL;
return null;
}
}
}
@@ -132,7 +132,7 @@ class Profile extends Memcached_DataObject
}
# Get latest notice on or before date; default now
function getCurrentNotice($dt=NULL) {
function getCurrentNotice($dt=null) {
$notice = new Notice();
$notice->profile_id = $this->id;
if ($dt) {
@@ -143,7 +143,7 @@ class Profile extends Memcached_DataObject
if ($notice->find(true)) {
return $notice;
}
return NULL;
return null;
}
function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0) {

View File

@@ -36,7 +36,7 @@ class Profile_block extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile_block',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Profile_block',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -16,7 +16,7 @@ class Profile_tag extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Profile_tag',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Profile_tag',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -16,7 +16,7 @@ class Queue_item extends Memcached_DataObject
public $claimed; // datetime()
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Queue_item',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Queue_item',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -28,7 +28,7 @@ class Queue_item extends Memcached_DataObject
$qi = new Queue_item();
$qi->transport = $transport;
$qi->orderBy('created');
$qi->whereAdd('claimed is NULL');
$qi->whereAdd('claimed is null');
$qi->limit(1);
@@ -36,7 +36,7 @@ class Queue_item extends Memcached_DataObject
if ($cnt) {
# XXX: potential race condition
# can we force it to only update if claimed is still NULL
# can we force it to only update if claimed is still null
# (or old)?
common_log(LOG_INFO, 'claiming queue item = ' . $qi->notice_id . ' for transport ' . $transport);
$orig = clone($qi);
@@ -49,7 +49,7 @@ class Queue_item extends Memcached_DataObject
common_log(LOG_INFO, 'claim failed.');
}
}
$qi = NULL;
return NULL;
$qi = null;
return null;
}
}

View File

@@ -15,7 +15,7 @@ class Remember_me extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Remember_me',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Remember_me',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -38,7 +38,7 @@ class Remote_profile extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Remote_profile',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Remote_profile',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -16,7 +16,7 @@ class Reply extends Memcached_DataObject
public $replied_id; // int(4)
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Reply',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Reply',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -17,7 +17,7 @@ class Sms_carrier extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Sms_carrier',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Sms_carrier',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -40,7 +40,7 @@ class Subscription extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Subscription',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Subscription',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -19,7 +19,7 @@ class Token extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Token',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('Token',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE

View File

@@ -62,7 +62,7 @@ class User extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('User',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('User',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
@@ -118,10 +118,10 @@ class User extends Memcached_DataObject
return !in_array($nickname, $merged);
}
function getCurrentNotice($dt=NULL) {
function getCurrentNotice($dt=null) {
$profile = $this->getProfile();
if (!$profile) {
return NULL;
return null;
}
return $profile->getCurrentNotice($dt);
}
@@ -336,20 +336,20 @@ class User extends Memcached_DataObject
return $user;
}
function getReplies($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=NULL) {
function getReplies($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null) {
$qry =
'SELECT notice.* ' .
'FROM notice JOIN reply ON notice.id = reply.notice_id ' .
'WHERE reply.profile_id = %d ';
return Notice::getStream(sprintf($qry, $this->id),
'user:replies:'.$this->id,
$offset, $limit, $since_id, $before_id, NULL, $since);
$offset, $limit, $since_id, $before_id, null, $since);
}
function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=NULL) {
function getNotices($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null) {
$profile = $this->getProfile();
if (!$profile) {
return NULL;
return null;
} else {
return $profile->getNotices($offset, $limit, $since_id, $before_id);
}
@@ -365,7 +365,7 @@ class User extends Memcached_DataObject
$offset, $limit);
}
function noticesWithFriends($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=NULL) {
function noticesWithFriends($offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $before_id=0, $since=null) {
$enabled = common_config('inboxes', 'enabled');
# Complicated code, depending on whether we support inboxes yet
@@ -377,7 +377,7 @@ class User extends Memcached_DataObject
'SELECT notice.* ' .
'FROM notice JOIN subscription ON notice.profile_id = subscription.subscribed ' .
'WHERE subscription.subscriber = %d ';
$order = NULL;
$order = null;
} else if ($enabled === true ||
($enabled == 'transitional' && $this->inboxed == 1)) {

View File

@@ -17,7 +17,7 @@ class User_openid extends Memcached_DataObject
public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP
/* Static get */
function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('User_openid',$k,$v); }
function staticGet($k,$v=null) { return Memcached_DataObject::staticGet('User_openid',$k,$v); }
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE