diff options
author | Brion Vibber <brion@pobox.com> | 2010-06-07 10:19:40 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-06-07 10:19:40 -0700 |
commit | d88b208edcb75ec864e09bb3ab29785b35064400 (patch) | |
tree | 6a3b2eb35fb792bffb7ebaf3b4f81fb1131466d1 /classes/Status_network.php | |
parent | a7e33ac89df9f05b7497bfb34c6e69b3329a87e5 (diff) | |
parent | 41e9dba7297d43b7de0cb7665901869910d1047a (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
plugins/OpenID/openid.php
Diffstat (limited to 'classes/Status_network.php')
-rw-r--r-- | classes/Status_network.php | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/classes/Status_network.php b/classes/Status_network.php index a452c32ce..4a1f2c374 100644 --- a/classes/Status_network.php +++ b/classes/Status_network.php @@ -149,21 +149,15 @@ class Status_network extends Safe_DataObject $this->decache(); # while we still have the values! return parent::delete(); } - + /** * @param string $servername hostname - * @param string $pathname URL base path * @param string $wildcard hostname suffix to match wildcard config + * @return mixed Status_network or null */ - static function setupSite($servername, $pathname, $wildcard) + static function getFromHostname($servername, $wildcard) { - 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))) { // special case for exact match if (0 == strcasecmp($servername, $wildcard)) { @@ -182,6 +176,23 @@ class Status_network extends Safe_DataObject } } } + return $sn; + } + + /** + * @param string $servername hostname + * @param string $pathname URL base path + * @param string $wildcard hostname suffix to match wildcard config + */ + static function setupSite($servername, $pathname, $wildcard) + { + global $config; + + $sn = null; + + // XXX I18N, probably not crucial for hostnames + // XXX This probably needs a tune up + $sn = self::getFromHostname($servername, $wildcard); if (!empty($sn)) { |