]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix consumer fetching, nonce making
authorEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 20:06:45 +0000 (16:06 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 2 Jun 2008 20:06:45 +0000 (16:06 -0400)
darcs-hash:20080602200645-84dde-c72e2e98a955bdd7768fa39da30660dfcffd0f15.gz

actions/remotesubscribe.php
lib/oauthstore.php

index e7a9abb180ffad3837c40d4b82306488d56a9154..3dea07f16d9909b99645752f97c8e776247f3ab6 100644 (file)
@@ -358,4 +358,8 @@ class RemotesubscribeAction extends Action {
                common_redirect($req->to_url());
                return;
        }
+       
+       function make_nonce() {
+               return common_good_rand(16);
+       }
 }
\ No newline at end of file
index fe7f68c02cbcfb55cffcea2cdbf6a5ee53c5bc5c..4ad1234551592a61c6e47a8c8170e76047c1279c 100644 (file)
@@ -26,7 +26,7 @@ class LaconicaOAuthDataStore extends OAuthDataStore {
        # We keep a record of who's contacted us
        
        function lookup_consumer($consumer_key) {
-               $con = new Consumer('key', $consumer_key);
+               $con = Consumer::staticGet('consumer_key', $consumer_key);
                if (!$con) {
                        $con = new Consumer();
                        $con->consumer_key = $consumer_key;