Fix: Add a limit into list to avoid browser to hang when database is too
large.
This commit is contained in:
parent
d4db5916f0
commit
2b4f0bd4b1
@ -4,7 +4,8 @@ English Dolibarr ChangeLog
|
|||||||
|
|
||||||
|
|
||||||
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
|
***** ChangeLog for 3.4.3 compared to 3.4.2 *****
|
||||||
Fix: Bad get of localtaxes into contracts add lines
|
Fix: Bad get of localtaxes into contracts add lines.
|
||||||
|
Fix: Add a limit into list to avoid browser to hang when database is too large.
|
||||||
|
|
||||||
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
|
||||||
Fix: field's problem into company's page (RIB).
|
Fix: field's problem into company's page (RIB).
|
||||||
|
|||||||
@ -473,8 +473,10 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").'</td></tr>';
|
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</td></tr>';
|
||||||
while ($i < $num)
|
|
||||||
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -511,7 +513,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0) {
|
if ($num > $nbofloop)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
|
}
|
||||||
|
else if ($total>0)
|
||||||
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|||||||
@ -301,7 +301,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
$sql.= " ORDER BY p.rowid DESC";
|
$sql.= " ORDER BY p.rowid DESC";
|
||||||
|
|
||||||
$result=$db->query($sql);
|
$result=$db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -314,7 +314,9 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
|
print '<tr class="liste_titre"><td colspan="5">'.$langs->trans("ProposalsOpened").' <a href="'.DOL_URL_ROOT.'/comm/propal.php?viewstatut=1">('.$num.')</a></td></tr>';
|
||||||
while ($i < $num)
|
|
||||||
|
$nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?1000:$conf->global->MAIN_MAXLIST_OVERLOAD));
|
||||||
|
while ($i < $nbofloop)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -356,7 +358,12 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
$i++;
|
$i++;
|
||||||
$total += $obj->total_ttc;
|
$total += $obj->total_ttc;
|
||||||
}
|
}
|
||||||
if ($total>0) {
|
if ($num > $nbofloop)
|
||||||
|
{
|
||||||
|
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||||
|
}
|
||||||
|
else if ($total>0)
|
||||||
|
{
|
||||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|||||||
@ -659,6 +659,7 @@ from=from
|
|||||||
toward=toward
|
toward=toward
|
||||||
Access=Access
|
Access=Access
|
||||||
SetDemandReason=Set source
|
SetDemandReason=Set source
|
||||||
|
XMoreLines=%s line(s) hidden
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Monday
|
Monday=Monday
|
||||||
|
|||||||
@ -657,6 +657,7 @@ from=de
|
|||||||
toward=vers
|
toward=vers
|
||||||
Access=Accès
|
Access=Accès
|
||||||
SetDemandReason=Définir l'origine
|
SetDemandReason=Définir l'origine
|
||||||
|
XMoreLines=%s ligne(s) non affichée(s)
|
||||||
|
|
||||||
# Week day
|
# Week day
|
||||||
Monday=Lundi
|
Monday=Lundi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user