<?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
-------------------------------------------------------------------------------
- Ministerio de EconomÃa
- meconlib
+ mlib
-------------------------------------------------------------------------------
-This file is part of meconlib.
+This file is part of mlib.
-meconlib is free software; you can redistribute it and/or modify it under
+mlib is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
-meconlib is distributed in the hope that it will be useful, but WITHOUT
+mlib is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* @package HTML
* @access public
*/
-class MECON_HTML_Link extends HTML_Common {
+class MLIB_HTML_Link extends HTML_Common {
/**
* Variables to send via GET HTTP method.
*
* @return void
* @access public
*/
- function MECON_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array())
+ function MLIB_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array())
{
if (is_array($attrs)) {
$attrs['href'] = $href;
if (!isset($attrs['class'])){
- $attrs['class'] = 'mecon_html_link';
+ $attrs['class'] = 'MLIB_html_link';
}
} else {
$attrs .= " href=$href";
*/
function getCSS()
{
- return '/MECON/css/html/link';
+ return '/MLIB/css/html/link';
}
/**
function getQueryString()
{
$vars = array();
- 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);
+ 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);
}
/**