X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/834bee1cf2c5bd122b3e941c70b5c2f03ee80a27..d7bed7845acae13f729692fe9261ebe7c9e51012:/lib/MLIB/HTML/Link.php diff --git a/lib/MLIB/HTML/Link.php b/lib/MLIB/HTML/Link.php index 08e5275..511b387 100644 --- a/lib/MLIB/HTML/Link.php +++ b/lib/MLIB/HTML/Link.php @@ -1,16 +1,15 @@ _getVars as $var => $v) { - if (is_object($v) and method_exists($v, 'tostring')) { - $v = $v->tostring(); - } elseif (is_object($v)) { - $v = serialize($v); - } - if (is_array($v)) { - foreach ($v as $i) { - $vars[] = urlencode($var) . '[]=' . urlencode($i); + if ($this->_getVars) + { + foreach ($this->_getVars as $var => $v) { + if (is_object($v) and method_exists($v, 'tostring')) { + $v = $v->tostring(); + } elseif (is_object($v)) { + $v = serialize($v); + } + if (is_array($v)) { + foreach ($v as $i) { + $vars[] = urlencode($var) . '[]=' . urlencode($i); + } + } else { + $vars[] = urlencode($var) . '=' . urlencode($v); } - } else { - $vars[] = urlencode($var) . '=' . urlencode($v); } + return join('&', $vars); } - return join('&', $vars); } /**