Browse Source

Fix undefined variable warnings

master
Skylar Ittner 11 months ago
parent
commit
c8664fabda
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      lib/getjobhistorytable.php
  2. 1
    1
      lib/getpunchtable.php
  3. 1
    1
      lib/getshifttable.php

+ 1
- 1
lib/getjobhistorytable.php View File

@@ -14,7 +14,7 @@ require_once __DIR__ . "/login.php";
14 14
 require_once __DIR__ . "/userinfo.php";
15 15
 
16 16
 $account_is_admin = account_has_permission($_SESSION['username'], "QWIKCLOCK_ADMIN");
17
-$showmanaged = ($VARS['show_all'] == 1 && (account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE") || $account_is_admin));
17
+$showmanaged = (!empty($VARS['show_all']) && $VARS['show_all'] == 1 && (account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE") || $account_is_admin));
18 18
 $managed_uids = [];
19 19
 $managed_uids[] = $_SESSION['uid'];
20 20
 if ($showmanaged) {

+ 1
- 1
lib/getpunchtable.php View File

@@ -14,7 +14,7 @@ require_once __DIR__ . "/login.php";
14 14
 require_once __DIR__ . "/userinfo.php";
15 15
 
16 16
 $account_is_admin = account_has_permission($_SESSION['username'], "QWIKCLOCK_ADMIN");
17
-$showmanaged = ($VARS['show_all'] == 1 && (account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE") || $account_is_admin));
17
+$showmanaged = (!empty($VARS['show_all']) && $VARS['show_all'] == 1 && (account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE") || $account_is_admin));
18 18
 $managed_uids = [];
19 19
 $managed_uids[] = $_SESSION['uid'];
20 20
 if ($showmanaged) {

+ 1
- 1
lib/getshifttable.php View File

@@ -14,7 +14,7 @@ header("Content-Type: application/json");
14 14
 require_once __DIR__ . "/login.php";
15 15
 require_once __DIR__ . "/userinfo.php";
16 16
 
17
-$showall = ($VARS['show_all'] == 1); // && account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE"));
17
+$showall = (!empty($VARS['show_all']) && $VARS['show_all'] == 1); // && account_has_permission($_SESSION['username'], "QWIKCLOCK_MANAGE"));
18 18
 
19 19
 $showmanaged = false;
20 20
 $managed_uids = [];

Loading…
Cancel
Save