fix consumer fetching, nonce making

darcs-hash:20080602200645-84dde-c72e2e98a955bdd7768fa39da30660dfcffd0f15.gz
This commit is contained in:
Evan Prodromou 2008-06-02 16:06:45 -04:00
parent 10f9a8a125
commit 7b24d101c0
2 changed files with 5 additions and 1 deletions

View File

@ -358,4 +358,8 @@ class RemotesubscribeAction extends Action {
common_redirect($req->to_url()); common_redirect($req->to_url());
return; return;
} }
function make_nonce() {
return common_good_rand(16);
}
} }

View File

@ -26,7 +26,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore {
# We keep a record of who's contacted us # We keep a record of who's contacted us
function lookup_consumer($consumer_key) { function lookup_consumer($consumer_key) {
$con = new Consumer('key', $consumer_key); $con = Consumer::staticGet('consumer_key', $consumer_key);
if (!$con) { if (!$con) {
$con = new Consumer(); $con = new Consumer();
$con->consumer_key = $consumer_key; $con->consumer_key = $consumer_key;