diff options
author | Evan Prodromou <evan@status.net> | 2010-01-25 18:10:59 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-25 18:10:59 -0500 |
commit | b6aa1511eb868d740f8893160ce8bef387725867 (patch) | |
tree | a583cfb455da2cd53f6dd27b7cec6ef85cc6894d /classes/Status_network.php | |
parent | b3121d09c9dc49579934189fc56a0e0195c673f9 (diff) | |
parent | e26a843caf9f6bb0d11a7128884db235ededcce0 (diff) |
Merge branch 'master' into 0.9.x
Diffstat (limited to 'classes/Status_network.php')
-rw-r--r-- | classes/Status_network.php | 17 |
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; + } + } } |