Module: nagvis Branch: master Commit: 0d580fccd3c9a0774050dfa2041ebd15df99b4b3 URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=0d580fccd3c9a0774050dfa2041ebd15df99b4b3
Author: LaMi <[email protected]> Date: Mon Mar 8 21:58:19 2010 +0100 #203 auth.db is also being created by authorisation module --- share/server/core/classes/CoreAuthModSQLite.php | 3 ++- .../core/classes/CoreAuthorisationModSQLite.php | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/share/server/core/classes/CoreAuthModSQLite.php b/share/server/core/classes/CoreAuthModSQLite.php index ff77f70..88b3005 100644 --- a/share/server/core/classes/CoreAuthModSQLite.php +++ b/share/server/core/classes/CoreAuthModSQLite.php @@ -59,7 +59,8 @@ class CoreAuthModSQLite extends CoreAuthModule { // Open sqlite database if(!$this->DB->open($this->CORE->getMainCfg()->getValue('paths', 'cfg').'auth.db')) { - // FIXME: Errorhandling + new GlobalMessage('ERROR', GlobalCore::getInstance()->getLang()->getText('Unable to open auth database ([DB])', + Array('DB' => $this->CORE->getMainCfg()->getValue('paths', 'cfg').'auth.db'))); } else { // Create initial db scheme if needed if(!$this->DB->tableExist('users')) { diff --git a/share/server/core/classes/CoreAuthorisationModSQLite.php b/share/server/core/classes/CoreAuthorisationModSQLite.php index f409282..a5a4107 100644 --- a/share/server/core/classes/CoreAuthorisationModSQLite.php +++ b/share/server/core/classes/CoreAuthorisationModSQLite.php @@ -38,7 +38,13 @@ class CoreAuthorisationModSQLite extends CoreAuthorisationModule { // Open sqlite database if(!$this->DB->open($this->CORE->getMainCfg()->getValue('paths', 'cfg').'auth.db')) { - // FIXME: Errorhandling + new GlobalMessage('ERROR', GlobalCore::getInstance()->getLang()->getText('Unable to open auth database ([DB])', + Array('DB' => $this->CORE->getMainCfg()->getValue('paths', 'cfg').'auth.db'))); + } else { + // Create initial db scheme if needed + if(!$this->DB->tableExist('users')) { + $this->DB->createInitialDb(); + } } } ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
