/** * determine if two href's are equivalent (fuzzy match) * * @param string $url1 the first url to be matched * @param string $url2 the second url to be matched against * * @return boolean true if the urls match, else false * @access public * @static */ function match($url1, $url2) { $url1 = strtolower($url1); $url2 = strtolower($url2); $url1Str = parse_url($url1); $url2Str = parse_url($url2); if ($url1Str['path'] == $url2Str['path'] && CRM_Utils_String::extractURLVarValue($url1Str['query']) == CRM_Utils_String::extractURLVarValue($url2Str['query'])) { return true; } return false; }