summaryrefslogtreecommitdiff
path: root/_darcs/pristine/actions
diff options
context:
space:
mode:
Diffstat (limited to '_darcs/pristine/actions')
-rw-r--r--_darcs/pristine/actions/accesstoken.php2
-rw-r--r--_darcs/pristine/actions/emailsettings.php16
-rw-r--r--_darcs/pristine/actions/finishremotesubscribe.php2
-rw-r--r--_darcs/pristine/actions/foaf.php4
-rw-r--r--_darcs/pristine/actions/imsettings.php12
-rw-r--r--_darcs/pristine/actions/othersettings.php4
-rw-r--r--_darcs/pristine/actions/profilesettings.php12
-rw-r--r--_darcs/pristine/actions/smssettings.php12
-rw-r--r--_darcs/pristine/actions/twitapifriendships.php2
-rw-r--r--_darcs/pristine/actions/twittersettings.php4
-rw-r--r--_darcs/pristine/actions/userauthorization.php18
11 files changed, 44 insertions, 44 deletions
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!");
}
}