mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Additional date filter options added for 3/6/9 months
This commit is contained in:
@@ -3677,6 +3677,7 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
case 'bool':
|
case 'bool':
|
||||||
// direct query
|
// direct query
|
||||||
$res = array($filter[1], $filter[2]);
|
$res = array($filter[1], $filter[2]);
|
||||||
|
$this->_log("listQry Filtered by ".$filter[1]." (".($filter[2] ? 'true': 'false').")");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'datestamp':
|
case 'datestamp':
|
||||||
@@ -3687,11 +3688,17 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
"day" => "24 hours ago",
|
"day" => "24 hours ago",
|
||||||
"week" => "1 week ago",
|
"week" => "1 week ago",
|
||||||
"month" => "1 month ago",
|
"month" => "1 month ago",
|
||||||
|
"month3" => "3 months ago",
|
||||||
|
"month6" => "6 months ago",
|
||||||
|
"month9" => "9 months ago",
|
||||||
"year" => "1 year ago",
|
"year" => "1 year ago",
|
||||||
"nhour" => "now + 1 hour",
|
"nhour" => "now + 1 hour",
|
||||||
"nday" => "now + 24 hours",
|
"nday" => "now + 24 hours",
|
||||||
"nweek" => "now + 1 week",
|
"nweek" => "now + 1 week",
|
||||||
"nmonth" => "now + 1 month",
|
"nmonth" => "now + 1 month",
|
||||||
|
"nmonth3" => "now + 3 months",
|
||||||
|
"nmonth6" => "now + 6 months",
|
||||||
|
"nmonth9" => "now + 9 months",
|
||||||
"nyear" => "now + 1 year",
|
"nyear" => "now + 1 year",
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -3701,6 +3708,8 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
|
|
||||||
$res = array($filter[1], $timeStamp);
|
$res = array($filter[1], $timeStamp);
|
||||||
|
|
||||||
|
$this->_log("listQry Filtered by ".$filter[1]." (".$time.")");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -3724,6 +3733,7 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
else // default handling
|
else // default handling
|
||||||
{
|
{
|
||||||
$res = array($filter[0], $filter[1]);
|
$res = array($filter[0], $filter[1]);
|
||||||
|
$this->_log("listQry Filtered by ".$filter[0]." (".$filter[1].")");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -7743,11 +7753,15 @@ class e_admin_form_ui extends e_form
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'datestamp':
|
case 'datestamp':
|
||||||
|
$tp = e107::getParser();
|
||||||
$dateFilters = array (
|
$dateFilters = array (
|
||||||
'hour' => LAN_UI_FILTER_PAST_HOUR,
|
'hour' => LAN_UI_FILTER_PAST_HOUR,
|
||||||
"day" => LAN_UI_FILTER_PAST_24_HOURS,
|
"day" => LAN_UI_FILTER_PAST_24_HOURS,
|
||||||
"week" => LAN_UI_FILTER_PAST_WEEK,
|
"week" => LAN_UI_FILTER_PAST_WEEK,
|
||||||
"month" => LAN_UI_FILTER_PAST_MONTH,
|
"month" => LAN_UI_FILTER_PAST_MONTH,
|
||||||
|
"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
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -7756,6 +7770,9 @@ class e_admin_form_ui extends e_form
|
|||||||
"nday" => LAN_UI_FILTER_NEXT_24_HOURS,
|
"nday" => LAN_UI_FILTER_NEXT_24_HOURS,
|
||||||
"nweek" => LAN_UI_FILTER_NEXT_WEEK,
|
"nweek" => LAN_UI_FILTER_NEXT_WEEK,
|
||||||
"nmonth" => LAN_UI_FILTER_NEXT_MONTH,
|
"nmonth" => LAN_UI_FILTER_NEXT_MONTH,
|
||||||
|
"nmonth3" => $tp->lanVars(LAN_UI_FILTER_NEXT_XMONTHS,3),
|
||||||
|
"nmonth6" => $tp->lanVars(LAN_UI_FILTER_NEXT_XMONTHS,6),
|
||||||
|
"nmonth9" => $tp->lanVars(LAN_UI_FILTER_NEXT_XMONTHS,9),
|
||||||
"nyear" => LAN_UI_FILTER_NEXT_YEAR
|
"nyear" => LAN_UI_FILTER_NEXT_YEAR
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -491,6 +491,7 @@ define("LAN_UI_FILTER_PAST_HOUR", "Past Hour");
|
|||||||
define("LAN_UI_FILTER_PAST_24_HOURS", "Past 24 hours");
|
define("LAN_UI_FILTER_PAST_24_HOURS", "Past 24 hours");
|
||||||
define("LAN_UI_FILTER_PAST_WEEK", "Past Week");
|
define("LAN_UI_FILTER_PAST_WEEK", "Past Week");
|
||||||
define("LAN_UI_FILTER_PAST_MONTH", "Past Month");
|
define("LAN_UI_FILTER_PAST_MONTH", "Past Month");
|
||||||
|
define("LAN_UI_FILTER_PAST_XMONTHS", "Past [x] Months");
|
||||||
define("LAN_UI_FILTER_PAST_YEAR", "Past Year");
|
define("LAN_UI_FILTER_PAST_YEAR", "Past Year");
|
||||||
|
|
||||||
|
|
||||||
@@ -557,6 +558,7 @@ define("LAN_UI_FILTER_NEXT_HOUR", "Next Hour");
|
|||||||
define("LAN_UI_FILTER_NEXT_24_HOURS", "Next 24 hours");
|
define("LAN_UI_FILTER_NEXT_24_HOURS", "Next 24 hours");
|
||||||
define("LAN_UI_FILTER_NEXT_WEEK", "Next Week");
|
define("LAN_UI_FILTER_NEXT_WEEK", "Next Week");
|
||||||
define("LAN_UI_FILTER_NEXT_MONTH", "Next Month");
|
define("LAN_UI_FILTER_NEXT_MONTH", "Next Month");
|
||||||
|
define("LAN_UI_FILTER_NEXT_XMONTHS", "Next [x] Months");
|
||||||
define("LAN_UI_FILTER_NEXT_YEAR", "Next Year");
|
define("LAN_UI_FILTER_NEXT_YEAR", "Next Year");
|
||||||
define("LAN_UI_FILTER_IS_EMPTY", "Is Empty");
|
define("LAN_UI_FILTER_IS_EMPTY", "Is Empty");
|
||||||
define("LAN_RECALCULATE_COMMENT_COUNT", "Recalculate comment count");
|
define("LAN_RECALCULATE_COMMENT_COUNT", "Recalculate comment count");
|
||||||
|
Reference in New Issue
Block a user