* [task#135726] add count of daily delete rows in user metric.
This commit is contained in:
@@ -106,3 +106,19 @@ class count_of_daily_delete_rows_in_user extends baseCalc
|
||||
*/
|
||||
public function getResult($options = array())
|
||||
{
|
||||
if(empty($options))
|
||||
{
|
||||
$begin = date('Y-m-d', strtotime('-3 month'));
|
||||
$end = date('Y-m-d');
|
||||
}
|
||||
else
|
||||
{
|
||||
$year = (int)$options['year'];
|
||||
$month = (int)$options['month'];
|
||||
$day = $options['day'];
|
||||
|
||||
$begin = $end = $day;
|
||||
if(strpos($day, ',') !== false) list($end, $begin) = explode(',', $day);
|
||||
$begin = "{$year}-{$month}-{$begin}";
|
||||
$end = "{$year}-{$month}-{$end}";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user