piwik/plugins/SitesManager/API.php
/**
     * Clean the parameter URLs:
     * - if the parameter is a string make it an array
     * - remove the trailing slashes if found
     *
     * @param string|array urls
     * @return array the array of cleaned URLs
     */
Clean the parameter URLs:
- if the parameter is a string make it an array
- remove the trailing slashes if found

@param string|array urls
@return array the array of cleaned URLs
Clean the parameter URLs : - if the parameter is a string make it an array - remove the trailing slashes if found @param string|array urls @return array the array of cleaned URLs
private function cleanParameterUrls($urls)
    {
        if (!is_array($urls)) {
            $urls = array($urls);
        }
        $urls = array_filter($urls);
        $urls = array_map('urldecode', $urls);
        foreach ($urls as &$url) {
            $url = $this->removeTrailingSlash($url);
            if (strpos($url, 'http') !== 0) {
                $url = 'http://' . $url;
            }
            $url = trim($url);
            $url = Common::sanitizeInputValue($url);
        }
        $urls = array_unique($urls);
        return $urls;
    }
private function cleanParameterUrls ( $ urls ) { if ( ! is_array ( $ urls ) ) { $ urls = array ( $ urls ) ; } $ urls = array_filter ( $ urls ) ; $ urls = array_map ( 'urldecode' , $ urls ) ; foreach ( $ urls as & $ url ) { $ url = $ this -> removeTrailingSlash ( $ url ) ; if ( strpos ( $ url , 'http' ) !== 0 ) { $ url = 'http://' . $ url ; } $ url = trim ( $ url ) ; $ url = Common :: sanitizeInputValue ( $ url ) ; } $ urls = array_unique ( $ urls ) ; return $ urls ; }
Clean the parameter URLs:
 - if the parameter is a string make it an array
 - remove the trailing slashes if found
Clean the parameter URLs : - if the parameter is a string make it an array - remove the trailing slashes if found