Code quality : use as often as possible global $g_user instead of recreating a new User object

This commit is contained in:
Dany De Bontridder 2012-06-13 12:52:31 +00:00
parent d86a5d4a44
commit 652cf8d4c7
50 changed files with 221 additions and 255 deletions

View file

@ -49,10 +49,7 @@ foreach ( array('j','ctl') as $a )
}
}
$cn=new Database(dossier::id());
$user=new User($cn);
$user->check();
if ( $user->check_jrn($_GET['j'])=='X' ) return '{"saldo":"0"}';
if ( $g_user->check_jrn($_GET['j'])=='X' ) return '{"saldo":"0"}';
/* make a filter on the exercice */
$filter_year=" j_tech_per in (select p_id from parm_periode ".