/** * Return overall (for dashboard or RSS) * * This function will return array of application logs that match the function arguments. Entries can be filtered by * type (private, silent), projects (if $project_ids is array, if NULL project ID is ignored). Result set can be * also limited using $limit and $offset params * * @param boolean $include_private * @param boolean $include_silent * @param mixed $project_ids * @param integer $limit * @param integer $offset * @return array */ static function getOverallLogs($include_private = false, $include_silent = false, $project_ids = null, $limit = null, $offset = null) { $private_filter = $include_private ? 1 : 0; $silent_filter = $include_silent ? 1 : 0; if (is_array($project_ids)) { $conditions = array('`is_private` <= ? AND `is_silent` <= ? AND `project_id` IN (?)', $private_filter, $silent_filter, $project_ids); } else { $conditions = array('`is_private` <= ? AND `is_silent` <= ?', $private_filter, $silent_filter); } // if $all_logs = self::findAll(array('conditions' => $conditions, 'order' => '`created_on` DESC', 'limit' => $limit, 'offset' => $offset)); // findAll return ApplicationLogs::filterLogs($all_logs); }