Fix: Free memory after request
This commit is contained in:
parent
9fae9da6a1
commit
319295554d
@ -127,6 +127,8 @@ class box_actions extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoActionsToDo"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -131,6 +131,8 @@ class box_activity extends ModeleBoxes
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
|
|
||||||
|
|||||||
@ -74,7 +74,6 @@ class box_bookmarks extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -103,6 +102,8 @@ class box_bookmarks extends ModeleBoxes
|
|||||||
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
if ($user->rights->bookmark->creer) $mytxt.=' '.$langs->trans("ClickToAdd");
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/liste.php', 'text'=>$mytxt);
|
$this->info_box_contents[$i][0] = array('td' => 'align="center" colspan="2"', 'url'=> DOL_URL_ROOT.'/bookmarks/liste.php', 'text'=>$mytxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -106,6 +106,8 @@ class box_clients extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -77,7 +77,6 @@ class box_commandes extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -116,6 +115,8 @@ class box_commandes extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedOrders"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class box_comptes extends ModeleBoxes
|
|||||||
$sql.= " ORDER BY label";
|
$sql.= " ORDER BY label";
|
||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
dol_syslog("Box_comptes::loadBox sql=".$sql);
|
dol_syslog(get_class($this)."::loadBox sql=".$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
@ -146,6 +146,8 @@ class box_comptes extends ModeleBoxes
|
|||||||
'text' => $totalamount
|
'text' => $totalamount
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -117,6 +117,8 @@ class box_contacts extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContacts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContacts"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -123,6 +123,8 @@ class box_contracts extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts"));
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -129,6 +129,8 @@ class box_factures extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -127,6 +127,8 @@ class box_factures_fourn extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoModifiedSupplierBills"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoModifiedSupplierBills"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -123,6 +123,8 @@ class box_factures_fourn_imp extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidSupplierBills"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidSupplierBills"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -125,6 +125,8 @@ class box_factures_imp extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidCustomerBills"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoUnpaidCustomerBills"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -121,6 +121,8 @@ class box_ficheinter extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts"));
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -102,6 +102,8 @@ class box_fournisseurs extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedSuppliers"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -116,6 +116,8 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->info_box_contents[0][0] = array('td' => 'align="center"','text2'=>'xxxxxxx');
|
$this->info_box_contents[0][0] = array('td' => 'align="center"','text2'=>'xxxxxxx');
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -91,7 +91,6 @@ class box_members extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -132,6 +131,8 @@ class box_members extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedCustomers"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -80,6 +80,8 @@ class box_osc_clients extends ModeleBoxes
|
|||||||
'url' => DOL_URL_ROOT."/boutique/client/index.php");
|
'url' => DOL_URL_ROOT."/boutique/client/index.php");
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
$this->info_box_contents[0][0] = array( 'td' => 'align="left"',
|
||||||
|
|||||||
@ -135,6 +135,8 @@ class box_produits extends ModeleBoxes
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProducts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProducts"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -143,6 +143,8 @@ class box_produits_alerte_stock extends ModeleBoxes
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoTooLowStockProducts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoTooLowStockProducts"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,7 +75,6 @@ class box_propales extends ModeleBoxes
|
|||||||
$sql.= $db->plimit($max, 0);
|
$sql.= $db->plimit($max, 0);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@ -120,6 +119,8 @@ class box_propales extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProposals"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProposals"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,6 +108,8 @@ class box_prospect extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedProspects"));
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -139,6 +139,8 @@ class box_services_contracts extends ModeleBoxes
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoContractedProducts"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoContractedProducts"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -119,6 +119,8 @@ class box_services_expired extends ModeleBoxes
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoExpiredServices"));
|
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoExpiredServices"));
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -117,6 +117,8 @@ class box_supplier_orders extends ModeleBoxes
|
|||||||
|
|
||||||
if ($num == 0)
|
if ($num == 0)
|
||||||
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoSupplierOrder"));
|
$this->info_box_contents[$i][0] = array('td' => 'align="center"', 'text' => $langs->trans("NoSupplierOrder"));
|
||||||
|
|
||||||
|
$db->free($result);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user