]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix tmhOAuth missing query parameters (closes #416)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 10 Jan 2012 08:49:10 +0000 (12:49 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 10 Jan 2012 08:49:10 +0000 (12:49 +0400)
include/functions.php
include/rssfuncs.php

index 650196830d80b651d9121da2ec03ee9de7cededf..5ccbe8a588d85143d7908a49d3fd590905145ccb 100644 (file)
 
                }
        }
-
 ?>
index 84173f05a2acf3dae0f3f22db2b86af75db8a9f7..5502c9f50f7f870d9ee05bd8aa0a25f1ad43f625 100644 (file)
                                'user_secret' => $access_token['oauth_token_secret'],
                        ));
 
-                       $code = $tmhOAuth->request('GET', $url);
+                       $code = $tmhOAuth->request('GET', $url,
+                               convertUrlQuery(parse_url($url, PHP_URL_QUERY)));
 
                        if ($code == 200) {
 
                }
        }
 
+       /**
+       * Source: http://www.php.net/manual/en/function.parse-url.php#104527
+       * Returns the url query as associative array
+       *
+       * @param    string    query
+       * @return    array    params
+       */
+       function convertUrlQuery($query) {
+               $queryParts = explode('&', $query);
+
+               $params = array();
+
+               foreach ($queryParts as $param) {
+                       $item = explode('=', $param);
+                       $params[$item[0]] = $item[1];
+               }
+
+               return $params;
+       }
 ?>