diff options
Diffstat (limited to '_darcs/pristine')
108 files changed, 463 insertions, 463 deletions
diff --git a/_darcs/pristine/actions/allrss.php b/_darcs/pristine/actions/allrss.php index d28fcea49..851cd0ad5 100644 --- a/_darcs/pristine/actions/allrss.php +++ b/_darcs/pristine/actions/allrss.php @@ -25,7 +25,7 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); class AllrssAction extends Rss10Action { - var $user = NULL; + var $user = null; function init() { $nickname = $this->trimmed('nickname'); @@ -69,9 +69,9 @@ class AllrssAction extends Rss10Action { $user = $this->user; $profile = $user->getProfile(); if (!$profile) { - return NULL; + return null; } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - return ($avatar) ? $avatar->url : NULL; + return ($avatar) ? $avatar->url : null; } }
\ No newline at end of file diff --git a/_darcs/pristine/actions/api.php b/_darcs/pristine/actions/api.php index e03961e21..e7646a7bb 100644 --- a/_darcs/pristine/actions/api.php +++ b/_darcs/pristine/actions/api.php @@ -152,8 +152,8 @@ class ApiAction extends Action { header('Content-Type: application/xml; charset=utf-8'); common_start_xml(); common_element_start('hash'); - common_element('error', NULL, $msg); - common_element('request', NULL, $_SERVER['REQUEST_URI']); + common_element('error', null, $msg); + common_element('request', null, $_SERVER['REQUEST_URI']); common_element_end('hash'); common_end_xml(); } else if ($this->content_type == 'json') { diff --git a/_darcs/pristine/actions/block.php b/_darcs/pristine/actions/block.php index 20ba81edb..cfcd29848 100644 --- a/_darcs/pristine/actions/block.php +++ b/_darcs/pristine/actions/block.php @@ -21,7 +21,7 @@ if (!defined('LACONICA')) { exit(1); } class BlockAction extends Action { - var $profile = NULL; + var $profile = null; function prepare($args) { @@ -77,7 +77,7 @@ class BlockAction extends Action { common_show_header(_('Block user')); - common_element('p', NULL, + common_element('p', null, _('Are you sure you want to block this user? '. 'Afterwards, they will be unsubscribed from you, '. 'unable to subscribe to you in the future, and '. diff --git a/_darcs/pristine/actions/confirmaddress.php b/_darcs/pristine/actions/confirmaddress.php index 9d97c8205..562b70fe9 100644 --- a/_darcs/pristine/actions/confirmaddress.php +++ b/_darcs/pristine/actions/confirmaddress.php @@ -88,7 +88,7 @@ class ConfirmaddressAction extends Action { $cur->query('COMMIT'); common_show_header(_('Confirm Address')); - common_element('p', NULL, + common_element('p', null, sprintf(_('The address "%s" has been confirmed for your account.'), $cur->$type)); common_show_footer(); } diff --git a/_darcs/pristine/actions/deletenotice.php b/_darcs/pristine/actions/deletenotice.php index ba348c5fa..0777918d2 100644 --- a/_darcs/pristine/actions/deletenotice.php +++ b/_darcs/pristine/actions/deletenotice.php @@ -41,7 +41,7 @@ class DeletenoticeAction extends DeleteAction { return _('Delete notice'); } - function show_form($error=NULL) { + function show_form($error=null) { $user = common_current_user(); common_show_header($this->get_title(), array($this, 'show_header'), $error, @@ -91,7 +91,7 @@ class DeletenoticeAction extends DeleteAction { $notice->delete(); } else { if ($url) { - common_set_returnto(NULL); + common_set_returnto(null); } else { $url = common_local_url('public'); } diff --git a/_darcs/pristine/actions/deleteprofile.php b/_darcs/pristine/actions/deleteprofile.php index 29797bc76..503b3666d 100644 --- a/_darcs/pristine/actions/deleteprofile.php +++ b/_darcs/pristine/actions/deleteprofile.php @@ -36,9 +36,9 @@ class DeleteprofileAction extends Action { return _('Export and delete your user information.'); } - function form_header($title, $msg=NULL, $success=false) { + function form_header($title, $msg=null, $success=false) { common_show_header($title, - NULL, + null, array($msg, $success), array($this, 'show_top')); } @@ -84,9 +84,9 @@ class DeleteprofileAction extends Action { common_element_end('li'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $this->form_header(_('Delete my account'), $msg, $success); - common_element('h2', NULL, _('Delete my account confirmation')); + common_element('h2', null, _('Delete my account confirmation')); $this->show_confirm_delete_form(); common_show_footer(); } @@ -213,7 +213,7 @@ class DeleteprofileAction extends Action { $n_users_deleted = $user->delete(); // logout and redirect to public - common_set_user(NULL); + common_set_user(null); common_real_login(false); # not logged in common_forgetme(); # don't log back in! common_redirect(common_local_url('public')); diff --git a/_darcs/pristine/actions/emailsettings.php b/_darcs/pristine/actions/emailsettings.php index b77817c8e..06b3ef29f 100644 --- a/_darcs/pristine/actions/emailsettings.php +++ b/_darcs/pristine/actions/emailsettings.php @@ -27,7 +27,7 @@ class EmailsettingsAction extends SettingsAction { return _('Manage how you get email from %%site.name%%.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); $this->form_header(_('Email Settings'), $msg, $success); common_element_start('form', array('method' => 'post', @@ -36,7 +36,7 @@ class EmailsettingsAction extends SettingsAction { common_local_url('emailsettings'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, _('Address')); + common_element('h2', null, _('Address')); if ($user->email) { common_element_start('p'); @@ -58,14 +58,14 @@ class EmailsettingsAction extends SettingsAction { common_submit('cancel', _('Cancel')); } else { common_input('email', _('Email Address'), - ($this->arg('email')) ? $this->arg('email') : NULL, + ($this->arg('email')) ? $this->arg('email') : null, _('Email address, like "UserName@example.org"')); common_submit('add', _('Add')); } } if ($user->email) { - common_element('h2', NULL, _('Incoming email')); + common_element('h2', null, _('Incoming email')); if ($user->incomingemail) { common_element_start('p'); @@ -83,7 +83,7 @@ class EmailsettingsAction extends SettingsAction { common_submit('newincoming', _('New')); } - common_element('h2', NULL, _('Preferences')); + common_element('h2', null, _('Preferences')); common_checkbox('emailnotifysub', _('Send me notices of new subscriptions through email.'), @@ -118,7 +118,7 @@ class EmailsettingsAction extends SettingsAction { if ($confirm->find(TRUE)) { return $confirm; } else { - return NULL; + return null; } } @@ -273,7 +273,7 @@ class EmailsettingsAction extends SettingsAction { $user->query('BEGIN'); $original = clone($user); - $user->email = NULL; + $user->email = null; $result = $user->updateKeys($original); if (!$result) { common_log_db_error($user, 'UPDATE', __FILE__); @@ -294,7 +294,7 @@ class EmailsettingsAction extends SettingsAction { } $orig = clone($user); - $user->incomingemail = NULL; + $user->incomingemail = null; if (!$user->updateKeys($orig)) { common_log_db_error($user, 'UPDATE', __FILE__); diff --git a/_darcs/pristine/actions/favorited.php b/_darcs/pristine/actions/favorited.php index 6a465df96..e69630d50 100644 --- a/_darcs/pristine/actions/favorited.php +++ b/_darcs/pristine/actions/favorited.php @@ -29,7 +29,7 @@ class FavoritedAction extends StreamAction { $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; common_show_header(_('Popular notices'), - array($this, 'show_header'), NULL, + array($this, 'show_header'), null, array($this, 'show_top')); $this->show_notices($page); diff --git a/_darcs/pristine/actions/favoritesrss.php b/_darcs/pristine/actions/favoritesrss.php index 642d4f880..7071812d7 100644 --- a/_darcs/pristine/actions/favoritesrss.php +++ b/_darcs/pristine/actions/favoritesrss.php @@ -25,7 +25,7 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); class FavoritesrssAction extends Rss10Action { - var $user = NULL; + var $user = null; function init() { $nickname = $this->trimmed('nickname'); @@ -68,6 +68,6 @@ class FavoritesrssAction extends Rss10Action { } function get_image() { - return NULL; + return null; } }
\ No newline at end of file diff --git a/_darcs/pristine/actions/featured.php b/_darcs/pristine/actions/featured.php index 2ff4f7745..f478a4017 100644 --- a/_darcs/pristine/actions/featured.php +++ b/_darcs/pristine/actions/featured.php @@ -30,7 +30,7 @@ class FeaturedAction extends StreamAction { $page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; common_show_header(_('Featured users'), - array($this, 'show_header'), NULL, + array($this, 'show_header'), null, array($this, 'show_top')); $this->show_notices($page); diff --git a/_darcs/pristine/actions/finishaddopenid.php b/_darcs/pristine/actions/finishaddopenid.php index 07024e091..7607688de 100644 --- a/_darcs/pristine/actions/finishaddopenid.php +++ b/_darcs/pristine/actions/finishaddopenid.php @@ -97,7 +97,7 @@ class FinishaddopenidAction extends Action { function message($msg) { common_show_header(_('OpenID Login')); - common_element('p', NULL, $msg); + common_element('p', null, $msg); common_show_footer(); } } diff --git a/_darcs/pristine/actions/finishopenidlogin.php b/_darcs/pristine/actions/finishopenidlogin.php index a2a778f31..ae5b136a2 100644 --- a/_darcs/pristine/actions/finishopenidlogin.php +++ b/_darcs/pristine/actions/finishopenidlogin.php @@ -52,7 +52,7 @@ class FinishopenidloginAction extends Action { } } - function show_top($error=NULL) { + function show_top($error=null) { if ($error) { common_element('div', array('class' => 'error'), $error); } else { @@ -62,17 +62,17 @@ class FinishopenidloginAction extends Action { } } - function show_form($error=NULL, $username=NULL) { - common_show_header(_('OpenID Account Setup'), NULL, $error, + function show_form($error=null, $username=null) { + common_show_header(_('OpenID Account Setup'), null, $error, array($this, 'show_top')); common_element_start('form', array('method' => 'post', 'id' => 'account_connect', 'action' => common_local_url('finishopenidlogin'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, + common_element('h2', null, _('Create new account')); - common_element('p', NULL, + common_element('p', null, _('Create a new user with this nickname.')); common_input('newname', _('New nickname'), ($username) ? $username : '', @@ -88,9 +88,9 @@ class FinishopenidloginAction extends Action { common_text(_(' except this private data: password, email address, IM address, phone number.')); common_element_end('p'); common_submit('create', _('Create')); - common_element('h2', NULL, + common_element('h2', null, _('Connect existing account')); - common_element('p', NULL, + common_element('p', null, _('If you already have an account, login with your username and password to connect it to your OpenID.')); common_input('nickname', _('Existing nickname')); common_password('password', _('Password')); @@ -141,14 +141,14 @@ class FinishopenidloginAction extends Action { $this->go_home($user->nickname); } else { $this->save_values($display, $canonical, $sreg); - $this->show_form(NULL, $this->best_new_nickname($display, $sreg)); + $this->show_form(null, $this->best_new_nickname($display, $sreg)); } } } function message($msg) { common_show_header(_('OpenID Login')); - common_element('p', NULL, $msg); + common_element('p', null, $msg); common_show_footer(); } @@ -290,7 +290,7 @@ class FinishopenidloginAction extends Action { $url = common_get_returnto(); if ($url) { # We don't have to return to it again - common_set_returnto(NULL); + common_set_returnto(null); } else { $url = common_local_url('all', array('nickname' => @@ -329,7 +329,7 @@ class FinishopenidloginAction extends Action { # XXX: others? - return NULL; + return null; } function is_new_nickname($str) { @@ -369,7 +369,7 @@ class FinishopenidloginAction extends Action { foreach ($bad as $badpart) { if (array_key_exists($badpart, $parts)) { - return NULL; + return null; } } @@ -403,14 +403,14 @@ class FinishopenidloginAction extends Action { } } - return NULL; + return null; } function xri_to_nickname($xri) { $base = $this->xri_base($xri); if (!$base) { - return NULL; + return null; } else { # =evan.prodromou # or @gratis*evan.prodromou diff --git a/_darcs/pristine/actions/finishremotesubscribe.php b/_darcs/pristine/actions/finishremotesubscribe.php index c3387cf02..edd4ae541 100644 --- a/_darcs/pristine/actions/finishremotesubscribe.php +++ b/_darcs/pristine/actions/finishremotesubscribe.php @@ -278,7 +278,7 @@ class FinishremotesubscribeAction extends Action { common_debug('got result: "'.print_r($result,TRUE).'"', __FILE__); if ($result->status != 200) { - return NULL; + return null; } parse_str($result->body, $return); diff --git a/_darcs/pristine/actions/foaf.php b/_darcs/pristine/actions/foaf.php index 310ba2c19..218e20f5f 100644 --- a/_darcs/pristine/actions/foaf.php +++ b/_darcs/pristine/actions/foaf.php @@ -66,21 +66,21 @@ class FoafAction extends Action { # XXX: might not be a person common_element_start('Person', array('rdf:about' => $user->uri)); - common_element('mbox_sha1sum', NULL, sha1('mailto:' . $user->email)); + common_element('mbox_sha1sum', null, sha1('mailto:' . $user->email)); if ($profile->fullname) { - common_element('name', NULL, $profile->fullname); + common_element('name', null, $profile->fullname); } if ($profile->homepage) { common_element('homepage', array('rdf:resource' => $profile->homepage)); } if ($profile->bio) { - common_element('rdfs:comment', NULL, $profile->bio); + common_element('rdfs:comment', null, $profile->bio); } # XXX: more structured location data if ($profile->location) { common_element_start('based_near'); common_element_start('geo:SpatialThing'); - common_element('name', NULL, $profile->location); + common_element('name', null, $profile->location); common_element_end('geo:SpatialThing'); common_element_end('based_near'); } @@ -156,7 +156,7 @@ class FoafAction extends Action { common_element_end('Person'); foreach ($person as $uri => $p) { - $foaf_url = NULL; + $foaf_url = null; if ($p[1] instanceof User) { $foaf_url = common_local_url('foaf', array('nickname' => $p[1]->nickname)); } @@ -166,7 +166,7 @@ class FoafAction extends Action { common_element('knows', array('rdf:resource' => $user->uri)); } $this->show_microblogging_account($profile, ($p[1] instanceof User) ? - common_root_url() : NULL); + common_root_url() : null); if ($foaf_url) { common_element('rdfs:seeAlso', array('rdf:resource' => $foaf_url)); } @@ -186,7 +186,7 @@ class FoafAction extends Action { common_element_end('PersonalProfileDocument'); } - function show_microblogging_account($profile, $service=NULL) { + function show_microblogging_account($profile, $service=null) { # Their account common_element_start('holdsAccount'); common_element_start('OnlineAccount'); @@ -194,7 +194,7 @@ class FoafAction extends Action { common_element('accountServiceHomepage', array('rdf:resource' => $service)); } - common_element('accountName', NULL, $profile->nickname); + common_element('accountName', null, $profile->nickname); common_element('homepage', array('rdf:resource' => $profile->profileurl)); common_element_end('OnlineAccount'); common_element_end('holdsAccount'); diff --git a/_darcs/pristine/actions/imsettings.php b/_darcs/pristine/actions/imsettings.php index d0c47f7fd..8f546f8e7 100644 --- a/_darcs/pristine/actions/imsettings.php +++ b/_darcs/pristine/actions/imsettings.php @@ -28,7 +28,7 @@ class ImsettingsAction extends SettingsAction { return _('You can send and receive notices through Jabber/GTalk [instant messages](%%doc.im%%). Configure your address and settings below.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); $this->form_header(_('IM Settings'), $msg, $success); common_element_start('form', array('method' => 'post', @@ -37,7 +37,7 @@ class ImsettingsAction extends SettingsAction { common_local_url('imsettings'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, _('Address')); + common_element('h2', null, _('Address')); if ($user->jabber) { common_element_start('p'); @@ -59,13 +59,13 @@ class ImsettingsAction extends SettingsAction { common_submit('cancel', _('Cancel')); } else { common_input('jabber', _('IM Address'), - ($this->arg('jabber')) ? $this->arg('jabber') : NULL, + ($this->arg('jabber')) ? $this->arg('jabber') : null, sprintf(_('Jabber or GTalk address, like "UserName@example.org". First, make sure to add %s to your buddy list in your IM client or on GTalk.'), jabber_daemon_address())); common_submit('add', _('Add')); } } - common_element('h2', NULL, _('Preferences')); + common_element('h2', null, _('Preferences')); common_checkbox('jabbernotify', _('Send me notices through Jabber/GTalk.'), @@ -93,7 +93,7 @@ class ImsettingsAction extends SettingsAction { if ($confirm->find(TRUE)) { return $confirm; } else { - return NULL; + return null; } } @@ -244,7 +244,7 @@ class ImsettingsAction extends SettingsAction { $user->query('BEGIN'); $original = clone($user); - $user->jabber = NULL; + $user->jabber = null; $result = $user->updateKeys($original); if (!$result) { common_log_db_error($user, 'UPDATE', __FILE__); diff --git a/_darcs/pristine/actions/invite.php b/_darcs/pristine/actions/invite.php index e5cc6ad01..feef94d0f 100644 --- a/_darcs/pristine/actions/invite.php +++ b/_darcs/pristine/actions/invite.php @@ -85,49 +85,49 @@ class InviteAction extends Action { common_show_header(_('Invitation(s) sent')); if ($already) { - common_element('p', NULL, _('You are already subscribed to these users:')); + common_element('p', null, _('You are already subscribed to these users:')); common_element_start('ul'); foreach ($already as $other) { - common_element('li', NULL, sprintf(_('%s (%s)'), $other->nickname, $other->email)); + common_element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email)); } common_element_end('ul'); } if ($subbed) { - common_element('p', NULL, _('These people are already users and you were automatically subscribed to them:')); + common_element('p', null, _('These people are already users and you were automatically subscribed to them:')); common_element_start('ul'); foreach ($subbed as $other) { - common_element('li', NULL, sprintf(_('%s (%s)'), $other->nickname, $other->email)); + common_element('li', null, sprintf(_('%s (%s)'), $other->nickname, $other->email)); } common_element_end('ul'); } if ($sent) { - common_element('p', NULL, _('Invitation(s) sent to the following people:')); + common_element('p', null, _('Invitation(s) sent to the following people:')); common_element_start('ul'); foreach ($sent as $other) { - common_element('li', NULL, $other); + common_element('li', null, $other); } common_element_end('ul'); - common_element('p', NULL, _('You will be notified when your invitees accept the invitation and register on the site. Thanks for growing the community!')); + common_element('p', null, _('You will be notified when your invitees accept the invitation and register on the site. Thanks for growing the community!')); } common_show_footer(); } - function show_top($error=NULL) { + function show_top($error=null) { if ($error) { common_element('p', 'error', $error); } else { common_element_start('div', 'instructions'); - common_element('p', NULL, + common_element('p', null, _('Use this form to invite your friends and colleagues to use this service.')); common_element_end('div'); } } - function show_form($error=NULL) { + function show_form($error=null) { global $config; - common_show_header(_('Invite new users'), NULL, $error, array($this, 'show_top')); + common_show_header(_('Invite new users'), null, $error, array($this, 'show_top')); common_element_start('form', array('method' => 'post', 'id' => 'invite', diff --git a/_darcs/pristine/actions/login.php b/_darcs/pristine/actions/login.php index 5e4d45149..f3509519e 100644 --- a/_darcs/pristine/actions/login.php +++ b/_darcs/pristine/actions/login.php @@ -63,7 +63,7 @@ class LoginAction extends Action { $url = common_get_returnto(); if ($url) { # We don't have to return to it again - common_set_returnto(NULL); + common_set_returnto(null); } else { $url = common_local_url('all', array('nickname' => @@ -91,7 +91,7 @@ class LoginAction extends Action { $url = common_get_returnto(); if ($url) { # We don't have to return to it again - common_set_returnto(NULL); + common_set_returnto(null); } else { $url = common_local_url('all', array('nickname' => @@ -100,8 +100,8 @@ class LoginAction extends Action { common_redirect($url); } - function show_form($error=NULL) { - common_show_header(_('Login'), NULL, $error, array($this, 'show_top')); + function show_form($error=null) { + common_show_header(_('Login'), null, $error, array($this, 'show_top')); common_element_start('form', array('method' => 'post', 'id' => 'login', 'action' => common_local_url('login'))); @@ -138,7 +138,7 @@ class LoginAction extends Action { } } - function show_top($error=NULL) { + function show_top($error=null) { if ($error) { common_element('p', 'error', $error); } else { diff --git a/_darcs/pristine/actions/logout.php b/_darcs/pristine/actions/logout.php index 5f7b9d502..4c59e47ad 100644 --- a/_darcs/pristine/actions/logout.php +++ b/_darcs/pristine/actions/logout.php @@ -32,7 +32,7 @@ class LogoutAction extends Action { if (!common_logged_in()) { common_user_error(_('Not logged in.')); } else { - common_set_user(NULL); + common_set_user(null); common_real_login(false); # not logged in common_forgetme(); # don't log back in! common_redirect(common_local_url('public')); diff --git a/_darcs/pristine/actions/newmessage.php b/_darcs/pristine/actions/newmessage.php index 121fc4246..eb582c2a5 100644 --- a/_darcs/pristine/actions/newmessage.php +++ b/_darcs/pristine/actions/newmessage.php @@ -98,7 +98,7 @@ class NewmessageAction extends Action { common_message_form($content, $user, $to); } - function show_form($msg=NULL) { + function show_form($msg=null) { $content = $this->trimmed('content'); $user = common_current_user(); @@ -117,7 +117,7 @@ class NewmessageAction extends Action { return; } - common_show_header(_('New message'), NULL, + common_show_header(_('New message'), null, array($content, $user, $other), array($this, 'show_top')); diff --git a/_darcs/pristine/actions/newnotice.php b/_darcs/pristine/actions/newnotice.php index 7c3ad8815..98556c36b 100644 --- a/_darcs/pristine/actions/newnotice.php +++ b/_darcs/pristine/actions/newnotice.php @@ -78,7 +78,7 @@ class NewnoticeAction extends Action { $replyto = $this->trimmed('inreplyto'); - $notice = Notice::saveNew($user->id, $content, 'web', 1, ($replyto == 'false') ? NULL : $replyto); + $notice = Notice::saveNew($user->id, $content, 'web', 1, ($replyto == 'false') ? null : $replyto); if (is_string($notice)) { $this->show_form($notice); @@ -121,11 +121,11 @@ class NewnoticeAction extends Action { common_element_end('html'); } - function show_top($content=NULL) { - common_notice_form(NULL, $content); + function show_top($content=null) { + common_notice_form(null, $content); } - function show_form($msg=NULL) { + function show_form($msg=null) { if ($msg && $this->boolean('ajax')) { $this->ajax_error_msg($msg); return; @@ -138,7 +138,7 @@ class NewnoticeAction extends Action { $content = '@' . $profile->nickname . ' '; } } - common_show_header(_('New notice'), NULL, $content, + common_show_header(_('New notice'), null, $content, array($this, 'show_top')); if ($msg) { common_element('p', array('id' => 'error'), $msg); diff --git a/_darcs/pristine/actions/noticesearchrss.php b/_darcs/pristine/actions/noticesearchrss.php index a7df62ca0..d61234df8 100644 --- a/_darcs/pristine/actions/noticesearchrss.php +++ b/_darcs/pristine/actions/noticesearchrss.php @@ -65,6 +65,6 @@ class NoticesearchrssAction extends Rss10Action { } function get_image() { - return NULL; + return null; } } diff --git a/_darcs/pristine/actions/openidlogin.php b/_darcs/pristine/actions/openidlogin.php index 6192dfc34..1bf37f28f 100644 --- a/_darcs/pristine/actions/openidlogin.php +++ b/_darcs/pristine/actions/openidlogin.php @@ -52,7 +52,7 @@ class OpenidloginAction extends Action { } } else { $openid_url = oid_get_last(); - $this->show_form(NULL, $openid_url); + $this->show_form(null, $openid_url); } } @@ -60,7 +60,7 @@ class OpenidloginAction extends Action { return _('Login with an [OpenID](%%doc.openid%%) account.'); } - function show_top($error=NULL) { + function show_top($error=null) { if ($error) { common_element('div', array('class' => 'error'), $error); } else { @@ -72,8 +72,8 @@ class OpenidloginAction extends Action { } } - function show_form($error=NULL, $openid_url) { - common_show_header(_('OpenID Login'), NULL, $error, array($this, 'show_top')); + function show_form($error=null, $openid_url) { + common_show_header(_('OpenID Login'), null, $error, array($this, 'show_top')); $formaction = common_local_url('openidlogin'); common_element_start('form', array('method' => 'post', 'id' => 'openidlogin', diff --git a/_darcs/pristine/actions/openidsettings.php b/_darcs/pristine/actions/openidsettings.php index dd575bb73..9c0eda6f0 100644 --- a/_darcs/pristine/actions/openidsettings.php +++ b/_darcs/pristine/actions/openidsettings.php @@ -30,7 +30,7 @@ class OpenidsettingsAction extends SettingsAction { ' Manage your associated OpenIDs from here.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); @@ -41,8 +41,8 @@ class OpenidsettingsAction extends SettingsAction { 'action' => common_local_url('openidsettings'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, _('Add OpenID')); - common_element('p', NULL, + common_element('h2', null, _('Add OpenID')); + common_element('p', null, _('If you want to add an OpenID to your account, ' . 'enter it in the box below and click "Add".')); common_element_start('p'); @@ -66,11 +66,11 @@ class OpenidsettingsAction extends SettingsAction { if ($cnt > 0) { - common_element('h2', NULL, _('Remove OpenID')); + common_element('h2', null, _('Remove OpenID')); if ($cnt == 1 && !$user->password) { - common_element('p', NULL, + common_element('p', null, _('Removing your only OpenID would make it impossible to log in! ' . 'If you need to remove it, add another OpenID first.')); @@ -83,7 +83,7 @@ class OpenidsettingsAction extends SettingsAction { } else { - common_element('p', NULL, + common_element('p', null, _('You can remove an OpenID from your account '. 'by clicking the button marked "Remove".')); $idx = 0; diff --git a/_darcs/pristine/actions/opensearch.php b/_darcs/pristine/actions/opensearch.php index 707e929fb..dcde160a4 100644 --- a/_darcs/pristine/actions/opensearch.php +++ b/_darcs/pristine/actions/opensearch.php @@ -42,16 +42,16 @@ class OpensearchAction extends Action { common_element_start('OpenSearchDescription', array('xmlns' => 'http://a9.com/-/spec/opensearch/1.1/')); $short_name = common_config('site', 'name').' '.$short_name; - common_element('ShortName', NULL, $short_name); - common_element('Contact', NULL, common_config('site', 'email')); + common_element('ShortName', null, $short_name); + common_element('Contact', null, common_config('site', 'email')); common_element('Url', array('type' => 'text/html', 'method' => 'get', 'template' => str_replace('---', '{searchTerms}', common_local_url($type, array('q' => '---'))))); common_element('Image', array('height' => 16, 'width' => 16, 'type' => 'image/vnd.microsoft.icon'), common_path('favicon.ico')); common_element('Image', array('height' => 50, 'width' => 50, 'type' => 'image/png'), theme_path('logo.png')); - common_element('AdultContent', NULL, 'false'); - common_element('Language', NULL, common_language()); - common_element('OutputEncoding', NULL, 'UTF-8'); - common_element('InputEncoding', NULL, 'UTF-8'); + common_element('AdultContent', null, 'false'); + common_element('Language', null, common_language()); + common_element('OutputEncoding', null, 'UTF-8'); + common_element('InputEncoding', null, 'UTF-8'); common_element_end('OpenSearchDescription'); common_end_xml(); diff --git a/_darcs/pristine/actions/othersettings.php b/_darcs/pristine/actions/othersettings.php index 9b824cea2..1da6577cb 100644 --- a/_darcs/pristine/actions/othersettings.php +++ b/_darcs/pristine/actions/othersettings.php @@ -27,12 +27,12 @@ class OthersettingsAction extends SettingsAction { return _('Manage various other options.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); $this->form_header(_('Other Settings'), $msg, $success); - common_element('h2', NULL, _('URL Auto-shortening')); + common_element('h2', null, _('URL Auto-shortening')); common_element_start('form', array('method' => 'post', 'id' => 'othersettings', 'action' => @@ -57,7 +57,7 @@ class OthersettingsAction extends SettingsAction { common_element_end('form'); -// common_element('h2', NULL, _('Delete my account')); +// common_element('h2', null, _('Delete my account')); // $this->show_delete_form(); common_show_footer(); diff --git a/_darcs/pristine/actions/peoplesearch.php b/_darcs/pristine/actions/peoplesearch.php index f89de53f7..a52ac317f 100644 --- a/_darcs/pristine/actions/peoplesearch.php +++ b/_darcs/pristine/actions/peoplesearch.php @@ -68,8 +68,8 @@ class PeoplesearchAction extends SearchAction { class PeopleSearchResults extends ProfileList { - var $terms = NULL; - var $pattern = NULL; + var $terms = null; + var $pattern = null; function __construct($profile, $terms) { parent::__construct($profile); diff --git a/_darcs/pristine/actions/peopletag.php b/_darcs/pristine/actions/peopletag.php index f03a3c8af..0327ecbc2 100644 --- a/_darcs/pristine/actions/peopletag.php +++ b/_darcs/pristine/actions/peopletag.php @@ -43,7 +43,7 @@ class PeopletagAction extends Action { # Looks like we're good; show the header common_show_header(sprintf(_('Users self-tagged with %s - page %d'), $tag, $page), - NULL, $tag, array($this, 'show_top')); + null, $tag, array($this, 'show_top')); $this->show_people($tag, $page); @@ -94,7 +94,7 @@ class PeopletagAction extends Action { } function get_title() { - return NULL; + return null; } function show_header($arr) { diff --git a/_darcs/pristine/actions/profilesettings.php b/_darcs/pristine/actions/profilesettings.php index 3d92161ab..0fa1288dc 100644 --- a/_darcs/pristine/actions/profilesettings.php +++ b/_darcs/pristine/actions/profilesettings.php @@ -28,14 +28,14 @@ class ProfilesettingsAction extends SettingsAction { 'so people know more about you.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $this->form_header(_('Profile settings'), $msg, $success); $this->show_settings_form(); - common_element('h2', NULL, _('Avatar')); + common_element('h2', null, _('Avatar')); $this->show_avatar_form(); - common_element('h2', NULL, _('Change password')); + common_element('h2', null, _('Change password')); $this->show_password_form(); -// common_element('h2', NULL, _('Delete my account')); +// common_element('h2', null, _('Delete my account')); // $this->show_delete_form(); common_show_footer(); } diff --git a/_darcs/pristine/actions/public.php b/_darcs/pristine/actions/public.php index 422e4bc98..60238e54d 100644 --- a/_darcs/pristine/actions/public.php +++ b/_darcs/pristine/actions/public.php @@ -31,7 +31,7 @@ class PublicAction extends StreamAction { header('X-XRDS-Location: '. common_local_url('publicxrds')); common_show_header(_('Public timeline'), - array($this, 'show_header'), NULL, + array($this, 'show_header'), null, array($this, 'show_top')); # XXX: Public sidebar here? diff --git a/_darcs/pristine/actions/publicrss.php b/_darcs/pristine/actions/publicrss.php index fa86de1d9..764f0fae2 100644 --- a/_darcs/pristine/actions/publicrss.php +++ b/_darcs/pristine/actions/publicrss.php @@ -52,6 +52,6 @@ class PublicrssAction extends Rss10Action { } function get_image() { - return NULL; + return null; } }
\ No newline at end of file diff --git a/_darcs/pristine/actions/publicxrds.php b/_darcs/pristine/actions/publicxrds.php index ffd65c8c9..5e3349185 100644 --- a/_darcs/pristine/actions/publicxrds.php +++ b/_darcs/pristine/actions/publicxrds.php @@ -42,7 +42,7 @@ class PublicxrdsAction extends Action { 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', 'version' => '2.0')); - common_element('Type', NULL, 'xri://$xrds*simple'); + common_element('Type', null, 'xri://$xrds*simple'); foreach (array('finishopenidlogin', 'finishaddopenid', 'finishimmediate') as $finish) { $this->show_service(Auth_OpenID_RP_RETURN_TO_URL_TYPE, @@ -55,24 +55,24 @@ class PublicxrdsAction extends Action { common_end_xml(); } - function show_service($type, $uri, $params=NULL, $sigs=NULL, $localId=NULL) { + function show_service($type, $uri, $params=null, $sigs=null, $localId=null) { common_element_start('Service'); if ($uri) { - common_element('URI', NULL, $uri); + common_element('URI', null, $uri); } - common_element('Type', NULL, $type); + common_element('Type', null, $type); if ($params) { foreach ($params as $param) { - common_element('Type', NULL, $param); + common_element('Type', null, $param); } } if ($sigs) { foreach ($sigs as $sig) { - common_element('Type', NULL, $sig); + common_element('Type', null, $sig); } } if ($localId) { - common_element('LocalID', NULL, $localId); + common_element('LocalID', null, $localId); } common_element_end('Service'); } diff --git a/_darcs/pristine/actions/recoverpassword.php b/_darcs/pristine/actions/recoverpassword.php index 1263fee9b..068d582fa 100644 --- a/_darcs/pristine/actions/recoverpassword.php +++ b/_darcs/pristine/actions/recoverpassword.php @@ -132,12 +132,12 @@ class RecoverpasswordAction extends Action { unset($_SESSION['tempuser']); } - function show_top($msg=NULL) { + function show_top($msg=null) { if ($msg) { common_element('div', 'error', $msg); } else { common_element_start('div', 'instructions'); - common_element('p', NULL, + common_element('p', null, _('If you\'ve forgotten or lost your' . ' password, you can get a new one sent to' . ' the email address you have stored ' . @@ -146,7 +146,7 @@ class RecoverpasswordAction extends Action { } } - function show_password_top($msg=NULL) { + function show_password_top($msg=null) { if ($msg) { common_element('div', 'error', $msg); } else { @@ -156,9 +156,9 @@ class RecoverpasswordAction extends Action { } } - function show_form($msg=NULL) { + function show_form($msg=null) { - common_show_header(_('Recover password'), NULL, + common_show_header(_('Recover password'), null, $msg, array($this, 'show_top')); common_element_start('form', array('method' => 'post', @@ -173,9 +173,9 @@ class RecoverpasswordAction extends Action { common_show_footer(); } - function show_password_form($msg=NULL) { + function show_password_form($msg=null) { - common_show_header(_('Reset password'), NULL, + common_show_header(_('Reset password'), null, $msg, array($this, 'show_password_top')); common_element_start('form', array('method' => 'post', @@ -224,7 +224,7 @@ class RecoverpasswordAction extends Action { $confirm_email = Confirm_address::staticGet('user_id', $user->id); if ($confirm_email && $confirm_email->address_type != 'email') { # Skip non-email confirmations - $confirm_email = NULL; + $confirm_email = null; } } @@ -267,7 +267,7 @@ class RecoverpasswordAction extends Action { mail_to_user($user, _('Password recovery requested'), $body, $confirm->address); common_show_header(_('Password recovery requested')); - common_element('p', NULL, + common_element('p', null, _('Instructions for recovering your password ' . 'have been sent to the email address registered to your ' . 'account.')); @@ -324,7 +324,7 @@ class RecoverpasswordAction extends Action { common_real_login(true); common_show_header(_('Password saved.')); - common_element('p', NULL, _('New password successfully saved. ' . + common_element('p', null, _('New password successfully saved. ' . 'You are now logged in.')); common_show_footer(); } diff --git a/_darcs/pristine/actions/register.php b/_darcs/pristine/actions/register.php index 011aa3f09..f3eaf6122 100644 --- a/_darcs/pristine/actions/register.php +++ b/_darcs/pristine/actions/register.php @@ -149,7 +149,7 @@ class RegisterAction extends Action { return ($user !== false); } - function show_top($error=NULL) { + function show_top($error=null) { if ($error) { common_element('p', 'error', $error); } else { @@ -164,7 +164,7 @@ class RegisterAction extends Action { } } - function show_form($error=NULL) { + function show_form($error=null) { global $config; $code = $this->trimmed('code'); @@ -178,7 +178,7 @@ class RegisterAction extends Action { return; } - common_show_header(_('Register'), NULL, $error, array($this, 'show_top')); + common_show_header(_('Register'), null, $error, array($this, 'show_top')); common_element_start('form', array('method' => 'post', 'id' => 'login', 'action' => common_local_url('register'))); diff --git a/_darcs/pristine/actions/remotesubscribe.php b/_darcs/pristine/actions/remotesubscribe.php index 14e8cb068..be2cb1025 100644 --- a/_darcs/pristine/actions/remotesubscribe.php +++ b/_darcs/pristine/actions/remotesubscribe.php @@ -55,7 +55,7 @@ class RemotesubscribeAction extends Action { ' enter your profile URL below.'); } - function show_top($err=NULL) { + function show_top($err=null) { if ($err) { common_element('div', 'error', $err); } else { @@ -67,10 +67,10 @@ class RemotesubscribeAction extends Action { } } - function show_form($err=NULL) { + function show_form($err=null) { $nickname = $this->trimmed('nickname'); $profile = $this->trimmed('profile_url'); - common_show_header(_('Remote subscribe'), NULL, $err, + common_show_header(_('Remote subscribe'), null, $err, array($this, 'show_top')); # id = remotesubscribe conflicts with the # button on profile page @@ -153,7 +153,7 @@ class RemotesubscribeAction extends Action { } function get_user() { - $user = NULL; + $user = null; $nickname = $this->trimmed('nickname'); if ($nickname) { $user = User::staticGet('nickname', $nickname); @@ -173,7 +173,7 @@ class RemotesubscribeAction extends Action { $oauth_services = omb_get_services($xrds, OAUTH_DISCOVERY); if (!$oauth_services) { - return NULL; + return null; } $oauth_service = $oauth_services[0]; @@ -181,17 +181,17 @@ class RemotesubscribeAction extends Action { $oauth_xrd = $this->getXRD($oauth_service, $xrds); if (!$oauth_xrd) { - return NULL; + return null; } if (!$this->addServices($oauth_xrd, $oauth_endpoints, $omb)) { - return NULL; + return null; } $omb_services = omb_get_services($xrds, OMB_NAMESPACE); if (!$omb_services) { - return NULL; + return null; } $omb_service = $omb_services[0]; @@ -199,23 +199,23 @@ class RemotesubscribeAction extends Action { $omb_xrd = $this->getXRD($omb_service, $xrds); if (!$omb_xrd) { - return NULL; + return null; } if (!$this->addServices($omb_xrd, $omb_endpoints, $omb)) { - return NULL; + return null; } # XXX: check that we got all the services we needed foreach (array_merge($omb_endpoints, $oauth_endpoints) as $type) { if (!array_key_exists($type, $omb) || !$omb[$type]) { - return NULL; + return null; } } if (!omb_local_id($omb[OAUTH_ENDPOINT_REQUEST])) { - return NULL; + return null; } return $omb; @@ -225,7 +225,7 @@ class RemotesubscribeAction extends Action { $uri = omb_service_uri($main_service); if (strpos($uri, "#") !== 0) { # FIXME: more rigorous handling of external service definitions - return NULL; + return null; } $id = substr($uri, 1); $nodes = $main_xrds->allXrdNodes; @@ -239,7 +239,7 @@ class RemotesubscribeAction extends Action { return new Auth_Yadis_XRDS($parser, $bogus_nodes); } } - return NULL; + return null; } function addServices($xrd, $types, &$omb) { @@ -267,12 +267,12 @@ class RemotesubscribeAction extends Action { $params = array(); parse_str($parsed['query'], $params); - $req = OAuthRequest::from_consumer_and_token($con, NULL, "POST", $url, $params); + $req = OAuthRequest::from_consumer_and_token($con, null, "POST", $url, $params); $listener = omb_local_id($omb[OAUTH_ENDPOINT_REQUEST]); if (!$listener) { - return NULL; + return null; } $req->set_parameter('omb_listener', $listener); @@ -280,7 +280,7 @@ class RemotesubscribeAction extends Action { # XXX: test to see if endpoint accepts this signature method - $req->sign_request(omb_hmac_sha1(), $con, NULL); + $req->sign_request(omb_hmac_sha1(), $con, null); # We re-use this tool's fetcher, since it's pretty good @@ -291,7 +291,7 @@ class RemotesubscribeAction extends Action { array('User-Agent' => 'Laconica/' . LACONICA_VERSION)); if ($result->status != 200) { - return NULL; + return null; } parse_str($result->body, $return); diff --git a/_darcs/pristine/actions/repliesrss.php b/_darcs/pristine/actions/repliesrss.php index 3689ea1f8..9652ae9ea 100644 --- a/_darcs/pristine/actions/repliesrss.php +++ b/_darcs/pristine/actions/repliesrss.php @@ -25,7 +25,7 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); class RepliesrssAction extends Rss10Action { - var $user = NULL; + var $user = null; function init() { $nickname = $this->trimmed('nickname'); @@ -71,9 +71,9 @@ class RepliesrssAction extends Rss10Action { $user = $this->user; $profile = $user->getProfile(); if (!$profile) { - return NULL; + return null; } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - return ($avatar) ? $avatar->url : NULL; + return ($avatar) ? $avatar->url : null; } }
\ No newline at end of file diff --git a/_darcs/pristine/actions/showmessage.php b/_darcs/pristine/actions/showmessage.php index f35f3eede..a5e03c72d 100644 --- a/_darcs/pristine/actions/showmessage.php +++ b/_darcs/pristine/actions/showmessage.php @@ -53,7 +53,7 @@ class ShowmessageAction extends MailboxAction { function get_title($user, $page) { $message = $this->get_message(); if (!$message) { - return NULL; + return null; } if ($user->id == $message->from_profile) { @@ -85,7 +85,7 @@ class ShowmessageAction extends MailboxAction { return $message->getFrom(); } else { # This shouldn't happen - return NULL; + return null; } } diff --git a/_darcs/pristine/actions/shownotice.php b/_darcs/pristine/actions/shownotice.php index 74d197ed1..04af61a6f 100644 --- a/_darcs/pristine/actions/shownotice.php +++ b/_darcs/pristine/actions/shownotice.php @@ -23,9 +23,9 @@ require_once(INSTALLDIR.'/lib/stream.php'); class ShownoticeAction extends StreamAction { - var $notice = NULL; - var $profile = NULL; - var $avatar = NULL; + var $notice = null; + var $profile = null; + var $avatar = null; function prepare($args) { @@ -73,7 +73,7 @@ class ShownoticeAction extends StreamAction { common_show_header(sprintf(_('%1$s\'s status on %2$s'), $this->profile->nickname, common_exact_date($this->notice->created)), - array($this, 'show_header'), NULL, + array($this, 'show_header'), null, array($this, 'show_top')); common_element_start('ul', array('id' => 'notices')); diff --git a/_darcs/pristine/actions/showstream.php b/_darcs/pristine/actions/showstream.php index f8525348d..485c2e3d1 100644 --- a/_darcs/pristine/actions/showstream.php +++ b/_darcs/pristine/actions/showstream.php @@ -285,7 +285,7 @@ class ShowstreamAction extends StreamAction { common_element_start('div', array('id' => 'subscriptions')); - common_element('h2', NULL, _('Subscriptions')); + common_element('h2', null, _('Subscriptions')); if ($subs_count > 0) { @@ -415,7 +415,7 @@ class ShowstreamAction extends StreamAction { function show_last_notice($profile) { - common_element('h2', NULL, _('Currently')); + common_element('h2', null, _('Currently')); $notice = $profile->getCurrentNotice(); diff --git a/_darcs/pristine/actions/smssettings.php b/_darcs/pristine/actions/smssettings.php index 506801e97..71ab39514 100644 --- a/_darcs/pristine/actions/smssettings.php +++ b/_darcs/pristine/actions/smssettings.php @@ -28,7 +28,7 @@ class SmssettingsAction extends EmailsettingsAction { return _('You can receive SMS messages through email from %%site.name%%.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); $this->form_header(_('SMS Settings'), $msg, $success); common_element_start('form', array('method' => 'post', @@ -36,7 +36,7 @@ class SmssettingsAction extends EmailsettingsAction { 'action' => common_local_url('smssettings'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, _('Address')); + common_element('h2', null, _('Address')); if ($user->sms) { common_element_start('p'); @@ -60,12 +60,12 @@ class SmssettingsAction extends EmailsettingsAction { common_hidden('carrier', $confirm->address_extra); common_element_end('p'); common_submit('cancel', _('Cancel')); - common_input('code', _('Confirmation code'), NULL, + common_input('code', _('Confirmation code'), null, _('Enter the code you received on your phone.')); common_submit('confirm', _('Confirm')); } else { common_input('sms', _('SMS Phone number'), - ($this->arg('sms')) ? $this->arg('sms') : NULL, + ($this->arg('sms')) ? $this->arg('sms') : null, _('Phone number, no punctuation or spaces, with area code')); $this->carrier_select(); common_submit('add', _('Add')); @@ -73,7 +73,7 @@ class SmssettingsAction extends EmailsettingsAction { } if ($user->sms) { - common_element('h2', NULL, _('Incoming email')); + common_element('h2', null, _('Incoming email')); if ($user->incomingemail) { common_element_start('p'); @@ -91,7 +91,7 @@ class SmssettingsAction extends EmailsettingsAction { common_submit('newincoming', _('New')); } - common_element('h2', NULL, _('Preferences')); + common_element('h2', null, _('Preferences')); common_checkbox('smsnotify', _('Send me notices through SMS; I understand I may incur exorbitant charges from my carrier.'), @@ -111,7 +111,7 @@ class SmssettingsAction extends EmailsettingsAction { if ($confirm->find(TRUE)) { return $confirm; } else { - return NULL; + return null; } } @@ -268,9 +268,9 @@ class SmssettingsAction extends EmailsettingsAction { $user->query('BEGIN'); $original = clone($user); - $user->sms = NULL; - $user->carrier = NULL; - $user->smsemail = NULL; + $user->sms = null; + $user->carrier = null; + $user->smsemail = null; $result = $user->updateKeys($original); if (!$result) { common_log_db_error($user, 'UPDATE', __FILE__); diff --git a/_darcs/pristine/actions/subedit.php b/_darcs/pristine/actions/subedit.php index 1d095ab9a..db935eb28 100644 --- a/_darcs/pristine/actions/subedit.php +++ b/_darcs/pristine/actions/subedit.php @@ -21,7 +21,7 @@ if (!defined('LACONICA')) { exit(1); } class SubeditAction extends Action { - var $profile = NULL; + var $profile = null; function prepare($args) { diff --git a/_darcs/pristine/actions/tagother.php b/_darcs/pristine/actions/tagother.php index 832671ae7..4691fef07 100644 --- a/_darcs/pristine/actions/tagother.php +++ b/_darcs/pristine/actions/tagother.php @@ -49,12 +49,12 @@ class TagotherAction extends Action { } } - function show_form($profile, $error=NULL) { + function show_form($profile, $error=null) { $user = common_current_user(); common_show_header(_('Tag a person'), - NULL, array($profile, $error), array($this, 'show_top')); + null, array($profile, $error), array($this, 'show_top')); $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); @@ -178,13 +178,13 @@ class TagotherAction extends Action { } } - function show_top($arr = NULL) { + function show_top($arr = null) { list($profile, $error) = $arr; if ($error) { common_element('p', 'error', $error); } else { common_element_start('div', 'instructions'); - common_element('p', NULL, + common_element('p', null, _('Use this form to add tags to your subscribers or subscriptions.')); common_element_end('div'); } diff --git a/_darcs/pristine/actions/tagrss.php b/_darcs/pristine/actions/tagrss.php index 45639fec4..6199a285d 100644 --- a/_darcs/pristine/actions/tagrss.php +++ b/_darcs/pristine/actions/tagrss.php @@ -41,7 +41,7 @@ class TagrssAction extends Rss10Action { $tag = $this->tag; if (is_null($tag)) { - return NULL; + return null; } $notice = Notice_tag::getStream($tag->tag, 0, ($limit == 0) ? NOTICES_PER_PAGE : $limit); diff --git a/_darcs/pristine/actions/twitapidirect_messages.php b/_darcs/pristine/actions/twitapidirect_messages.php index 2e3b50173..7adb4eadd 100644 --- a/_darcs/pristine/actions/twitapidirect_messages.php +++ b/_darcs/pristine/actions/twitapidirect_messages.php @@ -228,12 +228,12 @@ class Twitapidirect_messagesAction extends TwitterapiAction { $this->init_document('rss'); common_element_start('channel'); - common_element('title', NULL, $title); + common_element('title', null, $title); - common_element('link', NULL, $link); - common_element('description', NULL, $subtitle); - common_element('language', NULL, 'en-us'); - common_element('ttl', NULL, '40'); + common_element('link', null, $link); + common_element('description', null, $subtitle); + common_element('language', null, 'en-us'); + common_element('ttl', null, '40'); if (is_array($message)) { foreach ($message as $m) { @@ -256,12 +256,12 @@ class Twitapidirect_messagesAction extends TwitterapiAction { $this->init_document('atom'); - common_element('title', NULL, $title); + common_element('title', null, $title); $siteserver = common_config('site', 'server'); - common_element('id', NULL, "tag:$siteserver,2008:DirectMessage"); - common_element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), NULL); - common_element('updated', NULL, common_date_iso8601(strftime('%c'))); - common_element('subtitle', NULL, $subtitle); + common_element('id', null, "tag:$siteserver,2008:DirectMessage"); + common_element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), null); + common_element('updated', null, common_date_iso8601(strftime('%c'))); + common_element('subtitle', null, $subtitle); if (is_array($message)) { foreach ($message as $m) { diff --git a/_darcs/pristine/actions/twitapifriendships.php b/_darcs/pristine/actions/twitapifriendships.php index d352b933b..a52f0fe4d 100644 --- a/_darcs/pristine/actions/twitapifriendships.php +++ b/_darcs/pristine/actions/twitapifriendships.php @@ -138,7 +138,7 @@ class TwitapifriendshipsAction extends TwitterapiAction { switch ($apidata['content-type']) { case 'xml': $this->init_document('xml'); - common_element('friends', NULL, $result); + common_element('friends', null, $result); $this->end_document('xml'); break; case 'json': diff --git a/_darcs/pristine/actions/twitapihelp.php b/_darcs/pristine/actions/twitapihelp.php index d268b7c82..f0e9adfdb 100644 --- a/_darcs/pristine/actions/twitapihelp.php +++ b/_darcs/pristine/actions/twitapihelp.php @@ -32,7 +32,7 @@ class TwitapihelpAction extends TwitterapiAction { if ($apidata['content-type'] == 'xml') { $this->init_document('xml'); - common_element('ok', NULL, 'true'); + common_element('ok', null, 'true'); $this->end_document('xml'); } elseif ($apidata['content-type'] == 'json') { $this->init_document('json'); diff --git a/_darcs/pristine/actions/twitapistatuses.php b/_darcs/pristine/actions/twitapistatuses.php index c33643a3c..ffa94b309 100644 --- a/_darcs/pristine/actions/twitapistatuses.php +++ b/_darcs/pristine/actions/twitapistatuses.php @@ -112,7 +112,7 @@ class TwitapistatusesAction extends TwitterapiAction { $since = strtotime($this->arg('since')); - $user = $this->get_user(NULL, $apidata); + $user = $this->get_user(null, $apidata); $this->auth_user = $user; $profile = $user->getProfile(); @@ -200,7 +200,7 @@ class TwitapistatusesAction extends TwitterapiAction { # FriendFeed's SUP protocol # Also added RSS and Atom feeds - $suplink = common_local_url('sup', NULL, $user->id); + $suplink = common_local_url('sup', null, $user->id); header('X-SUP-ID: '.$suplink); # XXX: since @@ -291,7 +291,7 @@ class TwitapistatusesAction extends TwitterapiAction { $apidata['api_arg'] = $n->id; } else { - $reply_to = NULL; + $reply_to = null; if ($in_reply_to_status_id) { diff --git a/_darcs/pristine/actions/twittersettings.php b/_darcs/pristine/actions/twittersettings.php index e300e699a..8cbd39fbd 100644 --- a/_darcs/pristine/actions/twittersettings.php +++ b/_darcs/pristine/actions/twittersettings.php @@ -30,10 +30,10 @@ class TwittersettingsAction extends SettingsAction { 'and subscribe to Twitter friends already here.'); } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { $user = common_current_user(); $profile = $user->getProfile(); - $fuser = NULL; + $fuser = null; $flink = Foreign_link::getByUserID($user->id, 1); // 1 == Twitter if ($flink) { @@ -47,7 +47,7 @@ class TwittersettingsAction extends SettingsAction { common_local_url('twittersettings'))); common_hidden('token', common_session_token()); - common_element('h2', NULL, _('Twitter Account')); + common_element('h2', null, _('Twitter Account')); if ($fuser) { common_element_start('p'); @@ -67,7 +67,7 @@ class TwittersettingsAction extends SettingsAction { common_password('twitter_password', _('Twitter password')); } - common_element('h2', NULL, _('Preferences')); + common_element('h2', null, _('Preferences')); common_checkbox('noticesync', _('Automatically send my notices to Twitter.'), ($flink) ? ($flink->noticesync & FOREIGN_NOTICE_SEND) : true); @@ -126,7 +126,7 @@ class TwittersettingsAction extends SettingsAction { if ($friends_count > 0) { - common_element('h3', NULL, _('Twitter Friends')); + common_element('h3', null, _('Twitter Friends')); common_element_start('div', array('id' => 'subscriptions')); common_element_start('ul', array('id' => 'subscriptions_avatars')); diff --git a/_darcs/pristine/actions/unblock.php b/_darcs/pristine/actions/unblock.php index 6a86c2bf0..51ec0ae57 100644 --- a/_darcs/pristine/actions/unblock.php +++ b/_darcs/pristine/actions/unblock.php @@ -21,7 +21,7 @@ if (!defined('LACONICA')) { exit(1); } class UnblockAction extends Action { - var $profile = NULL; + var $profile = null; function prepare($args) { diff --git a/_darcs/pristine/actions/userauthorization.php b/_darcs/pristine/actions/userauthorization.php index 97809f197..58ec36fc8 100644 --- a/_darcs/pristine/actions/userauthorization.php +++ b/_darcs/pristine/actions/userauthorization.php @@ -81,7 +81,7 @@ class UserauthorizationAction extends Action { $avatar = $req->get_parameter('omb_listenee_avatar'); common_show_header(_('Authorize subscription')); - common_element('p', NULL, _('Please check these details to make sure '. + common_element('p', null, _('Please check these details to make sure '. 'that you want to subscribe to this user\'s notices. '. 'If you didn\'t just ask to subscribe to someone\'s notices, '. 'click "Cancel".')); @@ -320,7 +320,7 @@ class UserauthorizationAction extends Action { function show_accept_message($tok) { common_show_header(_('Subscription authorized')); - common_element('p', NULL, + common_element('p', null, _('The subscription has been authorized, but no '. 'callback URL was passed. Check with the site\'s instructions for '. 'details on how to authorize the subscription. Your subscription token is:')); @@ -330,7 +330,7 @@ class UserauthorizationAction extends Action { function show_reject_message($tok) { common_show_header(_('Subscription rejected')); - common_element('p', NULL, + common_element('p', null, _('The subscription has been rejected, but no '. 'callback URL was passed. Check with the site\'s instructions for '. 'details on how to fully reject the subscription.')); diff --git a/_darcs/pristine/actions/userbyid.php b/_darcs/pristine/actions/userbyid.php index 4eab8758c..3fa92e9ce 100644 --- a/_darcs/pristine/actions/userbyid.php +++ b/_darcs/pristine/actions/userbyid.php @@ -38,7 +38,7 @@ class UserbyidAction extends Action { // support redirecting to FOAF rdf/xml if the agent prefers it $page_prefs = 'application/rdf+xml,text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2'; - $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : NULL; + $httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null; $type = common_negotiate_type(common_accept_to_prefs($httpaccept), common_accept_to_prefs($page_prefs)); $page = $type == 'application/rdf+xml' ? 'foaf' : 'showstream'; diff --git a/_darcs/pristine/actions/userrss.php b/_darcs/pristine/actions/userrss.php index b5cb5a40a..6089718ae 100644 --- a/_darcs/pristine/actions/userrss.php +++ b/_darcs/pristine/actions/userrss.php @@ -25,7 +25,7 @@ require_once(INSTALLDIR.'/lib/rssaction.php'); class UserrssAction extends Rss10Action { - var $user = NULL; + var $user = null; function init() { $nickname = $this->trimmed('nickname'); @@ -44,7 +44,7 @@ class UserrssAction extends Rss10Action { $user = $this->user; if (is_null($user)) { - return NULL; + return null; } $notice = $user->getNotices(0, ($limit == 0) ? NOTICES_PER_PAGE : $limit); @@ -74,16 +74,16 @@ class UserrssAction extends Rss10Action { if (!$profile) { common_log_db_error($user, 'SELECT', __FILE__); $this->server_error(_('User without matching profile')); - return NULL; + return null; } $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE); - return ($avatar) ? $avatar->url : NULL; + return ($avatar) ? $avatar->url : null; } # override parent to add X-SUP-ID URL function init_rss($limit=0) { - $url = common_local_url('sup', NULL, $this->user->id); + $url = common_local_url('sup', null, $this->user->id); header('X-SUP-ID: '.$url); parent::init_rss($limit); } diff --git a/_darcs/pristine/actions/xrds.php b/_darcs/pristine/actions/xrds.php index 9788c87aa..54baf64be 100644 --- a/_darcs/pristine/actions/xrds.php +++ b/_darcs/pristine/actions/xrds.php @@ -50,7 +50,7 @@ class XrdsAction extends Action { 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', 'version' => '2.0')); - common_element('Type', NULL, 'xri://$xrds*simple'); + common_element('Type', null, 'xri://$xrds*simple'); $this->show_service(OAUTH_ENDPOINT_REQUEST, common_local_url('requesttoken'), @@ -69,7 +69,7 @@ class XrdsAction extends Action { array(OAUTH_HMAC_SHA1)); $this->show_service(OAUTH_ENDPOINT_RESOURCE, - NULL, + null, array(OAUTH_AUTH_HEADER, OAUTH_POST_BODY), array(OAUTH_HMAC_SHA1)); @@ -82,7 +82,7 @@ class XrdsAction extends Action { 'xmlns:simple' => 'http://xrds-simple.net/core/1.0', 'version' => '2.0')); - common_element('Type', NULL, 'xri://$xrds*simple'); + common_element('Type', null, 'xri://$xrds*simple'); $this->show_service(OMB_ENDPOINT_POSTNOTICE, common_local_url('postnotice')); @@ -95,7 +95,7 @@ class XrdsAction extends Action { common_element_start('XRD', array('xmlns' => 'xri://$xrd*($v*2.0)', 'version' => '2.0')); - common_element('Type', NULL, 'xri://$xrds*simple'); + common_element('Type', null, 'xri://$xrds*simple'); $this->show_service(OAUTH_DISCOVERY, '#oauth'); @@ -108,24 +108,24 @@ class XrdsAction extends Action { common_end_xml(); } - function show_service($type, $uri, $params=NULL, $sigs=NULL, $localId=NULL) { + function show_service($type, $uri, $params=null, $sigs=null, $localId=null) { common_element_start('Service'); if ($uri) { - common_element('URI', NULL, $uri); + common_element('URI', null, $uri); } - common_element('Type', NULL, $type); + common_element('Type', null, $type); if ($params) { foreach ($params as $param) { - common_element('Type', NULL, $param); + common_element('Type', null, $param); } } if ($sigs) { foreach ($sigs as $sig) { - common_element('Type', NULL, $sig); + common_element('Type', null, $sig); } } if ($localId) { - common_element('LocalID', NULL, $localId); + common_element('LocalID', null, $localId); } common_element_end('Service'); } diff --git a/_darcs/pristine/classes/Avatar.php b/_darcs/pristine/classes/Avatar.php index e63668a33..bde983d79 100644 --- a/_darcs/pristine/classes/Avatar.php +++ b/_darcs/pristine/classes/Avatar.php @@ -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; } } diff --git a/_darcs/pristine/classes/Channel.php b/_darcs/pristine/classes/Channel.php index 384fe8bb1..ea3530406 100644 --- a/_darcs/pristine/classes/Channel.php +++ b/_darcs/pristine/classes/Channel.php @@ -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; } diff --git a/_darcs/pristine/classes/Command.php b/_darcs/pristine/classes/Command.php index ff44b9d1e..b146005a7 100644 --- a/_darcs/pristine/classes/Command.php +++ b/_darcs/pristine/classes/Command.php @@ -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; } diff --git a/_darcs/pristine/classes/CommandInterpreter.php b/_darcs/pristine/classes/CommandInterpreter.php index 8192fb1a9..db02ce541 100644 --- a/_darcs/pristine/classes/CommandInterpreter.php +++ b/_darcs/pristine/classes/CommandInterpreter.php @@ -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: diff --git a/_darcs/pristine/classes/Confirm_address.php b/_darcs/pristine/classes/Confirm_address.php index 10661ff5c..71f2d0c72 100644 --- a/_darcs/pristine/classes/Confirm_address.php +++ b/_darcs/pristine/classes/Confirm_address.php @@ -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 diff --git a/_darcs/pristine/classes/Consumer.php b/_darcs/pristine/classes/Consumer.php index d18e6feeb..c598312aa 100644 --- a/_darcs/pristine/classes/Consumer.php +++ b/_darcs/pristine/classes/Consumer.php @@ -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 diff --git a/_darcs/pristine/classes/Fave.php b/_darcs/pristine/classes/Fave.php index b70a8a897..5d938d149 100644 --- a/_darcs/pristine/classes/Fave.php +++ b/_darcs/pristine/classes/Fave.php @@ -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 diff --git a/_darcs/pristine/classes/Foreign_link.php b/_darcs/pristine/classes/Foreign_link.php index 7ce0df833..41a95e641 100644 --- a/_darcs/pristine/classes/Foreign_link.php +++ b/_darcs/pristine/classes/Foreign_link.php @@ -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() { diff --git a/_darcs/pristine/classes/Foreign_service.php b/_darcs/pristine/classes/Foreign_service.php index 18ef83d69..128411b71 100644 --- a/_darcs/pristine/classes/Foreign_service.php +++ b/_darcs/pristine/classes/Foreign_service.php @@ -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 diff --git a/_darcs/pristine/classes/Foreign_subscription.php b/_darcs/pristine/classes/Foreign_subscription.php index 315064067..d8e8569fb 100644 --- a/_darcs/pristine/classes/Foreign_subscription.php +++ b/_darcs/pristine/classes/Foreign_subscription.php @@ -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 diff --git a/_darcs/pristine/classes/Foreign_user.php b/_darcs/pristine/classes/Foreign_user.php index 396680128..f8a980884 100644 --- a/_darcs/pristine/classes/Foreign_user.php +++ b/_darcs/pristine/classes/Foreign_user.php @@ -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) { diff --git a/_darcs/pristine/classes/Invitation.php b/_darcs/pristine/classes/Invitation.php index 1477391b0..ff6456445 100644 --- a/_darcs/pristine/classes/Invitation.php +++ b/_darcs/pristine/classes/Invitation.php @@ -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 diff --git a/_darcs/pristine/classes/Memcached_DataObject.php b/_darcs/pristine/classes/Memcached_DataObject.php index 7699e1b38..1d12730c9 100644 --- a/_darcs/pristine/classes/Memcached_DataObject.php +++ b/_darcs/pristine/classes/Memcached_DataObject.php @@ -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 } diff --git a/_darcs/pristine/classes/Message.php b/_darcs/pristine/classes/Message.php index dc527fcb1..e04fbb3c0 100644 --- a/_darcs/pristine/classes/Message.php +++ b/_darcs/pristine/classes/Message.php @@ -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 diff --git a/_darcs/pristine/classes/Nonce.php b/_darcs/pristine/classes/Nonce.php index 89d673c53..54d20de9c 100644 --- a/_darcs/pristine/classes/Nonce.php +++ b/_darcs/pristine/classes/Nonce.php @@ -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 diff --git a/_darcs/pristine/classes/Notice.php b/_darcs/pristine/classes/Notice.php index 35e03e342..e6152812c 100644 --- a/_darcs/pristine/classes/Notice.php +++ b/_darcs/pristine/classes/Notice.php @@ -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() { diff --git a/_darcs/pristine/classes/NoticeWrapper.php b/_darcs/pristine/classes/NoticeWrapper.php index edecb3092..19ae37c1b 100644 --- a/_darcs/pristine/classes/NoticeWrapper.php +++ b/_darcs/pristine/classes/NoticeWrapper.php @@ -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) { diff --git a/_darcs/pristine/classes/Notice_inbox.php b/_darcs/pristine/classes/Notice_inbox.php index cc482bd19..922ba2660 100644 --- a/_darcs/pristine/classes/Notice_inbox.php +++ b/_darcs/pristine/classes/Notice_inbox.php @@ -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 diff --git a/_darcs/pristine/classes/Notice_source.php b/_darcs/pristine/classes/Notice_source.php index e0a41b927..a12397b0b 100644 --- a/_darcs/pristine/classes/Notice_source.php +++ b/_darcs/pristine/classes/Notice_source.php @@ -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 diff --git a/_darcs/pristine/classes/Notice_tag.php b/_darcs/pristine/classes/Notice_tag.php index 84c4a1020..8c3911f76 100644 --- a/_darcs/pristine/classes/Notice_tag.php +++ b/_darcs/pristine/classes/Notice_tag.php @@ -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 diff --git a/_darcs/pristine/classes/Profile.php b/_darcs/pristine/classes/Profile.php index 1f4508bf1..b95cbf993 100644 --- a/_darcs/pristine/classes/Profile.php +++ b/_darcs/pristine/classes/Profile.php @@ -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) { diff --git a/_darcs/pristine/classes/Profile_block.php b/_darcs/pristine/classes/Profile_block.php index 6ea26a3bc..41d6701eb 100644 --- a/_darcs/pristine/classes/Profile_block.php +++ b/_darcs/pristine/classes/Profile_block.php @@ -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 diff --git a/_darcs/pristine/classes/Profile_tag.php b/_darcs/pristine/classes/Profile_tag.php index 2daabf867..5c508c84f 100644 --- a/_darcs/pristine/classes/Profile_tag.php +++ b/_darcs/pristine/classes/Profile_tag.php @@ -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 diff --git a/_darcs/pristine/classes/Queue_item.php b/_darcs/pristine/classes/Queue_item.php index e54b4976b..f2fc0be03 100644 --- a/_darcs/pristine/classes/Queue_item.php +++ b/_darcs/pristine/classes/Queue_item.php @@ -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; } } diff --git a/_darcs/pristine/classes/Remember_me.php b/_darcs/pristine/classes/Remember_me.php index 5bbd6cf17..9d3f9378f 100644 --- a/_darcs/pristine/classes/Remember_me.php +++ b/_darcs/pristine/classes/Remember_me.php @@ -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 diff --git a/_darcs/pristine/classes/Remote_profile.php b/_darcs/pristine/classes/Remote_profile.php index c961dcca2..66b0f3a5c 100644 --- a/_darcs/pristine/classes/Remote_profile.php +++ b/_darcs/pristine/classes/Remote_profile.php @@ -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 diff --git a/_darcs/pristine/classes/Reply.php b/_darcs/pristine/classes/Reply.php index d71ce3afb..10d6ced5b 100644 --- a/_darcs/pristine/classes/Reply.php +++ b/_darcs/pristine/classes/Reply.php @@ -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 diff --git a/_darcs/pristine/classes/Sms_carrier.php b/_darcs/pristine/classes/Sms_carrier.php index f6e0791f9..b4a9d8655 100644 --- a/_darcs/pristine/classes/Sms_carrier.php +++ b/_darcs/pristine/classes/Sms_carrier.php @@ -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 diff --git a/_darcs/pristine/classes/Subscription.php b/_darcs/pristine/classes/Subscription.php index a3b5e4b90..d70f99550 100644 --- a/_darcs/pristine/classes/Subscription.php +++ b/_darcs/pristine/classes/Subscription.php @@ -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 diff --git a/_darcs/pristine/classes/Token.php b/_darcs/pristine/classes/Token.php index d180ecebe..3c88444c8 100644 --- a/_darcs/pristine/classes/Token.php +++ b/_darcs/pristine/classes/Token.php @@ -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 diff --git a/_darcs/pristine/classes/User.php b/_darcs/pristine/classes/User.php index c2c6ad57f..29e6a86e9 100644 --- a/_darcs/pristine/classes/User.php +++ b/_darcs/pristine/classes/User.php @@ -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)) { diff --git a/_darcs/pristine/classes/User_openid.php b/_darcs/pristine/classes/User_openid.php index ad68f7402..7dc476dc4 100644 --- a/_darcs/pristine/classes/User_openid.php +++ b/_darcs/pristine/classes/User_openid.php @@ -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 diff --git a/_darcs/pristine/lib/common.php b/_darcs/pristine/lib/common.php index 95ba64d0f..3e162f781 100644 --- a/_darcs/pristine/lib/common.php +++ b/_darcs/pristine/lib/common.php @@ -58,16 +58,16 @@ $config = 'server' => 'localhost', 'theme' => 'default', 'path' => '/', - 'logfile' => NULL, + 'logfile' => null, 'fancy' => false, 'locale_path' => INSTALLDIR.'/locale', 'language' => 'en_US', 'languages' => get_all_languages(), 'email' => - array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : NULL, - 'broughtby' => NULL, + array_key_exists('SERVER_ADMIN', $_SERVER) ? $_SERVER['SERVER_ADMIN'] : null, + 'broughtby' => null, 'timezone' => 'UTC', - 'broughtbyurl' => NULL, + 'broughtbyurl' => null, 'closed' => false, 'inviteonly' => false, 'private' => false), @@ -82,19 +82,19 @@ $config = 'image' => 'http://i.creativecommons.org/l/by/3.0/88x31.png'), 'mail' => array('backend' => 'mail', - 'params' => NULL), + 'params' => null), 'nickname' => array('blacklist' => array(), 'featured' => array()), 'profile' => array('banned' => array()), 'avatar' => - array('server' => NULL), + array('server' => null), 'public' => array('localonly' => true, 'blacklist' => array()), 'theme' => - array('server' => NULL), + array('server' => null), 'throttle' => array('enabled' => false, // whether to throttle edits; false by default 'count' => 20, // number of allowed messages in timespan @@ -107,7 +107,7 @@ $config = 'encryption' => true, 'resource' => 'uniquename', 'password' => 'blahblahblah', - 'host' => NULL, # only set if != server + 'host' => null, # only set if != server 'debug' => false, # print extra debug info 'public' => array()), # JIDs of users who want to receive the public stream 'sphinx' => @@ -140,7 +140,7 @@ $config['db'] = 'class_location' => INSTALLDIR . '/classes', 'require_prefix' => 'classes/', 'class_prefix' => '', - 'mirror' => NULL, + 'mirror' => null, 'db_driver' => 'DB', # XXX: JanRain libs only work with DB 'quote_identifiers' => false, 'type' => 'mysql' ); diff --git a/_darcs/pristine/lib/deleteaction.php b/_darcs/pristine/lib/deleteaction.php index 335070cc4..a7de6b8fb 100644 --- a/_darcs/pristine/lib/deleteaction.php +++ b/_darcs/pristine/lib/deleteaction.php @@ -43,7 +43,7 @@ class DeleteAction extends Action { } } - function show_top($arr=NULL) { + function show_top($arr=null) { $instr = $this->get_instructions(); $output = common_markup_to_html($instr); common_element_start('div', 'instructions'); @@ -52,7 +52,7 @@ class DeleteAction extends Action { } function get_title() { - return NULL; + return null; } function show_header() { diff --git a/_darcs/pristine/lib/facebookaction.php b/_darcs/pristine/lib/facebookaction.php index 67595861f..731460f12 100644 --- a/_darcs/pristine/lib/facebookaction.php +++ b/_darcs/pristine/lib/facebookaction.php @@ -81,7 +81,7 @@ class FacebookAction extends Action { $fbml_main = "<fb:narrow>$content $html</fb:narrow>"; - $facebook->api_client->profile_setFBML(NULL, $fbuid, $fbml, NULL, NULL, $fbml_main); + $facebook->api_client->profile_setFBML(null, $fbuid, $fbml, null, null, $fbml_main); } # Display methods @@ -235,7 +235,7 @@ class FacebookAction extends Action { return $html; } - function pagination($have_before, $have_after, $page, $fbaction, $args=NULL) { + function pagination($have_before, $have_after, $page, $fbaction, $args=null) { $html = ''; @@ -266,7 +266,7 @@ class FacebookAction extends Action { } } - function pagination_url($fbaction, $args=NULL) { + function pagination_url($fbaction, $args=null) { global $config; $extra = ''; diff --git a/_darcs/pristine/lib/oauthstore.php b/_darcs/pristine/lib/oauthstore.php index aa705be30..421b618b7 100644 --- a/_darcs/pristine/lib/oauthstore.php +++ b/_darcs/pristine/lib/oauthstore.php @@ -33,7 +33,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore { $con->seed = common_good_rand(16); $con->created = DB_DataObject_Cast::dateTime(); if (!$con->insert()) { - return NULL; + return null; } } return new OAuthConsumer($con->consumer_key, ''); @@ -47,7 +47,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore { if ($t->find(true)) { return new OAuthToken($t->tok, $t->secret); } else { - return NULL; + return null; } } @@ -75,7 +75,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore { $t->state = 0; # unauthorized $t->created = DB_DataObject_Cast::dateTime(); if (!$t->insert()) { - return NULL; + return null; } else { return new OAuthToken($t->tok, $t->secret); } @@ -104,35 +104,35 @@ class LaconicaOAuthDataStore extends OAuthDataStore { if (!$at->insert()) { $e = $at->_lastError; common_debug('access token "'.$at->tok.'" not inserted: "'.$e->message.'"', __FILE__); - return NULL; + return null; } else { common_debug('access token "'.$at->tok.'" inserted', __FILE__); # burn the old one $orig_rt = clone($rt); $rt->state = 2; # used if (!$rt->update($orig_rt)) { - return NULL; + return null; } common_debug('request token "'.$rt->tok.'" updated', __FILE__); # Update subscription # XXX: mixing levels here $sub = Subscription::staticGet('token', $rt->tok); if (!$sub) { - return NULL; + return null; } common_debug('subscription for request token found', __FILE__); $orig_sub = clone($sub); $sub->token = $at->tok; $sub->secret = $at->secret; if (!$sub->update($orig_sub)) { - return NULL; + return null; } else { common_debug('subscription updated to use access token', __FILE__); return new OAuthToken($at->tok, $at->secret); } } } else { - return NULL; + return null; } } diff --git a/_darcs/pristine/lib/omb.php b/_darcs/pristine/lib/omb.php index 94ccc2ecd..8199b0679 100644 --- a/_darcs/pristine/lib/omb.php +++ b/_darcs/pristine/lib/omb.php @@ -44,7 +44,7 @@ define('OAUTH_POST_BODY', OAUTH_NAMESPACE.'parameters/post-body'); define('OAUTH_HMAC_SHA1', OAUTH_NAMESPACE.'signature/HMAC-SHA1'); function omb_oauth_consumer() { - static $con = NULL; + static $con = null; if (!$con) { $con = new OAuthConsumer(common_root_url(), ''); } @@ -61,7 +61,7 @@ function omb_oauth_server() { } function omb_oauth_datastore() { - static $store = NULL; + static $store = null; if (!$store) { $store = new LaconicaOAuthDataStore(); } @@ -69,7 +69,7 @@ function omb_oauth_datastore() { } function omb_hmac_sha1() { - static $hmac_method = NULL; + static $hmac_method = null; if (!$hmac_method) { $hmac_method = new OAuthSignatureMethod_HMAC_SHA1(); } @@ -91,22 +91,22 @@ function omb_match_service($service, $type) { function omb_service_uri($service) { if (!$service) { - return NULL; + return null; } $uris = $service->getURIs(); if (!$uris) { - return NULL; + return null; } return $uris[0]; } function omb_local_id($service) { if (!$service) { - return NULL; + return null; } $els = $service->getElements('xrd:LocalID'); if (!$els) { - return NULL; + return null; } $el = $els[0]; return $service->parser->content($el); diff --git a/_darcs/pristine/lib/openid.php b/_darcs/pristine/lib/openid.php index ebc5ed168..3ca359fa1 100644 --- a/_darcs/pristine/lib/openid.php +++ b/_darcs/pristine/lib/openid.php @@ -32,7 +32,7 @@ define('OPENID_COOKIE_EXPIRY', round(365.25 * 24 * 60 * 60)); define('OPENID_COOKIE_KEY', 'lastusedopenid'); function oid_store() { - static $store = NULL; + static $store = null; if (!$store) { # Can't be called statically $user = new User(); @@ -63,7 +63,7 @@ function oid_get_last() { if ($openid_url && strlen($openid_url) > 0) { return $openid_url; } else { - return NULL; + return null; } } @@ -85,7 +85,7 @@ function oid_link_user($id, $canonical, $display) { } function oid_get_user($openid_url) { - $user = NULL; + $user = null; $oid = User_openid::staticGet('canonical', $openid_url); if ($oid) { $user = User::staticGet('id', $oid->user_id); @@ -93,7 +93,7 @@ function oid_get_user($openid_url) { return $user; } -function oid_check_immediate($openid_url, $backto=NULL) { +function oid_check_immediate($openid_url, $backto=null) { if (!$backto) { $action = $_REQUEST['action']; $args = common_copy_args($_GET); @@ -177,9 +177,9 @@ function oid_authenticate($openid_url, $returnto, $immediate=false) { if (Auth_OpenID::isFailure($form_html)) { $this->show_form(sprintf(_('Could not create OpenID form: %s'), $form_html->message)); } else { - common_show_header(_('OpenID Auto-Submit'), NULL, NULL, '_oid_print_instructions'); + common_show_header(_('OpenID Auto-Submit'), null, null, '_oid_print_instructions'); common_raw($form_html); - common_element('script', NULL, + common_element('script', null, '$(document).ready(function() { ' . ' $("#'. $form_id .'").submit(); '. '});'); diff --git a/_darcs/pristine/lib/personal.php b/_darcs/pristine/lib/personal.php index 1928349a3..7ff9305f1 100644 --- a/_darcs/pristine/lib/personal.php +++ b/_darcs/pristine/lib/personal.php @@ -32,7 +32,7 @@ class PersonalAction extends Action { function views_menu() { - $user = NULL; + $user = null; $action = $this->trimmed('action'); $nickname = $this->trimmed('nickname'); diff --git a/_darcs/pristine/lib/profilelist.php b/_darcs/pristine/lib/profilelist.php index e32c5c254..9929c8647 100644 --- a/_darcs/pristine/lib/profilelist.php +++ b/_darcs/pristine/lib/profilelist.php @@ -24,11 +24,11 @@ define('PROFILES_PER_PAGE', 20); class ProfileList { - var $profile = NULL; - var $owner = NULL; - var $action = NULL; + var $profile = null; + var $owner = null; + var $action = null; - function __construct($profile, $owner=NULL, $action=NULL) { + function __construct($profile, $owner=null, $action=null) { $this->profile = $profile; $this->owner = $owner; $this->action = $action; diff --git a/_darcs/pristine/lib/queuehandler.php b/_darcs/pristine/lib/queuehandler.php index 5e3905f59..ecf58f69f 100644 --- a/_darcs/pristine/lib/queuehandler.php +++ b/_darcs/pristine/lib/queuehandler.php @@ -29,7 +29,7 @@ class QueueHandler extends Daemon { var $_id = 'generic'; - function QueueHandler($id=NULL) { + function QueueHandler($id=null) { if ($id) { $this->set_id($id); } @@ -52,7 +52,7 @@ class QueueHandler extends Daemon { } function transport() { - return NULL; + return null; } function start() { @@ -83,7 +83,7 @@ class QueueHandler extends Daemon { if (!$result) { $this->log(LOG_WARNING, 'Failed broadcast for notice ID = ' . $notice->id); $orig = $qi; - $qi->claimed = NULL; + $qi->claimed = null; $qi->update($orig); $this->log(LOG_WARNING, 'Abandoned claim for notice ID = ' . $notice->id); continue; @@ -91,7 +91,7 @@ class QueueHandler extends Daemon { $this->log(LOG_INFO, 'finished broadcasting notice ID = ' . $notice->id); $notice->free(); unset($notice); - $notice = NULL; + $notice = null; } else { $this->log(LOG_WARNING, 'queue item for notice that does not exist'); } diff --git a/_darcs/pristine/lib/rssaction.php b/_darcs/pristine/lib/rssaction.php index b64796888..a21ce3a97 100644 --- a/_darcs/pristine/lib/rssaction.php +++ b/_darcs/pristine/lib/rssaction.php @@ -55,7 +55,7 @@ class Rss10Action extends Action { } function get_image() { - return NULL; + return null; } function show_rss($limit=0) { @@ -84,9 +84,9 @@ class Rss10Action extends Action { $image = $this->get_image(); common_element_start('channel', array('rdf:about' => $channel['url'])); - common_element('title', NULL, $channel['title']); - common_element('link', NULL, $channel['link']); - common_element('description', NULL, $channel['description']); + common_element('title', null, $channel['title']); + common_element('link', null, $channel['link']); + common_element('description', null, $channel['description']); common_element('cc:licence', array('rdf:resource' => common_config('license','url'))); if ($image) { @@ -111,9 +111,9 @@ class Rss10Action extends Action { if ($image) { $channel = $this->get_channel(); common_element_start('image', array('rdf:about' => $image)); - common_element('title', NULL, $channel['title']); - common_element('link', NULL, $channel['link']); - common_element('url', NULL, $image); + common_element('title', null, $channel['title']); + common_element('link', null, $channel['link']); + common_element('url', null, $image); common_element_end('image'); } } @@ -124,11 +124,11 @@ class Rss10Action extends Action { $creator_uri = common_profile_uri($profile); common_element_start('item', array('rdf:about' => $notice->uri)); $title = $profile->nickname . ': ' . common_xml_safe_str(trim($notice->content)); - common_element('title', NULL, $title); - common_element('link', NULL, $nurl); - common_element('description', NULL, $profile->nickname."'s status on ".common_exact_date($notice->created)); - common_element('dc:date', NULL, common_date_w3dtf($notice->created)); - common_element('dc:creator', NULL, ($profile->fullname) ? $profile->fullname : $profile->nickname); + common_element('title', null, $title); + common_element('link', null, $nurl); + common_element('description', null, $profile->nickname."'s status on ".common_exact_date($notice->created)); + common_element('dc:date', null, common_date_w3dtf($notice->created)); + common_element('dc:creator', null, ($profile->fullname) ? $profile->fullname : $profile->nickname); common_element('sioc:has_creator', array('rdf:resource' => $creator_uri)); common_element('laconica:postIcon', array('rdf:resource' => common_profile_avatar_url($profile))); common_element('cc:licence', array('rdf:resource' => common_config('license', 'url'))); @@ -141,11 +141,11 @@ class Rss10Action extends Action { $id = $profile->id; $nickname = $profile->nickname; common_element_start('sioc:User', array('rdf:about' => $uri)); - common_element('foaf:nick', NULL, $nickname); + common_element('foaf:nick', null, $nickname); if ($profile->fullname) { - common_element('foaf:name', NULL, $profile->fullname); + common_element('foaf:name', null, $profile->fullname); } - common_element('sioc:id', NULL, $id); + common_element('sioc:id', null, $id); $avatar = common_profile_avatar_url($profile); common_element('sioc:avatar', array('rdf:resource' => $avatar)); common_element_end('sioc:User'); @@ -175,7 +175,7 @@ class Rss10Action extends Action { 'http://laconi.ca/ont/', 'xmlns' => 'http://purl.org/rss/1.0/')); common_element_start('sioc:Site', array('rdf:about' => common_root_url())); - common_element('sioc:name', NULL, common_config('site', 'name')); + common_element('sioc:name', null, common_config('site', 'name')); common_element_start('sioc:container_of'); common_element('sioc:Container', array('rdf:about' => $channel['url'])); diff --git a/_darcs/pristine/lib/searchaction.php b/_darcs/pristine/lib/searchaction.php index 8634bd99c..3eec91832 100644 --- a/_darcs/pristine/lib/searchaction.php +++ b/_darcs/pristine/lib/searchaction.php @@ -30,7 +30,7 @@ class SearchAction extends Action { $this->show_form(); } - function show_top($arr=NULL) { + function show_top($arr=null) { if ($arr) { $error = $arr[1]; } @@ -47,14 +47,14 @@ class SearchAction extends Action { } function get_title() { - return NULL; + return null; } function show_header($arr) { return; } - function show_form($error=NULL) { + function show_form($error=null) { global $config; $q = $this->trimmed('q'); @@ -99,11 +99,11 @@ class SearchAction extends Action { array( _('People'), _('Find people on this site'), - ($action != 'peoplesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : NULL), + ($action != 'peoplesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : null), 'noticesearch' => array( _('Text'), _('Find content of notices'), - ($action != 'noticesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : NULL) + ($action != 'noticesearch' && $this->trimmed('q')) ? array('q' => $this->trimmed('q')) : null) ); $this->nav_menu($menu); } diff --git a/_darcs/pristine/lib/settingsaction.php b/_darcs/pristine/lib/settingsaction.php index 3021eb192..208d2a1b6 100644 --- a/_darcs/pristine/lib/settingsaction.php +++ b/_darcs/pristine/lib/settingsaction.php @@ -44,7 +44,7 @@ class SettingsAction extends Action { return false; } - function show_form($msg=NULL, $success=false) { + function show_form($msg=null, $success=false) { return false; } @@ -55,9 +55,9 @@ class SettingsAction extends Action { } } - function form_header($title, $msg=NULL, $success=false) { + function form_header($title, $msg=null, $success=false) { common_show_header($title, - NULL, + null, array($msg, $success), array($this, 'show_top')); } diff --git a/_darcs/pristine/lib/twitter.php b/_darcs/pristine/lib/twitter.php index c1d2de0ea..1212875ea 100644 --- a/_darcs/pristine/lib/twitter.php +++ b/_darcs/pristine/lib/twitter.php @@ -148,13 +148,13 @@ function retreive_twitter_friends($twitter_id, $screen_name, $password) { $data = get_twitter_data($uri . $i, $screen_name, $password); if (!$data) { - return NULL; + return null; } $more_friends = json_decode($data); if (!$more_friends) { - return NULL; + return null; } $friends = array_merge($friends, $more_friends); diff --git a/_darcs/pristine/lib/twitterapi.php b/_darcs/pristine/lib/twitterapi.php index 3122caf12..ed86c77c4 100644 --- a/_darcs/pristine/lib/twitterapi.php +++ b/_darcs/pristine/lib/twitterapi.php @@ -34,15 +34,15 @@ class TwitterapiAction extends Action { $twitter_user['name'] = $profile->getBestName(); $twitter_user['followers_count'] = $this->count_subscriptions($profile); $twitter_user['screen_name'] = $profile->nickname; - $twitter_user['description'] = ($profile->bio) ? $profile->bio : NULL; - $twitter_user['location'] = ($profile->location) ? $profile->location : NULL; + $twitter_user['description'] = ($profile->bio) ? $profile->bio : null; + $twitter_user['location'] = ($profile->location) ? $profile->location : null; $twitter_user['id'] = intval($profile->id); $avatar = $profile->getAvatar(AVATAR_STREAM_SIZE); $twitter_user['profile_image_url'] = ($avatar) ? common_avatar_display_url($avatar) : common_default_avatar(AVATAR_STREAM_SIZE); $twitter_user['protected'] = 'false'; # not supported by Laconica yet - $twitter_user['url'] = ($profile->homepage) ? $profile->homepage : NULL; + $twitter_user['url'] = ($profile->homepage) ? $profile->homepage : null; if ($get_notice) { $notice = $profile->getCurrentNotice(); @@ -63,10 +63,10 @@ class TwitterapiAction extends Action { $twitter_status['text'] = $notice->content; $twitter_status['truncated'] = 'false'; # Not possible on Laconica $twitter_status['created_at'] = $this->date_twitter($notice->created); - $twitter_status['in_reply_to_status_id'] = ($notice->reply_to) ? intval($notice->reply_to) : NULL; + $twitter_status['in_reply_to_status_id'] = ($notice->reply_to) ? intval($notice->reply_to) : null; $twitter_status['source'] = $this->source_link($notice->source); $twitter_status['id'] = intval($notice->id); - $twitter_status['in_reply_to_user_id'] = ($notice->reply_to) ? $this->replier_by_reply(intval($notice->reply_to)) : NULL; + $twitter_status['in_reply_to_user_id'] = ($notice->reply_to) ? $this->replier_by_reply(intval($notice->reply_to)) : null; if (isset($this->auth_user)) { $twitter_status['favorited'] = ($this->auth_user->hasFave($notice)) ? 'true' : 'false'; @@ -157,10 +157,10 @@ class TwitterapiAction extends Action { $this->show_twitter_xml_user($twitter_status['user']); break; case 'text': - common_element($element, NULL, common_xml_safe_str($value)); + common_element($element, null, common_xml_safe_str($value)); break; default: - common_element($element, NULL, $value); + common_element($element, null, $value); } } common_element_end('status'); @@ -172,7 +172,7 @@ class TwitterapiAction extends Action { if ($element == 'status') { $this->show_twitter_xml_status($twitter_user['status']); } else { - common_element($element, NULL, $value); + common_element($element, null, $value); } } common_element_end($role); @@ -180,22 +180,22 @@ class TwitterapiAction extends Action { function show_twitter_rss_item($entry) { common_element_start('item'); - common_element('title', NULL, $entry['title']); - common_element('description', NULL, $entry['description']); - common_element('pubDate', NULL, $entry['pubDate']); - common_element('guid', NULL, $entry['guid']); - common_element('link', NULL, $entry['link']); + common_element('title', null, $entry['title']); + common_element('description', null, $entry['description']); + common_element('pubDate', null, $entry['pubDate']); + common_element('guid', null, $entry['guid']); + common_element('link', null, $entry['link']); common_element_end('item'); } function show_twitter_atom_entry($entry) { common_element_start('entry'); - common_element('title', NULL, $entry['title']); + common_element('title', null, $entry['title']); common_element('content', array('type' => 'html'), $entry['content']); - common_element('id', NULL, $entry['id']); - common_element('published', NULL, $entry['published']); - common_element('updated', NULL, $entry['updated']); - common_element('link', array('href' => $entry['link'], 'rel' => 'alternate', 'type' => 'text/html'), NULL); + common_element('id', null, $entry['id']); + common_element('published', null, $entry['published']); + common_element('updated', null, $entry['updated']); + common_element('link', array('href' => $entry['link'], 'rel' => 'alternate', 'type' => 'text/html'), null); common_element_end('entry'); } @@ -240,10 +240,10 @@ class TwitterapiAction extends Action { $this->show_twitter_xml_user($value, $element); break; case 'text': - common_element($element, NULL, common_xml_safe_str($value)); + common_element($element, null, common_xml_safe_str($value)); break; default: - common_element($element, NULL, $value); + common_element($element, null, $value); } } common_element_end('direct_message'); @@ -270,13 +270,13 @@ class TwitterapiAction extends Action { $this->end_document('xml'); } - function show_rss_timeline($notice, $title, $link, $subtitle, $suplink=NULL) { + function show_rss_timeline($notice, $title, $link, $subtitle, $suplink=null) { $this->init_document('rss'); common_element_start('channel'); - common_element('title', NULL, $title); - common_element('link', NULL, $link); + common_element('title', null, $title); + common_element('link', null, $link); if (!is_null($suplink)) { # For FriendFeed's SUP protocol common_element('link', array('xmlns' => 'http://www.w3.org/2005/Atom', @@ -284,9 +284,9 @@ class TwitterapiAction extends Action { 'href' => $suplink, 'type' => 'application/json')); } - common_element('description', NULL, $subtitle); - common_element('language', NULL, 'en-us'); - common_element('ttl', NULL, '40'); + common_element('description', null, $subtitle); + common_element('language', null, 'en-us'); + common_element('ttl', null, '40'); if (is_array($notice)) { foreach ($notice as $n) { @@ -304,20 +304,20 @@ class TwitterapiAction extends Action { $this->end_twitter_rss(); } - function show_atom_timeline($notice, $title, $id, $link, $subtitle=NULL, $suplink=NULL) { + function show_atom_timeline($notice, $title, $id, $link, $subtitle=null, $suplink=null) { $this->init_document('atom'); - common_element('title', NULL, $title); - common_element('id', NULL, $id); - common_element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), NULL); + common_element('title', null, $title); + common_element('id', null, $id); + common_element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), null); if (!is_null($suplink)) { # For FriendFeed's SUP protocol common_element('link', array('rel' => 'http://api.friendfeed.com/2008/03#sup', 'href' => $suplink, 'type' => 'application/json')); } - common_element('subtitle', NULL, $subtitle); + common_element('subtitle', null, $subtitle); if (is_array($notice)) { foreach ($notice as $n) { @@ -377,7 +377,7 @@ class TwitterapiAction extends Action { } else { common_debug("Can't get notice: $reply_id", __FILE__); } - return NULL; + return null; } // XXX: Candidate for a general utility method somewhere? @@ -488,8 +488,8 @@ class TwitterapiAction extends Action { if ($content_type == 'xml') { $this->init_document('xml'); common_element_start('hash'); - common_element('error', NULL, $msg); - common_element('request', NULL, $_SERVER['REQUEST_URI']); + common_element('error', null, $msg); + common_element('request', null, $_SERVER['REQUEST_URI']); common_element_end('hash'); $this->end_document('xml'); } else { @@ -521,7 +521,7 @@ class TwitterapiAction extends Action { common_element_end('feed'); } - function show_profile($profile, $content_type='xml', $notice=NULL) { + function show_profile($profile, $content_type='xml', $notice=null) { $profile_array = $this->twitter_user_array($profile, true); switch ($content_type) { case 'xml': @@ -537,7 +537,7 @@ class TwitterapiAction extends Action { return; } - function get_user($id, $apidata=NULL) { + function get_user($id, $apidata=null) { if (!$id) { return $apidata['user']; } else if (is_numeric($id)) { @@ -556,7 +556,7 @@ class TwitterapiAction extends Action { if ($user) { return $user->getProfile(); } else { - return NULL; + return null; } } } diff --git a/_darcs/pristine/lib/xmppqueuehandler.php b/_darcs/pristine/lib/xmppqueuehandler.php index 33b987291..10c754a5b 100644 --- a/_darcs/pristine/lib/xmppqueuehandler.php +++ b/_darcs/pristine/lib/xmppqueuehandler.php @@ -38,14 +38,14 @@ class XmppQueueHandler extends QueueHandler { $this->conn->addEventHandler('message', 'forward_message', $this); $this->conn->addEventHandler('reconnect', 'handle_reconnect', $this); $this->conn->setReconnectTimeout(600); - jabber_send_presence("Send me a message to post a notice", 'available', NULL, 'available', -1); + jabber_send_presence("Send me a message to post a notice", 'available', null, 'available', -1); } return !is_null($this->conn); } function handle_reconnect(&$pl) { $this->conn->processUntil('session_start'); - $this->conn->presence(NULL, 'available', NULL, 'available', -1); + $this->conn->presence(null, 'available', null, 'available', -1); } function idle($timeout=0) { @@ -71,7 +71,7 @@ class XmppQueueHandler extends QueueHandler { return; } $this->log(LOG_INFO, 'Forwarding message from ' . $pl['from'] . ' to ' . $listener); - $this->conn->message($this->listener(), $pl['body'], 'chat', NULL, $this->ofrom($pl['from'])); + $this->conn->message($this->listener(), $pl['body'], 'chat', null, $this->ofrom($pl['from'])); } function ofrom($from) { diff --git a/_darcs/pristine/scripts/enjitqueuehandler.php b/_darcs/pristine/scripts/enjitqueuehandler.php index cfb253753..1c033603f 100644 --- a/_darcs/pristine/scripts/enjitqueuehandler.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/fixup_inboxes.php b/_darcs/pristine/scripts/fixup_inboxes.php index e631a80ed..a5c8a0a5a 100644 --- a/_darcs/pristine/scripts/fixup_inboxes.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/fixup_notices_rendered.php b/_darcs/pristine/scripts/fixup_notices_rendered.php index 1fa9f394e..c27185546 100644 --- a/_darcs/pristine/scripts/fixup_notices_rendered.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/jabberqueuehandler.php b/_darcs/pristine/scripts/jabberqueuehandler.php index 8e33cfaf0..271aab22b 100644 --- a/_darcs/pristine/scripts/jabberqueuehandler.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/maildaemon.php b/_darcs/pristine/scripts/maildaemon.php index 6d8507514..886e72ba7 100644 --- a/_darcs/pristine/scripts/maildaemon.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/ombqueuehandler.php b/_darcs/pristine/scripts/ombqueuehandler.php index 31ae20f00..43c0980b6 100644 --- a/_darcs/pristine/scripts/ombqueuehandler.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/smsqueuehandler.php b/_darcs/pristine/scripts/smsqueuehandler.php index f17429d96..f8b2e9d53 100644 --- a/_darcs/pristine/scripts/smsqueuehandler.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/xmppconfirmhandler.php b/_darcs/pristine/scripts/xmppconfirmhandler.php index 454616ca0..9e177b3fa 100644 --- a/_darcs/pristine/scripts/xmppconfirmhandler.php +++ b/_darcs/pristine/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/_darcs/pristine/scripts/xmppdaemon.php b/_darcs/pristine/scripts/xmppdaemon.php index cd27a2c14..ead842928 100644 --- a/_darcs/pristine/scripts/xmppdaemon.php +++ b/_darcs/pristine/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; |