summaryrefslogtreecommitdiff
path: root/lib/oauthstore.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:21:29 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:21:29 -0500
commiteb2f9c98ac115ce67e9a740b200c832153ffa05c (patch)
tree562e524f12420a97fc66a5c9db0ccd6a1f9aea09 /lib/oauthstore.php
parentedbc0c665cc65875b4d14b79939233b1c9c06bb6 (diff)
replace NULL with null
Another global search-and-replace update. Here, I've replaced the PHP keyword 'NULL' with its lowercase version. This is another PEAR code standards change. darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
Diffstat (limited to 'lib/oauthstore.php')
-rw-r--r--lib/oauthstore.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/oauthstore.php b/lib/oauthstore.php
index aa705be30..421b618b7 100644
--- a/lib/oauthstore.php
+++ b/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;
}
}