53 $argStr = trim($argStr);
55 @list(
$url, $params) = explode(
' ', $argStr, 2);
57 if (substr(
$url, 0, 1) ==
'/') {
61 if (strpos($argStr,
'$') ===
false &&
$url !=
'.') {
63 $params = $compiler->_parse_attrs($params,
false);
64 foreach ($params as $k => $v) {
65 if (in_array(substr($v, 0, 1), array(
'"',
"'"))) {
66 $params[$k] = substr($v, 1, -1);
69 $url = $xoops->buildUrl(
$url, $params);
72 return "echo '" . addslashes(htmlspecialchars(
$url)) .
"';";
76 $str =
"\$_SERVER['REQUEST_URI']";
78 $str =
"\$xoops->path('$url', true)";
81 $params = $compiler->_parse_attrs($params,
false);
82 $str =
"\$xoops->buildUrl($str, array(\n";
83 foreach ($params as $k => $v) {
84 $str .= var_export($k,
true) .
" => $v,\n";
88 return "echo htmlspecialchars($str);";