Make site profiles work

This commit is contained in:
Zach Copley
2011-08-26 21:10:24 -07:00
parent a6000f3051
commit af97bc896e
4 changed files with 323 additions and 19 deletions

View File

@@ -113,6 +113,10 @@ class StatusNet
StatusNet::initDefaults($server, $path);
StatusNet::loadConfigFile($conffile);
$sprofile = common_config('site', 'profile');
if (!empty($sprofile)) {
StatusNet::loadSiteProfile($sprofile);
}
// Load settings from database; note we need autoload for this
Config::loadSettings();
@@ -302,6 +306,13 @@ class StatusNet
}
}
public static function loadSiteProfile($name)
{
global $config;
$settings = SiteProfile::getSettings($name);
$config = array_replace_recursive($config, $settings);
}
protected function _sn_to_path($sn)
{
$past_root = substr($sn, 1);