You are here

function dsq_get_query_string in Drupal Most Popular 7

4 calls to dsq_get_query_string()
DisqusResource::__call in modules/mostpopular_disqus/disqusapi/disqusapi.php
dsq_get_post_content in modules/mostpopular_disqus/disqusapi/url.php
_dsq_curl_urlopen in modules/mostpopular_disqus/disqusapi/url.php
_dsq_fopen_urlopen in modules/mostpopular_disqus/disqusapi/url.php

File

modules/mostpopular_disqus/disqusapi/url.php, line 5

Code

function dsq_get_query_string($postdata) {
  $postdata_str = '';
  if ($postdata) {
    foreach ($postdata as $key => $value) {
      if (!is_array($value)) {
        $postdata_str .= urlencode($key) . '=' . urlencode($value) . '&';
      }
      else {

        // if the item is an array, expands it so that the 'allows multiple' API option can work
        foreach ($value as $multipleValue) {
          $postdata_str .= urlencode($key) . '=' . urlencode($multipleValue) . '&';
        }
      }
    }
  }
  return $postdata_str;
}