<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* the contact and calls the appropriate type of page to view.
*
* @return void
- * @access public
*
*/
- function preProcess() {
+ public function preProcess() {
//check for civicase access.
if (!CRM_Case_BAO_Case::accessCiviCase()) {
CRM_Core_Error::fatal(ts('You are not authorized to access this page.'));
$upcoming = CRM_Case_BAO_Case::getCases($allCases, $userID, 'upcoming');
$recent = CRM_Case_BAO_Case::getCases($allCases, $userID, 'recent');
- $upcomingPop = array_pop($upcoming);
- if (strtotime($upcomingPop['case_scheduled_activity_date']) < time()) {
- $upcomingPop['activity_status'] = 'status-overdue';
+ foreach($upcoming as $key=>$value) {
+ if(strtotime($value['case_scheduled_activity_date']) < time()) {
+ $upcoming[$key]['activity_status'] = 'status-overdue';
+ }
}
- array_push($upcoming, $upcomingPop);
$this->assign('casesSummary', $summary);
if (!empty($upcoming)) {
$this->assign('upcomingCases', $upcoming);
* it decides the which action has to be taken for the page.
*
* return null
- * @access public
*/
- function run() {
+ public function run() {
$this->preProcess();
return parent::run();
}
}
-