/** * @params object parameters set by user for the plugin * @return string a list of sef urls similar to that of the current page */ function shGetSimilarUrls($path, $params) { // init result $urls = ''; // current path $path = JString::trim($path); $path = JString::trim($path, '.'); // if empty, we may be on a non-sef urls if (empty($path)) { return $urls; } $urlList = shFindSimilarUrls($path, $params); $urls = shFormatSimilarUrls($urlList); return $urls; }
/** * @params object parameters set by user for the plugin * @return string a list of sef urls similar to that of the current page */ function shGetSimilarUrls($params) { // init result $urls = ''; // first get current sef url $shPageInfo =& shRouter::shPageInfo(); // current path $path = JString::trim($shPageInfo->shCurrentPagePath); $path = JString::trim($path, '.'); // if empty, we may be on a non-sef urls if (empty($path)) { return $urls; } $urlList = shFindSimilarUrls($path, $params); $urls = shFormatSimilarUrls($urlList); return $urls; }