summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-03 17:49:20 -0700
committerBrion Vibber <brion@pobox.com>2010-06-03 18:06:55 -0700
commit8b9436e8ae1ebcc7ef10752bb9666939200e26aa (patch)
tree7b4733d63875783d440c0927dd08a5a012e63549 /classes
parenta75095fa1a3926d1fcc18c3d7285141fa3bef344 (diff)
Option to divert PuSH items directly to the target site's queue when local
Diffstat (limited to 'classes')
-rw-r--r--classes/Status_network.php29
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)) {