]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fallback for www. addresses
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Jun 2009 18:45:33 +0000 (14:45 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Jun 2009 18:45:33 +0000 (14:45 -0400)
classes/Status_network.php

index f8d6756b69090c4c51e7127ba2497e4b0e1a6444..8726096e3c38ac98e3dd9bc32463502be8daea1d 100644 (file)
@@ -132,6 +132,13 @@ class Status_network extends DB_DataObject
             }
         } else {
             $sn = self::memGet('hostname', strtolower($servername));
+
+            if (empty($sn)) {
+                // Try for a no-www address
+                if (strncasecmp($servername, 'www.', 4)) {
+                    $sn = self::memGet('hostname', strtolower(substr($servername, 4)));
+                }
+            }
         }
 
         if (!empty($sn)) {