'path' => $this->path,
'db_database' => $this->db['database'],
'db_type' => $this->db['type'],
- 'site_profile' => $this->siteProfile
+ 'site_profile' => $this->siteProfile,
+ 'nickname' => $this->adminNick
));
// assemble configuration file in a string
"\$config['db']['type'] = {$vals['db_type']};\n\n".
// site profile
- "\$config['site']['profile'] = {$vals['site_profile']};\n\n";
+ "\$config['site']['profile'] = {$vals['site_profile']};\n";
+
+ if ($this->siteProfile == "singleuser") {
+ $cfg .= "\$config['singleuser']['nickname'] = {$vals['nickname']};\n\n";
+ } else {
+ $cfg .= "\n";
+ }
// Normalize line endings for Windows servers
$cfg = str_replace("\n", PHP_EOL, $cfg);
* @return type array an array of settings
*/
static function getSettings() {
+ global $config;
return array(
- 'site' => array(
- 'inviteonly' => false,
- 'private' => false
- ),
+ // We only want to change these values, not replace entire 'site' array
+ 'site' => array_replace(
+ $config['site'], array(
+ 'inviteonly' => false,
+ 'private' => false,
+ 'closed' => false
+ )
+ ),
'plugins' => array(
'default' => array(
'Activity' => null,
'SearchSub' => null,
'StrictTransportSecurity' => null,
'TagSub' => null
- ),
- 'discovery' =>
- array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
- )
+ )
+ ),
+ 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
);
}
}
* @return type array an array of settings
*/
static function getSettings() {
+ global $config;
return array(
- 'site' => array(
- 'inviteonly' => true,
- 'private' => true
- ),
+ // We only want to change these values, not replace entire 'site' array
+ 'site' => array_replace(
+ $config['site'], array(
+ 'inviteonly' => true,
+ 'private' => true,
+ )
+ ),
'plugins' => array(
'default' => array(
'Activity' => null,
* @return type array an array of settings
*/
static function getSettings() {
+ global $config;
return array(
- 'site' => array(
- 'inviteonly' => true,
- 'private' => false
- ),
+ // We only want to change these values, not replace entire 'site' array
+ 'site' => array_replace(
+ $config['site'], array(
+ 'private' => false,
+ 'closed' => false
+ )
+ ),
'plugins' => array(
'default' => array(
'Activity' => null,
'SearchSub' => null,
'StrictTransportSecurity' => null,
'TagSub' => null
- ),
- 'discovery' =>
- array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
- )
+ )
+ ),
+ 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
);
}
* @return type array an array of settings
*/
static function getSettings() {
+ global $config;
return array(
'singleuser' => array('enabled' => true),
- 'site' => array(
- 'private' => false,
- 'closed' => true,
- ),
+ // We only want to change these values, not replace entire 'site' array
+ 'site' => array_replace(
+ $config['site'], array(
+ 'private' => false,
+ 'closed' => true,
+ )
+ ),
'plugins' => array(
'default' => array(
'Activity' => null,
'StrictTransportSecurity' => null,
'TagSub' => null,
'TwitterBridge' => null,
- 'FacebookBridge' => null
- ),
- 'discovery' =>
- array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
- )
+ 'FacebookBridge' => null,
+ )
+ ),
+ 'discovery' => array('cors' => true) // Allow Cross-Origin Resource Sharing for service discovery (host-meta, XRD, etc.)
);
}