Browse Source

Fix undefined variable warnings

master
Skylar Ittner 1 year 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";
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) {

+ 1
- 1
lib/getpunchtable.php View File

@@ -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) {

+ 1
- 1
lib/getshifttable.php View File

@@ -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