]> git.mxchange.org Git - friendica.git/blobdiff - library/OAuth1.php
Merge branch 'release/jquery-update'
[friendica.git] / library / OAuth1.php
index 3b211b146e79ec8f75e27a2f160ada974ef9c1d6..994962a8587a1a0e0be72d8a246502e9dedfc90f 100644 (file)
@@ -3,8 +3,10 @@
 
 /* Generic exception class
  */
-class OAuthException extends Exception {
-  // pass
+if (!class_exists('OAuthException')) {
+       class OAuthException extends Exception {
+               // pass
+       }
 }
 
 class OAuthConsumer {
@@ -289,7 +291,7 @@ class OAuthRequest {
       }
 
     }
-    // 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'] );
@@ -421,8 +423,11 @@ class OAuthRequest {
   /**
    * 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);
   }
 
   /**