X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/2828826fd20134db9bd8e67e2c3ce883b5b97146..7daf31ceedd9e6b0aba992d962fc8c66a1c5d8fd:/pear_lib_tmp/HTML/Link.php?ds=inline diff --git a/pear_lib_tmp/HTML/Link.php b/pear_lib_tmp/HTML/Link.php index 6f956f9..2059785 100644 --- a/pear_lib_tmp/HTML/Link.php +++ b/pear_lib_tmp/HTML/Link.php @@ -80,14 +80,14 @@ class HTML_Link extends HTML_Common { * Constructor. * * @param string $href Hypertext reference. - * @param mixed &$contents Link contents. + * @param mixed $contents Link contents. * @param array $getVars Array (as key => value pairs) of GET variables to pass to the link. * @param array $attrs Other links (A tag) attributes. * * @return void * @access public */ - function HTML_Link($href = '', &$contents = '', $getVars = array(), $attrs = array()) // ~X2C + function HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array()) // ~X2C { if (is_array($attrs)) { $attrs['href'] = $href; @@ -113,7 +113,7 @@ class HTML_Link extends HTML_Common { foreach ($this->getAttributes() as $key => $val) { if ($key == 'href') { $vars = array(); - foreach ($this->_getVars() as $var => $v) { + foreach ($this->_getVars as $var => $v) { if (is_object($v) and method_exists($v, 'tostring')) { $v = $v->tostring(); } elseif (is_object($v) or is_array($v)) { @@ -121,11 +121,13 @@ class HTML_Link extends HTML_Common { } $vars[] = urlencode($var) . '=' . urlencode($v); } - $val = '?' . join('&', $vars); + if ($vars) { + $val = '?' . join('&', $vars); + } } $attrs .= ' ' . $key . '="' . htmlentities($val) . '"'; } - return "" . htmlentities($this->getContents) . ''; + return "" . htmlentities($this->getContents()) . ''; } // -X2C @@ -206,7 +208,7 @@ If they doesn't exists, they are added, if they exists, they are updated. { $keys = func_get_args(); foreach ($keys as $key) { - unset($this->_getVars($key)); + unset($this->_getVars[$key]); } } // -X2C