summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-24 18:18:24 -0500
committerEvan Prodromou <evan@status.net>2010-01-24 18:18:24 -0500
commit238998eca017a3ddd6cc0c01a75f8ace37661b5d (patch)
tree969bad268fb0b29fb56256e9075af8982a8e9b3e /classes
parent38fe4ad9586706c69b46d68612d5a20415433ae7 (diff)
save nickname and wildcard when setting up status network
Diffstat (limited to 'classes')
-rw-r--r--classes/Status_network.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/classes/Status_network.php b/classes/Status_network.php
index ef8e1ed43..445f8a5a3 100644
--- a/classes/Status_network.php
+++ b/classes/Status_network.php
@@ -48,6 +48,7 @@ class Status_network extends DB_DataObject
static $cache = null;
static $base = null;
+ static $wildcard = null;
/**
* @param string $dbhost
@@ -187,7 +188,12 @@ class Status_network extends DB_DataObject
$config['db']['database'] = "mysqli://$dbuser:$dbpass@$dbhost/$dbname";
- $config['site']['name'] = $sn->sitename;
+ $config['site']['name'] = $sn->sitename;
+ $config['site']['nickname'] = $sn->nickname;
+
+ self::$wildcard = $wildcard;
+
+ $config['site']['wildcard'] =& self::$wildcard;
if (!empty($sn->hostname)) {
$config['site']['server'] = $sn->hostname;
@@ -230,4 +236,13 @@ class Status_network extends DB_DataObject
exit;
}
+
+ function getServerName()
+ {
+ if (!empty($this->hostname)) {
+ return $this->hostname;
+ } else {
+ return $this->nickname . '.' . self::$wildcard;
+ }
+ }
}