diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-06-15 22:52:14 +0000 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-06-15 22:52:14 +0000 |
commit | 1a5125137521a3c7f70c7e8a5000a1b81305cdfc (patch) | |
tree | 709126a00b72688e2db7354a7a3eed8c8cafe977 /classes | |
parent | 12cd87cd7b7c207b6f9c30996f0fabb019d6fd76 (diff) | |
parent | 177e4adf40bd41fc711c91fc6d16729b7f1b5796 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Status_network.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/classes/Status_network.php b/classes/Status_network.php index d2b942bfb..bf05ad61e 100644 --- a/classes/Status_network.php +++ b/classes/Status_network.php @@ -43,12 +43,19 @@ class Status_network extends DB_DataObject { global $config; + $sn = null; + // XXX I18N, probably not crucial for hostnames // XXX This probably needs a tune up if (0 == strncasecmp(strrev($wildcard), strrev($servername), strlen($wildcard))) { - $parts = explode('.', $servername); - $sn = Status_network::staticGet('nickname', strtolower($parts[0])); + // special case for exact match + if (0 == strcasecmp($servername, $wildcard)) { + $sn = Status_network::staticGet('nickname', ''); + } else { + $parts = explode('.', $servername); + $sn = Status_network::staticGet('nickname', strtolower($parts[0])); + } } else { $sn = Status_network::staticGet('hostname', strtolower($servername)); } @@ -70,9 +77,9 @@ class Status_network extends DB_DataObject $config['site']['logo'] = $sn->logo; } - return true; + return $sn; } else { - return false; + return null; } } } |