/** * Count all article according to submitter * * @param array $options * @param string $module * @return boolean */ public static function submitterStatistics($options = array(), $module = null) { if (!$module) { return false; } $limit = $options['list-count'] <= 0 ? 10 : $options['list-count']; $time = time(); $today = strtotime(date('Y-m-d', $time)); $tomorrow = $today + 24 * 3600; $week = $tomorrow - 24 * 3600 * 7; $month = $tomorrow - 24 * 3600 * 30; $daySets = Stats::getSubmittersInPeriod($today, $tomorrow, $limit, $module); $weekSets = Stats::getSubmittersInPeriod($week, $tomorrow, $limit, $module); $monthSets = Stats::getSubmittersInPeriod($month, $tomorrow, $limit, $module); $historySets = Stats::getSubmittersInPeriod(0, $tomorrow, $limit, $module); return array('day' => $daySets, 'week' => $weekSets, 'month' => $monthSets, 'history' => $historySets); }