(CDB) Fix problem with PHP<5.3
(CS) Add total time to template agendas