Beispiel #1
0
/**
 * Implodes an assoc array into a partial url query string
 *
 * @param mixed $array							- Array to parse
 * @param boolean $skip_empty					- Whether to skip empty elements
 * @return string								- The parsed result
 */
function urlimplode($array, $skip_empty = true, $skip_urlencode = false, $preserve_uni = false)
{
	if (!$skip_urlencode)
	{
		foreach ($array AS $key => $value)
		{
			$array[$key] = ($preserve_uni ? urlencode_uni($value) : urlencode($value));
		}
	}

	return implode_both('=', ($skip_urlencode ? '&' : '&'), $array, $skip_empty);
}
/**
 * Implodes an assoc array into a partial url query string
 *
 * @param mixed $array							- Array to parse
 * @param boolean $skip_empty					- Whether to skip empty elements
 * @return string								- The parsed result
 */
function urlimplode($array, $skip_empty = true, $skip_urlencode = false)
{
    if (!$skip_urlencode) {
        foreach ($array as $key => $value) {
            $array[$key] = urlencode($value);
        }
    }
    return implode_both('=', '&', $array, $skip_empty);
}
Beispiel #3
0
 /**
  * Renders the pageinfo query string.
  * Vars that are included in the main uri should be defined in $ignorelist so
  * they can be skipped.
  *
  * @return string
  */
 protected function get_query()
 {
     $arguments = array();
     // Add session argument if settings require it
     if (!($this->urloptions & SEO_NOSESSION) and isset($this->registry->session) and $this->registry->session->visible) {
         $arguments['s'] = $this->registry->session->vars['dbsessionhash'];
     }
     // Add any arguments that are not already displayed as part of friendly url
     if (!empty($this->pageinfo) and is_array($this->pageinfo)) {
         foreach ($this->pageinfo as $var => $value) {
             if (!$this->skip_query_var($var, false)) {
                 $this->addArgument($arguments, $var, $value);
                 // VBIV-11727
             }
         }
     }
     // Check ampersand to use
     $amp = $this->urloptions & SEO_JS ? '&' : '&';
     $arguments = implode_both('=', $amp, $arguments);
     return $arguments;
 }