Browse Source

- Remove versionned conf.xml file

- Update Conf class to return a default configuration
- Update Admin widget
pull/16/head
Jaussoin Timothée 13 years ago
parent
commit
07349c40e3
  1. 13
      config/conf.xml
  2. 8
      index.php
  3. 13
      system/Conf.php
  4. 2
      system/Widget/widgets/Admin/Admin.php

13
config/conf.xml

@ -1,13 +0,0 @@
<?xml version="1.0"?>
<config>
<theme>movim</theme>
<defLang>en</defLang>
<maxUsers>-1</maxUsers>
<logLevel>7</logLevel>
<db>mysql://movim:movim@localhost:3306/movim</db>
<boshUrl>http://localhost:5280/http-bind</boshUrl>
<xmppWhiteList></xmppWhiteList>
<user>edhelas</user>
<pass>4f4b4d2a53a07c54d604e25a9516a7a49388abd8</pass>
<sizeLimit>20240001</sizeLimit>
</config>

8
index.php

@ -46,9 +46,9 @@ ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL ^ E_DEPRECATED ^ E_NOTICE);
// If the configuration doesn't exist, run the installer.
if(!file_exists("config/conf.xml")) {
header('Location: admin/'); exit;
} else {
/*if(!file_exists("config/conf.xml")) {
header('Location: ?q=admin'); exit;
} else {*/
// Run
require('init.php');
@ -61,5 +61,5 @@ if(!file_exists("config/conf.xml")) {
// Closing stuff
WidgetWrapper::destroyInstance();
}
//}
?>

13
system/Conf.php

@ -25,7 +25,18 @@ class Conf
}
return self::$conf_files[$name];
} else {
return false;
// Return the default configuration
return array(
'theme' => 'movim',
'defLang' => 'en',
'maxUsers' => -1,
'logLevel' => 7,
'db' => 'mysql://movim:movim@localhost:3306/movim',
'boshUrl' => 'http://localhost:5280/http-bind',
'xmppWhiteList' => '',
'user' => 'admin',
'pass' => '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8',
'sizeLimit' => 20240001);
}
}

2
system/Widget/widgets/Admin/Admin.php

@ -228,7 +228,7 @@ class Admin extends WidgetBase {
<div class="'.$this->isValid($this->testDir(BASE_PATH)).'">
'.t('Read and write rights for the webserver in Movim\'s root directory').'
</div>
<div class="'.$this->isValid($this->testFile(BASE_PATH.'config/conf.xml')).'">
<div class="'.$this->isValid($this->testDir(BASE_PATH.'config/')).'">
'.t('Read and write rights conf.xml file in config/ directory').'
</div>';

Loading…
Cancel
Save