/* Generic exception class
*/
-class OAuthException extends Exception {
- // pass
+if (!class_exists('OAuthException')) {
+ class OAuthException extends Exception {
+ // pass
+ }
}
class OAuthConsumer {
}
}
- // fix for friendika redirect system
+ // fix for friendica redirect system
$http_url = substr($http_url, 0, strpos($http_url,$parameters['q'])+strlen($parameters['q']));
unset( $parameters['q'] );
/**
* builds the data one would send in a POST request
*/
- public function to_postdata() {
- return OAuthUtil::build_http_query($this->parameters);
+ public function to_postdata($raw = false) {
+ if ($raw)
+ return($this->parameters);
+ else
+ return OAuthUtil::build_http_query($this->parameters);
}
/**