X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fadmin.php;h=bc6f097520ad8d460882d33f77e30adb79359a58;hb=b3cd1320f091b2df9c8ed5f7b995a3d88c26ecad;hp=11aa7f6f6c26ee7aa27779bb1b2450e94bbb7988;hpb=e84223d415a7a3936e9fbe60216d99ccb05f8c84;p=platal.git diff --git a/modules/admin.php b/modules/admin.php index 11aa7f6..bc6f097 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -132,7 +132,8 @@ class AdminModule extends PLModule function _getDays($year, $month) { // give a 'no filter' option - $months[0] = "----"; + $days = array(); + $days[0] = "----"; if ($year && $month) { $day_max = Array(-1, 31, checkdate(2, 29, $year) ? 29 : 28 , 31, @@ -174,6 +175,7 @@ class AdminModule extends PLModule function _getMonths($year) { // give a 'no filter' option + $months = array(); $months[0] = "----"; if ($year) { @@ -206,6 +208,7 @@ class AdminModule extends PLModule function _getYears() { // give a 'no filter' option + $years = array(); $years[0] = "----"; // retrieve available years @@ -236,7 +239,7 @@ class AdminModule extends PLModule $where = array(); if ($uid) - array_push($where, "uid='$uid'"); + array_push($where, "s.uid='$uid'"); // we were given at least a year if ($year) { @@ -374,8 +377,10 @@ class AdminModule extends PLModule } // Loads the user identity using the environment. - $user = User::get($login); - if (!$user) { + if ($login) { + $user = User::get($login); + } + if (empty($user)) { return; } @@ -391,7 +396,7 @@ class AdminModule extends PLModule } // Handles specific requests (AX sync, su, ...). - if(Post::has('logs_account')) { + if(Post::has('log_account')) { pl_redirect("admin/logger?loguser=$login&year=".date('Y')."&month=".date('m')); }