Code improve noalyss_user: isolate repository from db
This commit is contained in:
parent
894a77618f
commit
69b690c4cb
7 changed files with 509 additions and 102 deletions
|
|
@ -34,6 +34,10 @@ require_once NOALYSS_INCLUDE.'/class/database.class.php';
|
|||
require_once NOALYSS_INCLUDE . '/class/noalyss_user.class.php';
|
||||
require_once NOALYSS_INCLUDE.'/lib/http_input.class.php';
|
||||
|
||||
//
|
||||
// for loading javascripts or style-sheet, it is needed to know the user
|
||||
// global preference, but the user is not yet connected
|
||||
// to a folder. So the Database is the repository
|
||||
$g_user=new Noalyss_user(new Database());
|
||||
set_language();
|
||||
// load message for javascript
|
||||
|
|
@ -43,6 +47,7 @@ if (isset ($_REQUEST['loadjs']) && $_REQUEST['loadjs']=='message')
|
|||
include_once NOALYSS_INCLUDE."/lib/message_javascript.php";
|
||||
return;
|
||||
}
|
||||
// Connect the user to the current folder and export file
|
||||
$cn=Dossier::connect();
|
||||
$g_user=new Noalyss_user($cn);
|
||||
$gDossier=dossier::id();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue