]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/util.php
Merge remote-tracking branch 'mainline/1.0.x' into people_tags_rebase
[quix0rs-gnu-social.git] / lib / util.php
index db090cb288171e247e95e109141af3fdb26f6c0c..d48d4c18c59b485c6ded326c1d8493be6bda1fa8 100644 (file)
@@ -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);