Correct timeline when using Weekday

This commit is contained in:
Isaac Connor 2021-02-17 13:11:02 -05:00
parent d2777d2fe4
commit c608af4df7
1 changed files with 2 additions and 7 deletions

View File

@ -354,7 +354,7 @@ class Filter extends ZM_Object {
for ( $i = 0; $i < count($terms); $i++ ) {
$term = $terms[$i];
if ( !empty($term['cnj']) ) {
while( true ) {
while ( true ) {
if ( !count($postfixStack) ) {
$postfixStack[] = array('type'=>'cnj', 'value'=>$term['cnj'], 'sqlValue'=>$term['cnj']);
break;
@ -518,7 +518,7 @@ class Filter extends ZM_Object {
ZM\Error('Unknown operator in filter '.$term['op']);
}
while( true ) {
while ( true ) {
if ( !count($postfixStack) ) {
$postfixStack[] = array('type'=>'op', 'value'=>$term['op'], 'sqlValue'=>$sqlValue);
break;
@ -579,11 +579,6 @@ class Filter extends ZM_Object {
case 'StartTime':
$value = 'extract(hour_second from \''.strftime(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
break;
case 'Weekday':
case 'EndWeekday':
case 'StartWeekday':
$value = 'weekday(\''.strftime(STRF_FMT_DATETIME_DB, strtotime($value)).'\')';
break;
default :
if ( $value != 'NULL' )
$value = dbEscape($value);