1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-26 01:11:28 +02:00

Issue #4778 - Additional date-filter options added.

This commit is contained in:
Cameron
2022-05-22 13:19:21 -07:00
parent 31389dc7ca
commit 6f34dc9f29
2 changed files with 16 additions and 3 deletions

View File

@@ -3916,6 +3916,10 @@ class e_admin_controller_ui extends e_admin_controller
'hour' => '1 hour ago',
'day' => '24 hours ago',
'week' => '1 week ago',
'today' => 'today midnight',
'thisweek' => 'monday this week midnight',
'thismonth' => 'first day of this month midnight',
'thisyear' => 'first day of January midnight',
'month' => '1 month ago',
'month3' => '3 months ago',
'month6' => '6 months ago',
@@ -3934,9 +3938,9 @@ class e_admin_controller_ui extends e_admin_controller
$ky = $filter[2];
$time = vartrue($dateConvert[$ky]);
$timeStamp = strtotime($time);
$res = array($filter[1], $timeStamp);
$res = array($filter[1], $timeStamp);
// e107::getMessage()->addDebug('Date: '.date('c', $timeStamp));
$this->_log('listQry Filtered by ' .$filter[1]. ' (' .$time. ')');
break;
@@ -8325,7 +8329,11 @@ class e_admin_form_ui extends e_form
'month3' => $tp->lanVars(LAN_UI_FILTER_PAST_XMONTHS,3),
'month6' => $tp->lanVars(LAN_UI_FILTER_PAST_XMONTHS,6),
'month9' => $tp->lanVars(LAN_UI_FILTER_PAST_XMONTHS,9),
'year' => LAN_UI_FILTER_PAST_YEAR
'year' => LAN_UI_FILTER_PAST_YEAR,
'today' => LAN_UI_FILTER_TODAY,
'thisweek' => LAN_UI_FILTER_THIS_WEEK,
'thismonth' => LAN_UI_FILTER_THIS_MONTH,
'thisyear' => LAN_UI_FILTER_THIS_YEAR,
);
$dateFiltersFuture = array (

View File

@@ -589,3 +589,8 @@ define("LAN_RELATIONSHIP_HELP", "Optional 'rel' attribute. Comma separated.");
define("LAN_NO_SCRIPT_ACCESS", "You don't have permission to use [script] tags.");
define("LAN_NO_SCRIPT_ACCESS_ASK", "If you believe this is an error, please ask the main administrator to grant you script access via [b]Preferences > Content Filters[/b]");
define("LAN_UI_FILTER_TODAY", "Today");
define("LAN_UI_FILTER_THIS_WEEK", "This Week");
define("LAN_UI_FILTER_THIS_MONTH", "This Month");
define("LAN_UI_FILTER_THIS_YEAR", "This Year");