fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16890] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16890] more on eventplanner
Date: Wed, 28 Jun 2017 10:04:28 -0400 (EDT)

Revision: 16890
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16890
Author:   sigurdne
Date:     2017-06-28 10:04:27 -0400 (Wed, 28 Jun 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/class.boevents.inc.php
    trunk/eventplanner/inc/class.soevents.inc.php

Modified: trunk/eventplanner/inc/class.boevents.inc.php
===================================================================
--- trunk/eventplanner/inc/class.boevents.inc.php       2017-06-28 13:59:00 UTC 
(rev 16889)
+++ trunk/eventplanner/inc/class.boevents.inc.php       2017-06-28 14:04:27 UTC 
(rev 16890)
@@ -89,13 +89,13 @@
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                        foreach ($values['results'] as &$entry)
                        {
-                               $date_end =  
eventplanner_soevents::get_instance()->get_date_end($entry['id']);
+                               $dates =  
eventplanner_soevents::get_instance()->get_dates($entry['id']);
 
                                $entry['status'] = 
$status_text[$entry['status']];
                                $entry['created'] = 
$GLOBALS['phpgw']->common->show_date($entry['created']);
                                $entry['modified'] = 
$GLOBALS['phpgw']->common->show_date($entry['modified']);
-                               $entry['date_start'] = 
$GLOBALS['phpgw']->common->show_date($entry['date_start'], $dateformat);
-                               $entry['date_end'] = 
$GLOBALS['phpgw']->common->show_date($date_end, $dateformat);
+                               $entry['date_start'] = 
$GLOBALS['phpgw']->common->show_date($dates['date_start'], $dateformat);
+                               $entry['date_end'] = 
$GLOBALS['phpgw']->common->show_date($dates['date_end'], $dateformat);
                                $entry['case_officer_id'] = 
$entry['case_officer_id'] ? 
$GLOBALS['phpgw']->accounts->get($entry['case_officer_id'])->__toString() : '';
                        }
                        return $values;

Modified: trunk/eventplanner/inc/class.soevents.inc.php
===================================================================
--- trunk/eventplanner/inc/class.soevents.inc.php       2017-06-28 13:59:00 UTC 
(rev 16889)
+++ trunk/eventplanner/inc/class.soevents.inc.php       2017-06-28 14:04:27 UTC 
(rev 16890)
@@ -61,11 +61,14 @@
                        //nothing;
                }
 
-               public function get_date_end( $application_id )
+               public function get_dates( $application_id )
                {
-                       $sql = "SELECT max(to_) as date_end FROM 
eventplanner_calendar WHERE application_id = " . (int) $application_id;
+                       $sql = "SELECT min(from_) as date_start, max(to_) as 
date_end  FROM eventplanner_calendar WHERE application_id = " . (int) 
$application_id;
                        $this->db->query($sql,__LINE__,__FILE__);
                        $this->db->next_record();
-                       return $this->db->f('date_end');
+                       return array(
+                               'date_start' => $this->db->f('date_start'),
+                               'date_end' => $this->db->f('date_end')
+                       );
                }
        }
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]