X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Foauthstore.php;h=a4ea5ad4d0eccaa1eb9fa65541ab85748a1a2023;hb=221b779e88e51b70a2c3509798154c461203e636;hp=87d8cf2137b197718d93b4d5803502e5c50f867f;hpb=f1fda6c0503e32edfc99b297f4bf2cb07e629d9e;p=quix0rs-gnu-social.git diff --git a/lib/oauthstore.php b/lib/oauthstore.php index 87d8cf2137..a4ea5ad4d0 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -1,7 +1,7 @@ . */ -if (!defined('LACONICA')) { - exit(1); -} +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } require_once 'libomb/datastore.php'; -class LaconicaDataStore extends OMB_Datastore +class StatusNetOAuthDataStore extends OAuthDataStore { // We keep a record of who's contacted us @@ -158,7 +156,6 @@ class LaconicaDataStore extends OMB_Datastore return $this->new_access_token($consumer); } - /** * Revoke specified OAuth token * @@ -354,7 +351,7 @@ class LaconicaDataStore extends OMB_Datastore $author = User::staticGet('uri', $author_uri); } if (!$author) { - throw new Exception('No such user'); + throw new Exception('No such user.'); } common_log(LOG_DEBUG, print_r($author, true), __FILE__); @@ -365,9 +362,7 @@ class LaconicaDataStore extends OMB_Datastore false, null, $omb_notice->getIdentifierURI()); - if (is_string($notice)) { - throw new Exception($notice); - } + common_broadcast_notice($notice, true); } @@ -412,7 +407,7 @@ class LaconicaDataStore extends OMB_Datastore $user = User::staticGet('uri', $uri); } if (!$user) { - throw new Exception('No such user'); + throw new Exception('No such user.'); } return $user; }