original_string: private function buildQueryUrl($params)
      {
          $url = parse_url($_SERVER['REQUEST_URI']);
          if (! array_key_exists('query', $url)) {
              $url['query'] = '';
          }
          parse_str($url['query'], $url['query']);
          if (! is_array($url['query'])) {
              $url['query'] = array();
          }
          // Remove 'start parameter if it exists
          if (array_key_exists('start', $url['query'])) {
              unset($url['query']['start']);
          }
          // Add extra parameters from argument
          $url['query'] = array_merge($url['query'], $params);
          $url['query'] = http_build_query($url['query']);
          $url = $url['path'] . ($url['query'] ? '?'.$url['query'] : '');
          
          return $url;
      }
code: private function buildQueryUrl($params)
      {
          $url = parse_url($_SERVER['REQUEST_URI']);
          if (! array_key_exists('query', $url)) {
              $url['query'] = '';
          }
          parse_str($url['query'], $url['query']);
          if (! is_array($url['query'])) {
              $url['query'] = array();
          }
          // Remove 'start parameter if it exists
          if (array_key_exists('start', $url['query'])) {
              unset($url['query']['start']);
          }
          // Add extra parameters from argument
          $url['query'] = array_merge($url['query'], $params);
          $url['query'] = http_build_query($url['query']);
          $url = $url['path'] . ($url['query'] ? '?'.$url['query'] : '');
          
          return $url;
      }
code_tokens: private function buildQueryUrl ( $ params ) { $ url = parse_url ( $ _SERVER [ 'REQUEST_URI' ] ) ; if ( ! array_key_exists ( 'query' , $ url ) ) { $ url [ 'query' ] = '' ; } parse_str ( $ url [ 'query' ] , $ url [ 'query' ] ) ; if ( ! is_array ( $ url [ 'query' ] ) ) { $ url [ 'query' ] = array ( ) ; } // Remove 'start parameter if it exists if ( array_key_exists ( 'start' , $ url [ 'query' ] ) ) { unset ( $ url [ 'query' ] [ 'start' ] ) ; } // Add extra parameters from argument $ url [ 'query' ] = array_merge ( $ url [ 'query' ] , $ params ) ; $ url [ 'query' ] = http_build_query ( $ url [ 'query' ] ) ; $ url = $ url [ 'path' ] . ( $ url [ 'query' ] ? '?' . $ url [ 'query' ] : '' ) ; return $ url ; }
docstring: Build a nice query string for the results
  
  @return string
docstring_tokens: Build a nice query string for the results