From e76f2170b3d351171aeb43ae5e16501e9eae39ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 12 Mar 2014 02:49:11 +0100 Subject: [PATCH] Fix: Avoid home project page to hung when too many tasks opened. --- htdocs/projet/index.php | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index d3b0c611d13..a4b71c62393 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -140,21 +140,6 @@ print ''; // Tasks for all resources of all opened projects and time spent for each task/resource print '
'; -print '
'; - -print_fiche_titre($langs->trans("TimeSpent"),'','').'
'; - -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - - $sql = "SELECT p.title, p.rowid as projectid, t.label, t.rowid as taskid, u.rowid as userid, t.planned_workload, t.dateo, t.datee, SUM(tasktime.task_duration) as timespent"; $sql.= " FROM ".MAIN_DB_PREFIX."projet as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; @@ -179,13 +164,27 @@ if ( $resql ) if ($num > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { - print ''; +/* print ''; print ''; + print '';*/ } else { + print '
'; + + print_fiche_titre($langs->trans("TimeSpent"),'','').'
'; + + print '
'.$langs->trans('TaskRessourceLinks').''.$langs->trans('Projects').''.$langs->trans('Task').''.$langs->trans('DateStart').''.$langs->trans('DateEnd').''.$langs->trans('TimeSpent').'
'; print $langs->trans("TooManyDataPleaseUseMoreFilters"); - print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + while ($i < $num) { $obj = $db->fetch_object($resql); @@ -222,14 +221,15 @@ if ( $resql ) $i++; } - $db->free($resql); + print "
'.$langs->trans('TaskRessourceLinks').''.$langs->trans('Projects').''.$langs->trans('Task').''.$langs->trans('DateStart').''.$langs->trans('DateEnd').''.$langs->trans('TimeSpent').'
"; } + + $db->free($resql); } else { dol_print_error($db); } -print ""; print '
';