Browse Source

Fix undefined variable warnings

master
Skylar Ittner 3 years ago
parent
commit
c8664fabda
  1. 2
      lib/getjobhistorytable.php
  2. 2
      lib/getpunchtable.php
  3. 2
      lib/getshifttable.php

2
lib/getjobhistorytable.php

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

2
lib/getpunchtable.php

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

2
lib/getshifttable.php

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

Loading…
Cancel
Save