X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/532f3a164c412fd9b8ab7bbb07b6631d2e8c204b..c6b15817758e60270fb968945fb7f3164c3f4ef9:/lib/MECON/HTML/Link.php?ds=sidebyside diff --git a/lib/MECON/HTML/Link.php b/lib/MECON/HTML/Link.php index 1252dff..08e5275 100644 --- a/lib/MECON/HTML/Link.php +++ b/lib/MECON/HTML/Link.php @@ -170,7 +170,10 @@ If they doesn't exists, they are added, if they exists, they are updated. */ function updateGetVars($vars) { - $this->_getVars += $vars; + foreach ($vars as $key => $value) + { + $this->_getVars[$key] = $value; + } } /** @@ -193,13 +196,19 @@ If they doesn't exists, they are added, if they exists, they are updated. * Adds contents to the link. * * @param mixed &$contents Contents to add. Can be an object with a toHtml() method. + * @param bool $front Tells where to put the new content. * * @return void * @access public */ - function addContents($contents) + function addContents($contents, $front = false) { - $this->_contents[] = $contents; + if ($front) { + array_unshift($this->_contents, $contents); + } + else { + $this->_contents[] = $contents; + } } /**