Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Dec 9, 2023
1 parent 4a72666 commit 71fc68e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/Live/Objects/Live_schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static function getAll($users_id=0, $activeHoursAgo=false)
$sql .= " AND users_id = $users_id ";
}
if ($activeHoursAgo) {
$sql .= " AND (scheduled_time > DATE_SUB(NOW(), INTERVAL {$activeHoursAgo} HOUR) OR (scheduled_php_time <= ".time()."))";
$sql .= " AND (scheduled_time > DATE_SUB(NOW(), INTERVAL {$activeHoursAgo} HOUR) OR (scheduled_php_time >= ".time()."))";
}
$sql .= self::getSqlFromPost();

Expand Down Expand Up @@ -238,7 +238,7 @@ public static function getAllActiveLimit($users_id=0,$limit = 100)
$sql .= " AND users_id = $users_id ";
}

$sql .= " AND ((CONVERT_TZ(scheduled_time, timezone, @@session.time_zone ) > NOW() || scheduled_time > NOW()) OR (scheduled_php_time <= ".time().")) "
$sql .= " AND ((CONVERT_TZ(scheduled_time, timezone, @@session.time_zone ) > NOW() || scheduled_time > NOW()) OR (scheduled_php_time >= ".time().")) "
. " ORDER BY scheduled_time ASC LIMIT {$limit} ";
//echo $sql;
$res = sqlDAL::readSql($sql);
Expand Down

0 comments on commit 71fc68e

Please sign in to comment.