From 04f5aee7ce32eecbe933d8b855d838c9f3d24f9b Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 10 May 2006 13:39:12 +0000 Subject: [PATCH] Bug 333 - Fixed weekday handling problem in filters. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1981 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_funcs.php | 3 --- web/zm_html_view_filter.php | 10 +++++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/web/zm_funcs.php b/web/zm_funcs.php index 248f5478f..41c241e3b 100644 --- a/web/zm_funcs.php +++ b/web/zm_funcs.php @@ -1256,9 +1256,6 @@ function parseFilter( $save_to_session=false, $term_sep='&' ) case 'Time': $value = "extract( hour_second from '".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."' )"; break; - case 'Weekday': - $value = "weekday( '".strftime( STRF_FMT_DATETIME_DB, strtotime( $value ) )."' )"; - break; } $value_list[] = $value; } diff --git a/web/zm_html_view_filter.php b/web/zm_html_view_filter.php index d6e5317a5..ea140ff27 100644 --- a/web/zm_html_view_filter.php +++ b/web/zm_html_view_filter.php @@ -119,6 +119,11 @@ $archive_types = array( '0' => $zmSlangArchUnarchived, '1' => $zmSlangArchArchived ); +$weekdays = array(); +for ( $i = 0; $i < 7; $i++ ) +{ + $weekdays[$i] = strftime( "%A", mktime( 12, 0, 0, 1, $i+1, 2001 ) ); +} $sort_fields = array( 'Id' => $zmSlangAttrId, 'Name' => $zmSlangAttrName, @@ -287,7 +292,7 @@ window.focus(); - +
+ + +