X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=d48d4c18c59b485c6ded326c1d8493be6bda1fa8;hb=5a2bab07b25443eacc7f5cfde4b9932cdb511e92;hp=db090cb288171e247e95e109141af3fdb26f6c0c;hpb=f81aaa5375f490987aade44943880872d3f185d2;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index db090cb288..d48d4c18c5 100644 --- a/lib/util.php +++ b/lib/util.php @@ -2139,7 +2139,7 @@ function common_url_to_nickname($url) $parts = parse_url($url); - # If any of these parts exist, this won't work + // If any of these parts exist, this won't work foreach ($bad as $badpart) { if (array_key_exists($badpart, $parts)) { @@ -2147,15 +2147,15 @@ function common_url_to_nickname($url) } } - # We just have host and/or path + // We just have host and/or path - # If it's just a host... + // If it's just a host... if (array_key_exists('host', $parts) && (!array_key_exists('path', $parts) || strcmp($parts['path'], '/') == 0)) { $hostparts = explode('.', $parts['host']); - # Try to catch common idiom of nickname.service.tld + // Try to catch common idiom of nickname.service.tld if ((count($hostparts) > 2) && (strlen($hostparts[count($hostparts) - 2]) > 3) && # try to skip .co.uk, .com.au @@ -2163,12 +2163,12 @@ function common_url_to_nickname($url) { return common_nicknamize($hostparts[0]); } else { - # Do the whole hostname + // Do the whole hostname return common_nicknamize($parts['host']); } } else { if (array_key_exists('path', $parts)) { - # Strip starting, ending slashes + // Strip starting, ending slashes $path = preg_replace('@/$@', '', $parts['path']); $path = preg_replace('@^/@', '', $path); $path = basename($path);