From 7ad2f2a371eae2489330f30306cfcbb204411bae Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 23 Dec 2008 14:44:28 -0500 Subject: TRUE More PEAR coding standards global changes. Here, I've changed all instances of TRUE to true and FALSE to false. darcs-hash:20081223194428-84dde-cb1a1e6f679acd68e864545c4d4dd8752d6a6257.gz --- _darcs/pristine/actions/accesstoken.php | 2 +- _darcs/pristine/actions/emailsettings.php | 16 ++++++++-------- _darcs/pristine/actions/finishremotesubscribe.php | 2 +- _darcs/pristine/actions/foaf.php | 4 ++-- _darcs/pristine/actions/imsettings.php | 12 ++++++------ _darcs/pristine/actions/othersettings.php | 4 ++-- _darcs/pristine/actions/profilesettings.php | 12 ++++++------ _darcs/pristine/actions/smssettings.php | 12 ++++++------ _darcs/pristine/actions/twitapifriendships.php | 2 +- _darcs/pristine/actions/twittersettings.php | 4 ++-- _darcs/pristine/actions/userauthorization.php | 18 +++++++++--------- _darcs/pristine/classes/Foreign_link.php | 6 +++--- _darcs/pristine/classes/Notice.php | 16 ++++++++-------- _darcs/pristine/classes/Queue_item.php | 2 +- _darcs/pristine/classes/User.php | 8 ++++---- _darcs/pristine/lib/oauthstore.php | 8 ++++---- _darcs/pristine/lib/omb.php | 8 ++++---- _darcs/pristine/lib/util.php | 8 ++++---- _darcs/pristine/scripts/sitemap.php | 6 +++--- _darcs/pristine/scripts/xmppconfirmhandler.php | 2 +- 20 files changed, 76 insertions(+), 76 deletions(-) (limited to '_darcs/pristine') diff --git a/_darcs/pristine/actions/accesstoken.php b/_darcs/pristine/actions/accesstoken.php index 738ec071f..cab5425bf 100644 --- a/_darcs/pristine/actions/accesstoken.php +++ b/_darcs/pristine/actions/accesstoken.php @@ -33,7 +33,7 @@ class AccesstokenAction extends Action { $server = omb_oauth_server(); common_debug('fetching the access token', __FILE__); $token = $server->fetch_access_token($req); - common_debug('got this token: "'.print_r($token,TRUE).'"', __FILE__); + common_debug('got this token: "'.print_r($token,true).'"', __FILE__); common_debug('printing the access token', __FILE__); print $token; } catch (OAuthException $e) { diff --git a/_darcs/pristine/actions/emailsettings.php b/_darcs/pristine/actions/emailsettings.php index 3dcf7716f..7f08efd29 100644 --- a/_darcs/pristine/actions/emailsettings.php +++ b/_darcs/pristine/actions/emailsettings.php @@ -118,7 +118,7 @@ class EmailsettingsAction extends SettingsAction { $confirm = new Confirm_address(); $confirm->user_id = $user->id; $confirm->address_type = 'email'; - if ($confirm->find(TRUE)) { + if ($confirm->find(true)) { return $confirm; } else { return null; @@ -179,7 +179,7 @@ class EmailsettingsAction extends SettingsAction { $result = $user->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user.')); return; @@ -229,7 +229,7 @@ class EmailsettingsAction extends SettingsAction { $result = $confirm->insert(); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($confirm, 'INSERT', __FILE__); common_server_error(_('Couldn\'t insert confirmation code.')); return; @@ -239,7 +239,7 @@ class EmailsettingsAction extends SettingsAction { $msg = _('A confirmation code was sent to the email address you added. Check your inbox (and spam box!) for the code and instructions on how to use it.'); - $this->show_form($msg, TRUE); + $this->show_form($msg, true); } function cancel_confirmation() @@ -263,7 +263,7 @@ class EmailsettingsAction extends SettingsAction { return; } - $this->show_form(_('Confirmation cancelled.'), TRUE); + $this->show_form(_('Confirmation cancelled.'), true); } function remove_address() @@ -290,7 +290,7 @@ class EmailsettingsAction extends SettingsAction { } $user->query('COMMIT'); - $this->show_form(_('The address was removed.'), TRUE); + $this->show_form(_('The address was removed.'), true); } function remove_incoming() @@ -310,7 +310,7 @@ class EmailsettingsAction extends SettingsAction { $this->server_error(_("Couldn't update user record.")); } - $this->show_form(_('Incoming email address removed.'), TRUE); + $this->show_form(_('Incoming email address removed.'), true); } function new_incoming() @@ -325,7 +325,7 @@ class EmailsettingsAction extends SettingsAction { $this->server_error(_("Couldn't update user record.")); } - $this->show_form(_('New incoming email address added.'), TRUE); + $this->show_form(_('New incoming email address added.'), true); } function email_exists($email) diff --git a/_darcs/pristine/actions/finishremotesubscribe.php b/_darcs/pristine/actions/finishremotesubscribe.php index 38a56c962..5aace4fa9 100644 --- a/_darcs/pristine/actions/finishremotesubscribe.php +++ b/_darcs/pristine/actions/finishremotesubscribe.php @@ -278,7 +278,7 @@ class FinishremotesubscribeAction extends Action { $req->to_postdata(), array('User-Agent' => 'Laconica/' . LACONICA_VERSION)); - common_debug('got result: "'.print_r($result,TRUE).'"', __FILE__); + common_debug('got result: "'.print_r($result,true).'"', __FILE__); if ($result->status != 200) { return null; diff --git a/_darcs/pristine/actions/foaf.php b/_darcs/pristine/actions/foaf.php index 893e2a861..27548bfff 100644 --- a/_darcs/pristine/actions/foaf.php +++ b/_darcs/pristine/actions/foaf.php @@ -122,7 +122,7 @@ class FoafAction extends Action { $other = User::staticGet('id', $sub->subscribed); } if (!$other) { - common_debug('Got a bad subscription: '.print_r($sub,TRUE)); + common_debug('Got a bad subscription: '.print_r($sub,true)); continue; } common_element('knows', array('rdf:resource' => $other->uri)); @@ -144,7 +144,7 @@ class FoafAction extends Action { $other = User::staticGet('id', $sub->subscriber); } if (!$other) { - common_debug('Got a bad subscription: '.print_r($sub,TRUE)); + common_debug('Got a bad subscription: '.print_r($sub,true)); continue; } if (array_key_exists($other->uri, $person)) { diff --git a/_darcs/pristine/actions/imsettings.php b/_darcs/pristine/actions/imsettings.php index cccd5db49..56fb14758 100644 --- a/_darcs/pristine/actions/imsettings.php +++ b/_darcs/pristine/actions/imsettings.php @@ -93,7 +93,7 @@ class ImsettingsAction extends SettingsAction { $confirm = new Confirm_address(); $confirm->user_id = $user->id; $confirm->address_type = 'jabber'; - if ($confirm->find(TRUE)) { + if ($confirm->find(true)) { return $confirm; } else { return null; @@ -146,7 +146,7 @@ class ImsettingsAction extends SettingsAction { $result = $user->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user.')); return; @@ -196,7 +196,7 @@ class ImsettingsAction extends SettingsAction { $result = $confirm->insert(); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($confirm, 'INSERT', __FILE__); common_server_error(_('Couldn\'t insert confirmation code.')); return; @@ -210,7 +210,7 @@ class ImsettingsAction extends SettingsAction { $msg = sprintf(_('A confirmation code was sent to the IM address you added. You must approve %s for sending messages to you.'), jabber_daemon_address()); - $this->show_form($msg, TRUE); + $this->show_form($msg, true); } function cancel_confirmation() @@ -234,7 +234,7 @@ class ImsettingsAction extends SettingsAction { return; } - $this->show_form(_('Confirmation cancelled.'), TRUE); + $this->show_form(_('Confirmation cancelled.'), true); } function remove_address() @@ -263,7 +263,7 @@ class ImsettingsAction extends SettingsAction { # XXX: unsubscribe to the old address - $this->show_form(_('The address was removed.'), TRUE); + $this->show_form(_('The address was removed.'), true); } function jabber_exists($jabber) diff --git a/_darcs/pristine/actions/othersettings.php b/_darcs/pristine/actions/othersettings.php index 0c1418387..dc1bcd02b 100644 --- a/_darcs/pristine/actions/othersettings.php +++ b/_darcs/pristine/actions/othersettings.php @@ -53,7 +53,7 @@ class OthersettingsAction extends SettingsAction { 'metamark.net' => 'metamark.net' ); - common_dropdown('urlshorteningservice', _('Service'), $services, _('Automatic shortening service to use.'), FALSE, $user->urlshorteningservice); + common_dropdown('urlshorteningservice', _('Service'), $services, _('Automatic shortening service to use.'), false, $user->urlshorteningservice); common_submit('save', _('Save')); @@ -174,7 +174,7 @@ class OthersettingsAction extends SettingsAction { $result = $user->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user.')); return; diff --git a/_darcs/pristine/actions/profilesettings.php b/_darcs/pristine/actions/profilesettings.php index 7f7ee17a5..beb9979d0 100644 --- a/_darcs/pristine/actions/profilesettings.php +++ b/_darcs/pristine/actions/profilesettings.php @@ -96,13 +96,13 @@ class ProfilesettingsAction extends SettingsAction { _('Tags for yourself (letters, numbers, -, ., and _), comma- or space- separated')); $language = common_language(); - common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), TRUE, $language); + common_dropdown('language', _('Language'), get_nice_language_list(), _('Preferred language'), true, $language); $timezone = common_timezone(); $timezones = array(); foreach(DateTimeZone::listIdentifiers() as $k => $v) { $timezones[$v] = $v; } - common_dropdown('timezone', _('Timezone'), $timezones, _('What timezone are you normally in?'), TRUE, $timezone); + common_dropdown('timezone', _('Timezone'), $timezones, _('What timezone are you normally in?'), true, $timezone); common_checkbox('autosubscribe', _('Automatically subscribe to whoever subscribes to me (best for non-humans)'), ($this->arg('autosubscribe')) ? $this->boolean('autosubscribe') : $user->autosubscribe); @@ -278,7 +278,7 @@ class ProfilesettingsAction extends SettingsAction { $result = $user->updateKeys($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user.')); return; @@ -298,7 +298,7 @@ class ProfilesettingsAction extends SettingsAction { $result = $user->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user for autosubscribe.')); return; @@ -340,7 +340,7 @@ class ProfilesettingsAction extends SettingsAction { common_broadcast_profile($profile); - $this->show_form(_('Settings saved.'), TRUE); + $this->show_form(_('Settings saved.'), true); } @@ -434,7 +434,7 @@ class ProfilesettingsAction extends SettingsAction { $user->password = common_munge_password($newpassword, $user->id); $val = $user->validate(); - if ($val !== TRUE) { + if ($val !== true) { $this->show_form(_('Error saving user; invalid.')); return; } diff --git a/_darcs/pristine/actions/smssettings.php b/_darcs/pristine/actions/smssettings.php index 470a042ed..444da2590 100644 --- a/_darcs/pristine/actions/smssettings.php +++ b/_darcs/pristine/actions/smssettings.php @@ -111,7 +111,7 @@ class SmssettingsAction extends EmailsettingsAction { $confirm = new Confirm_address(); $confirm->user_id = $user->id; $confirm->address_type = 'sms'; - if ($confirm->find(TRUE)) { + if ($confirm->find(true)) { return $confirm; } else { return null; @@ -165,7 +165,7 @@ class SmssettingsAction extends EmailsettingsAction { $result = $user->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($user, 'UPDATE', __FILE__); common_server_error(_('Couldn\'t update user.')); return; @@ -215,7 +215,7 @@ class SmssettingsAction extends EmailsettingsAction { $result = $confirm->insert(); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($confirm, 'INSERT', __FILE__); common_server_error(_('Couldn\'t insert confirmation code.')); return; @@ -229,7 +229,7 @@ class SmssettingsAction extends EmailsettingsAction { $msg = _('A confirmation code was sent to the phone number you added. Check your inbox (and spam box!) for the code and instructions on how to use it.'); - $this->show_form($msg, TRUE); + $this->show_form($msg, true); } function cancel_confirmation() @@ -257,7 +257,7 @@ class SmssettingsAction extends EmailsettingsAction { return; } - $this->show_form(_('Confirmation cancelled.'), TRUE); + $this->show_form(_('Confirmation cancelled.'), true); } function remove_address() @@ -287,7 +287,7 @@ class SmssettingsAction extends EmailsettingsAction { } $user->query('COMMIT'); - $this->show_form(_('The address was removed.'), TRUE); + $this->show_form(_('The address was removed.'), true); } function sms_exists($sms) diff --git a/_darcs/pristine/actions/twitapifriendships.php b/_darcs/pristine/actions/twitapifriendships.php index a59cb543c..5eca96298 100644 --- a/_darcs/pristine/actions/twitapifriendships.php +++ b/_darcs/pristine/actions/twitapifriendships.php @@ -96,7 +96,7 @@ class TwitapifriendshipsAction extends TwitterapiAction { $sub->subscriber = $user->id; $sub->subscribed = $other->id; - if ($sub->find(TRUE)) { + if ($sub->find(true)) { $sub->query('BEGIN'); $sub->delete(); $sub->query('COMMIT'); diff --git a/_darcs/pristine/actions/twittersettings.php b/_darcs/pristine/actions/twittersettings.php index 437bdd363..1f55b31b6 100644 --- a/_darcs/pristine/actions/twittersettings.php +++ b/_darcs/pristine/actions/twittersettings.php @@ -288,7 +288,7 @@ class TwittersettingsAction extends SettingsAction { return; } - $this->show_form(_('Twitter account removed.'), TRUE); + $this->show_form(_('Twitter account removed.'), true); } function save_preferences() @@ -325,7 +325,7 @@ class TwittersettingsAction extends SettingsAction { $this->set_flags($flink, $noticesync, $replysync, $friendsync); $result = $flink->update($original); - if ($result === FALSE) { + if ($result === false) { common_log_db_error($flink, 'UPDATE', __FILE__); $this->show_form(_('Couldn\'t save Twitter preferences.')); return; diff --git a/_darcs/pristine/actions/userauthorization.php b/_darcs/pristine/actions/userauthorization.php index ecaa33167..c73d515d3 100644 --- a/_darcs/pristine/actions/userauthorization.php +++ b/_darcs/pristine/actions/userauthorization.php @@ -211,7 +211,7 @@ class UserauthorizationAction extends Action { $rt->tok = $token_field; $rt->type = 0; $rt->state = 0; - common_debug('request token to look up: "'.print_r($rt,TRUE).'"'); + common_debug('request token to look up: "'.print_r($rt,true).'"'); if ($rt->find(true)) { common_debug('found request token to authorize', __FILE__); $orig_rt = clone($rt); @@ -221,7 +221,7 @@ class UserauthorizationAction extends Action { return true; } } - return FALSE; + return false; } # XXX: refactor with similar code in finishremotesubscribe.php @@ -277,25 +277,25 @@ class UserauthorizationAction extends Action { $profile->created = DB_DataObject_Cast::dateTime(); # current time $id = $profile->insert(); if (!$id) { - return FALSE; + return false; } $remote->id = $id; } if ($exists) { if (!$remote->update($orig_remote)) { - return FALSE; + return false; } } else { $remote->created = DB_DataObject_Cast::dateTime(); # current time if (!$remote->insert()) { - return FALSE; + return false; } } if ($avatar_url) { if (!$this->add_avatar($profile, $avatar_url)) { - return FALSE; + return false; } } @@ -311,10 +311,10 @@ class UserauthorizationAction extends Action { $sub->created = DB_DataObject_Cast::dateTime(); # current time if (!$sub->insert()) { - return FALSE; + return false; } - return TRUE; + return true; } function add_avatar($profile, $url) @@ -440,7 +440,7 @@ class UserauthorizationAction extends Action { $sub = new Subscription(); $sub->subscriber = $user->id; $sub->subscribed = $remote->id; - if ($sub->find(TRUE)) { + if ($sub->find(true)) { throw new OAuthException("Already subscribed to user!"); } } diff --git a/_darcs/pristine/classes/Foreign_link.php b/_darcs/pristine/classes/Foreign_link.php index 79a4d262d..9027ab901 100644 --- a/_darcs/pristine/classes/Foreign_link.php +++ b/_darcs/pristine/classes/Foreign_link.php @@ -35,7 +35,7 @@ class Foreign_link extends Memcached_DataObject $flink->user_id = $user_id; $flink->limit(1); - if ($flink->find(TRUE)) { + if ($flink->find(true)) { return $flink; } @@ -48,7 +48,7 @@ class Foreign_link extends Memcached_DataObject $flink->foreign_id = $foreign_id; $flink->limit(1); - if ($flink->find(TRUE)) { + if ($flink->find(true)) { return $flink; } @@ -64,7 +64,7 @@ class Foreign_link extends Memcached_DataObject $fuser->limit(1); - if ($fuser->find(TRUE)) { + if ($fuser->find(true)) { return $fuser; } diff --git a/_darcs/pristine/classes/Notice.php b/_darcs/pristine/classes/Notice.php index d3aa4e828..3eb653066 100644 --- a/_darcs/pristine/classes/Notice.php +++ b/_darcs/pristine/classes/Notice.php @@ -321,19 +321,19 @@ class Notice extends Memcached_DataObject static function getStreamDirect($qry, $offset, $limit, $since_id, $before_id, $order, $since) { - $needAnd = FALSE; - $needWhere = TRUE; + $needAnd = false; + $needWhere = true; if (preg_match('/\bWHERE\b/i', $qry)) { - $needWhere = FALSE; - $needAnd = TRUE; + $needWhere = false; + $needAnd = true; } if ($since_id > 0) { if ($needWhere) { $qry .= ' WHERE '; - $needWhere = FALSE; + $needWhere = false; } else { $qry .= ' AND '; } @@ -345,7 +345,7 @@ class Notice extends Memcached_DataObject if ($needWhere) { $qry .= ' WHERE '; - $needWhere = FALSE; + $needWhere = false; } else { $qry .= ' AND '; } @@ -357,7 +357,7 @@ class Notice extends Memcached_DataObject if ($needWhere) { $qry .= ' WHERE '; - $needWhere = FALSE; + $needWhere = false; } else { $qry .= ' AND '; } @@ -411,7 +411,7 @@ class Notice extends Memcached_DataObject # On a cache hit, return a DB-object-like wrapper - if ($notices !== FALSE) { + if ($notices !== false) { $wrapper = new NoticeWrapper(array_slice($notices, $offset, $limit)); return $wrapper; } diff --git a/_darcs/pristine/classes/Queue_item.php b/_darcs/pristine/classes/Queue_item.php index 1b34d8ab4..9b909ec22 100644 --- a/_darcs/pristine/classes/Queue_item.php +++ b/_darcs/pristine/classes/Queue_item.php @@ -34,7 +34,7 @@ class Queue_item extends Memcached_DataObject $qi->limit(1); - $cnt = $qi->find(TRUE); + $cnt = $qi->find(true); if ($cnt) { # XXX: potential race condition diff --git a/_darcs/pristine/classes/User.php b/_darcs/pristine/classes/User.php index 90d0ccfe0..92ff8776b 100644 --- a/_darcs/pristine/classes/User.php +++ b/_darcs/pristine/classes/User.php @@ -199,7 +199,7 @@ class User extends Memcached_DataObject if (!$id) { common_log_db_error($profile, 'INSERT', __FILE__); - return FALSE; + return false; } $user = new User(); @@ -233,7 +233,7 @@ class User extends Memcached_DataObject if (!$result) { common_log_db_error($user, 'INSERT', __FILE__); - return FALSE; + return false; } # Everyone is subscribed to themself @@ -247,7 +247,7 @@ class User extends Memcached_DataObject if (!$result) { common_log_db_error($subscription, 'INSERT', __FILE__); - return FALSE; + return false; } if ($email && !$user->email) { @@ -261,7 +261,7 @@ class User extends Memcached_DataObject $result = $confirm->insert(); if (!$result) { common_log_db_error($confirm, 'INSERT', __FILE__); - return FALSE; + return false; } } diff --git a/_darcs/pristine/lib/oauthstore.php b/_darcs/pristine/lib/oauthstore.php index 7ec3ca655..faae82db1 100644 --- a/_darcs/pristine/lib/oauthstore.php +++ b/_darcs/pristine/lib/oauthstore.php @@ -59,13 +59,13 @@ class LaconicaOAuthDataStore extends OAuthDataStore { $n->consumer_key = $consumer->key; $n->tok = $token->key; $n->nonce = $nonce; - if ($n->find(TRUE)) { - return TRUE; + if ($n->find(true)) { + return true; } else { $n->timestamp = $timestamp; $n->created = DB_DataObject_Cast::dateTime(); $n->insert(); - return FALSE; + return false; } } @@ -99,7 +99,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore { $rt->consumer_key = $consumer->key; $rt->tok = $token->key; $rt->type = 0; # request - if ($rt->find(TRUE) && $rt->state == 1) { # authorized + if ($rt->find(true) && $rt->state == 1) { # authorized common_debug('request token found.', __FILE__); $at = new Token(); $at->consumer_key = $consumer->key; diff --git a/_darcs/pristine/lib/omb.php b/_darcs/pristine/lib/omb.php index c07bedab5..f2dbef5ba 100644 --- a/_darcs/pristine/lib/omb.php +++ b/_darcs/pristine/lib/omb.php @@ -139,7 +139,7 @@ function omb_broadcast_remote_subscribers($notice) common_log(LOG_DEBUG, 'Posting to ' . $rp->postnoticeurl); if (omb_post_notice_keys($notice, $rp->postnoticeurl, $rp->token, $rp->secret)) { common_log(LOG_DEBUG, 'Finished to ' . $rp->postnoticeurl); - $posted[$rp->postnoticeurl] = TRUE; + $posted[$rp->postnoticeurl] = true; } else { common_log(LOG_DEBUG, 'Failed posting to ' . $rp->postnoticeurl); } @@ -208,7 +208,7 @@ function omb_post_notice_keys($notice, $postnoticeurl, $tk, $secret) $req->to_postdata(), array('User-Agent' => 'Laconica/' . LACONICA_VERSION)); - common_debug('Got HTTP result "'.print_r($result,TRUE).'"', __FILE__); + common_debug('Got HTTP result "'.print_r($result,true).'"', __FILE__); if ($result->status == 403) { # not authorized, don't send again common_debug('403 result, deleting subscription', __FILE__); @@ -241,7 +241,7 @@ function omb_broadcast_profile($profile) if ($rp) { if (!$updated[$rp->updateprofileurl]) { if (omb_update_profile($profile, $rp, $sub)) { - $updated[$rp->updateprofileurl] = TRUE; + $updated[$rp->updateprofileurl] = true; } } } @@ -293,7 +293,7 @@ function omb_update_profile($profile, $remote_profile, $subscription) $req->to_postdata(), array('User-Agent' => 'Laconica/' . LACONICA_VERSION)); - common_debug('Got HTTP result "'.print_r($result,TRUE).'"', __FILE__); + common_debug('Got HTTP result "'.print_r($result,true).'"', __FILE__); if ($result->status == 403) { # not authorized, don't send again common_debug('403 result, deleting subscription', __FILE__); diff --git a/_darcs/pristine/lib/util.php b/_darcs/pristine/lib/util.php index ed73b19e6..32201f2be 100644 --- a/_darcs/pristine/lib/util.php +++ b/_darcs/pristine/lib/util.php @@ -436,7 +436,7 @@ function common_checkbox($id, $label, $checked=false, $instructions=null, $value common_element_end('p'); } -function common_dropdown($id, $label, $content, $instructions=null, $blank_select=FALSE, $selected=null) +function common_dropdown($id, $label, $content, $instructions=null, $blank_select=false, $selected=null) { common_element_start('p'); common_element('label', array('for' => $id), $label); @@ -1018,7 +1018,7 @@ function common_relative_profile($sender, $nickname, $dt=null) // XXX: use a join instead of a subquery $recipient->whereAdd('EXISTS (SELECT subscribed from subscription where subscriber = '.$sender->id.' and subscribed = id)', 'AND'); $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND'); - if ($recipient->find(TRUE)) { + if ($recipient->find(true)) { // XXX: should probably differentiate between profiles with // the same name by date of most recent update return $recipient; @@ -1028,7 +1028,7 @@ function common_relative_profile($sender, $nickname, $dt=null) // XXX: use a join instead of a subquery $recipient->whereAdd('EXISTS (SELECT subscriber from subscription where subscribed = '.$sender->id.' and subscriber = id)', 'AND'); $recipient->whereAdd('nickname = "' . trim($nickname) . '"', 'AND'); - if ($recipient->find(TRUE)) { + if ($recipient->find(true)) { // XXX: should probably differentiate between profiles with // the same name by date of most recent update return $recipient; @@ -2258,7 +2258,7 @@ function common_message_form($content, $user, $to) $mutual_users->free(); unset($mutual_users); - common_dropdown('to', _('To'), $mutual, null, FALSE, $to->id); + common_dropdown('to', _('To'), $mutual, null, false, $to->id); common_element_start('p'); diff --git a/_darcs/pristine/scripts/sitemap.php b/_darcs/pristine/scripts/sitemap.php index 504783e88..51a9bbd75 100644 --- a/_darcs/pristine/scripts/sitemap.php +++ b/_darcs/pristine/scripts/sitemap.php @@ -331,7 +331,7 @@ function parse_args() $output_url = $args[u]; if (file_exists($output_dir)) { - if (is_writable($output_dir) === FALSE) { + if (is_writable($output_dir) === false) { error("$output_dir is not writable."); } } else { @@ -366,11 +366,11 @@ function write_file($path, $data) error('No data specified for writing.'); } - if (($fh_out = fopen($path,'w')) === FALSE) { + if (($fh_out = fopen($path,'w')) === false) { error("couldn't open $path for writing."); } - if (fwrite($fh_out, $data) === FALSE) { + if (fwrite($fh_out, $data) === false) { error("couldn't write to $path."); } } diff --git a/_darcs/pristine/scripts/xmppconfirmhandler.php b/_darcs/pristine/scripts/xmppconfirmhandler.php index b059149bc..1eb932330 100644 --- a/_darcs/pristine/scripts/xmppconfirmhandler.php +++ b/_darcs/pristine/scripts/xmppconfirmhandler.php @@ -110,7 +110,7 @@ class XmppConfirmHandler extends XmppQueueHandler { $confirm->address_type = 'jabber'; $confirm->orderBy('modified DESC'); $confirm->limit(1); - if ($confirm->find(TRUE)) { + if ($confirm->find(true)) { $this->log(LOG_INFO, 'Claiming confirmation for ' . $confirm->address); # working around some weird DB_DataObject behaviour $confirm->whereAdd(''); # clears where stuff -- cgit v1.2.3-54-g00ecf