come up nicer on startup if the opensim.ini section isn't there
parent
4ddc7d66d6
commit
9082316757
|
@ -1,8 +1,6 @@
|
||||||
// ContentManagementModule.cs
|
// ContentManagementModule.cs
|
||||||
// User: bongiojp
|
// User: bongiojp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
@ -26,21 +24,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
|
||||||
CMView m_view = null;
|
CMView m_view = null;
|
||||||
bool initialised = false;
|
bool initialised = false;
|
||||||
bool m_posted = false;
|
bool m_posted = false;
|
||||||
bool m_enabled = true;
|
bool m_enabled = false;
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource source)
|
public void Initialise(Scene scene, IConfigSource source)
|
||||||
{
|
{
|
||||||
string databaseDir = "./";
|
string databaseDir = "./";
|
||||||
string database = "FilesyStemDatabase";
|
string database = "FileSystemDatabase";
|
||||||
int channel = 345;
|
int channel = 345;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!source.Configs["CMS"].GetBoolean("Enabled", false))
|
if (source.Configs["CMS"] == null)
|
||||||
m_enabled = false;
|
return;
|
||||||
|
|
||||||
|
m_enabled = source.Configs["CMS"].GetBoolean("Enabled", false);
|
||||||
databaseDir = source.Configs["CMS"].GetString("Directory", databaseDir);
|
databaseDir = source.Configs["CMS"].GetString("Directory", databaseDir);
|
||||||
database = source.Configs["CMS"].GetString("Database", database);
|
database = source.Configs["CMS"].GetString("Database", database);
|
||||||
channel = source.Configs["CMS"].GetInt("Channel", channel);
|
channel = source.Configs["CMS"].GetInt("Channel", channel);
|
||||||
|
|
||||||
if (database != "FileSystemDatabase" && database != "GitDatabase")
|
if (database != "FileSystemDatabase" && database != "GitDatabase")
|
||||||
{
|
{
|
||||||
m_log.ErrorFormat("[Content Management]: The Database attribute must be defined as either FileSystemDatabase or GitDatabase");
|
m_log.ErrorFormat("[Content Management]: The Database attribute must be defined as either FileSystemDatabase or GitDatabase");
|
||||||
|
|
Loading…
Reference in New Issue