Adds conference duration calculation
							parent
							
								
									e85e9c577f
								
							
						
					
					
						commit
						2496d3fc93
					
				| 
						 | 
				
			
			@ -14,14 +14,14 @@ SELECT DISTINCT
 | 
			
		|||
        WHERE
 | 
			
		||||
            ce.conference_id = c.conference_id
 | 
			
		||||
            AND
 | 
			
		||||
            ce.conference_event = 'conference expired')
 | 
			
		||||
            ce.conference_event = 'conference created')
 | 
			
		||||
    AS start,
 | 
			
		||||
    (SELECT ce.time
 | 
			
		||||
        FROM conference_events ce
 | 
			
		||||
        WHERE
 | 
			
		||||
            ce.conference_id = c.conference_id
 | 
			
		||||
            AND
 | 
			
		||||
            ce.conference_event = 'conference created')
 | 
			
		||||
            ce.conference_event = 'conference expired')
 | 
			
		||||
    AS end,
 | 
			
		||||
    c.conference_id,
 | 
			
		||||
    c.conference_name,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -256,11 +256,19 @@ if (isset($conference_id)) {
 | 
			
		|||
 | 
			
		||||
            foreach ($search as $item) {
 | 
			
		||||
                extract($item);
 | 
			
		||||
 | 
			
		||||
                // we don't have duration field, so we calculate it
 | 
			
		||||
                if (!empty($start) && !empty($end)) {
 | 
			
		||||
                    $duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
 | 
			
		||||
                } else {
 | 
			
		||||
                    $duration = '';
 | 
			
		||||
                }
 | 
			
		||||
                $conference_record = array(
 | 
			
		||||
                    // assign title to the field in the array record
 | 
			
		||||
                    'component'		=> $jitsi_component,
 | 
			
		||||
                    'start'		=> $start,
 | 
			
		||||
                    'end'		=> $end,
 | 
			
		||||
                    'duration'		=> $duration,
 | 
			
		||||
                    'conference ID'	=> $conference_id,
 | 
			
		||||
                    'conference name'	=> $conference_name,
 | 
			
		||||
                    'participants'	=> $participants,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue