Minahito
minah****@users*****
2006年 4月 11日 (火) 18:17:07 JST
Index: xoops2jp/html/modules/user/class/PageNavigator.class.php diff -u xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.2 xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.3 --- xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.2 Tue Mar 28 22:32:03 2006 +++ xoops2jp/html/modules/user/class/PageNavigator.class.php Tue Apr 11 18:17:07 2006 @@ -32,6 +32,45 @@ return $ret; } + + /** + * Render URL with replacing base url. This method is used to user search list. + * + * @param $url string + * @param $mask mixed + */ + function getRenderOtherUrl($url, $mask = null) + { + if ($mask == null) { + $mask = array(); + } + if (!is_array($mask)) { + $mask = array($mask); + } + + if(count($this->mExtra) > 0) { + $tarr=array(); + + foreach($this->mExtra as $key=>$value) { + if (is_array($mask) && !isset($mask[$key])) { + $tarr[]=$key."=".urlencode($value); + } + } + + if (count($tarr)==0) { + return $url; + } + + if(strpos($url,"?")!==false) { + return $url."&".implode("&",$tarr); + } + else { + return $url."?".implode("&",$tarr); + } + } + + return $url; + } } ?>