$_val) { switch($_key) { case 'content': if(!is_array($_val)) { $$_key = smarty_function_escape_special_chars($_val); } else { throw new SmartyException("html_href_link: Unable to determine the page link!", E_USER_NOTICE); } break; case 'oos_get': case 'addentry_id': case 'add_session_id': case 'search_engine_safe': $$_key = (string)$_val; break; case 'anchor': $anchor = smarty_function_escape_special_chars($_val); break; default: if(!is_array($_val)) { $parameters .= $_key.'='.smarty_function_escape_special_chars($_val).'&'; } else { throw new SmartyException("html_href_link: parameters '$_key' cannot be an array", E_USER_NOTICE); } break; } } if (empty($content) && ($debug == 1) ) { throw new SmartyException("html_href_link: Unable to determine the page link!", E_USER_NOTICE); } if (isset($addentry_id)) { $addentry_id = $addentry_id + 2; $parameters .= 'entry_id='.$addentry_id.'&'; } if (isset($oos_get)) { $parameters .= $oos_get; } $content = trim($content); $link = OOS_HTTPS_SERVER . OOS_SHOP; if (isset($parameters)) { $link .= 'index.php?content=' . $content . '&' . oos_output_string($parameters); } else { $link .= 'index.php?content=' . $content; } $separator = '&'; while ( (substr($link, -5) == '&') || (substr($link, -1) == '?') ) { if (substr($link, -1) == '?') { $link = substr($link, 0, -1); } else { $link = substr($link, 0, -5); } } if (isset($anchor)) { $link .= '#' . $anchor; } // Add the session ID when moving from HTTP and HTTPS servers or when SID is defined if (isset($_SESSION)) { // Add the session ID when moving from HTTP and HTTPS servers or when SID is defined if ($add_session_id == TRUE){ $_sid = $session->getName() . '=' . $session->getId(); } if ( $spider_kill_sid == 'true') $_sid = NULL; } if ( ($search_engine_safe == 'true') && $oEvent->installed_plugin('sefu') ) { $link = str_replace(array('?', '&', '='), '/', $link); $separator = '?'; $pos = strpos ($link, 'action'); if ($pos === FALSE) { $url_rewrite = new url_rewrite; $link = $url_rewrite->transform_uri($link); } } if (isset($_sid)) { $link .= $separator . oos_output_string($_sid); } return $link; }