Fix: Too many parameter

This commit is contained in:
Laurent Destailleur 2014-08-01 14:26:13 +02:00
parent e18caccdc9
commit bb8ec0c8f9
17 changed files with 78 additions and 74 deletions

View File

@ -94,7 +94,7 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0)
print "Invoice ".$i." for socid ".$socid;
$facture = new Facture($db, $socids[$socid]);
$facture = new Facture($db);
$facture->date = time();
$facture->cond_reglement_id = 3;
$facture->mode_reglement_id = 3;

View File

@ -122,7 +122,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$soc = new Societe($db);
$propal = new Propal($db, $socids[$socid]);
$propal = new Propal($db);
$obj = $conf->global->PROPALE_ADDON;
$modPropale = new $obj;
@ -130,6 +130,7 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0)
$propal->ref = $numpr;
$propal->contactid = $contids[$socids[$socid]][0];
$propal->socid = $socids[$socid];
$propal->datep = time();
$propal->cond_reglement_id = 3;
$propal->mode_reglement_id = 3;

View File

@ -187,7 +187,7 @@ class Adherent extends CommonObject
if (dol_textishtml($text,1)) $msgishtml = 1;
$infos='';
if ($this->civility_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel(1)."\n";
if ($this->civility_id) $infos.= $langs->transnoentities("UserTitle").": ".$this->getCivilityLabel()."\n";
$infos.= $langs->transnoentities("id").": ".$this->id."\n";
$infos.= $langs->transnoentities("Lastname").": ".$this->lastname."\n";
$infos.= $langs->transnoentities("Firstname").": ".$this->firstname."\n";
@ -210,7 +210,7 @@ class Adherent extends CommonObject
$substitutionarray=array(
'%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT,
'%ID%'=>$msgishtml?dol_htmlentitiesbr($this->id):$this->id,
'%CIVILITY%'=>$this->getCivilityLabel($msgishtml?0:1),
'%CIVILITY%'=>$this->getCivilityLabel(),
'%FIRSTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->firstname):$this->firstname,
'%LASTNAME%'=>$msgishtml?dol_htmlentitiesbr($this->lastname):$this->lastname,
'%FULLNAME%'=>$msgishtml?dol_htmlentitiesbr($this->getFullName($langs)):$this->getFullName($langs),
@ -350,7 +350,7 @@ class Adherent extends CommonObject
{
// Call trigger
$result=$this->call_trigger('MEMBER_CREATE',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}
@ -599,7 +599,7 @@ class Adherent extends CommonObject
{
// Call trigger
$result=$this->call_trigger('MEMBER_MODIFY',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}
}
@ -774,7 +774,7 @@ class Adherent extends CommonObject
{
// Call trigger
$result=$this->call_trigger('MEMBER_DELETE',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}
@ -830,7 +830,7 @@ class Adherent extends CommonObject
}
$this->db->begin();
// Mise a jour
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET pass = '".$this->db->escape($password_indatabase)."'";
$sql.= " WHERE rowid = ".$this->id;
@ -877,7 +877,7 @@ class Adherent extends CommonObject
{
// Call trigger
$result=$this->call_trigger('MEMBER_NEW_PASSWORD',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers
}
@ -1292,7 +1292,7 @@ class Adherent extends CommonObject
// Call trigger
$result=$this->call_trigger('MEMBER_SUBSCRIPTION',$user);
if ($result < 0) { $error++; }
if ($result < 0) { $error++; }
// End call triggers
}
@ -1351,7 +1351,7 @@ class Adherent extends CommonObject
// Call trigger
$result=$this->call_trigger('MEMBER_VALIDATE',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers
$this->db->commit();
@ -1399,7 +1399,7 @@ class Adherent extends CommonObject
// Call trigger
$result=$this->call_trigger('MEMBER_RESILIATE',$user);
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
if ($result < 0) { $error++; $this->db->rollback(); return -1; }
// End call triggers
$this->db->commit();
@ -1530,7 +1530,7 @@ class Adherent extends CommonObject
/**
* Return civility label of a member
*
* @return string Translated name of civility
* @return string Translated name of civility (translated with transnoentitiesnoconv)
*/
function getCivilityLabel()
{

View File

@ -139,7 +139,7 @@ class Commande extends CommonOrder
{
$file = $conf->global->COMMANDE_ADDON.".php";
$classname = $conf->global->COMMANDE_ADDON;
// Include file with class
foreach ($conf->file->dol_document_root as $dirroot)
{
@ -262,7 +262,7 @@ class Commande extends CommonOrder
// We decrement stock of product (and sub-products)
$result=$mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderValidatedInDolibarr",$num));
if ($result < 0)
{
{
$error++;
$this->error=$mouvP->error;
}
@ -305,7 +305,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_VALIDATE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -436,7 +436,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_REOPEN',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
else
@ -495,9 +495,9 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_CLOSE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
if (! $error)
{
$this->statut=3;
@ -558,7 +558,7 @@ class Commande extends CommonOrder
$mouvP = new MouvementStock($this->db);
// We increment stock of product (and sub-products)
$result=$mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("OrderCanceledInDolibarr",$this->ref));
if ($result < 0)
if ($result < 0)
{
$error++;
$this->error=$mouvP->error;
@ -572,7 +572,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_CANCEL',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -764,9 +764,10 @@ class Commande extends CommonOrder
if ($origin == 'propal' && $origin_id)
{
// On recupere les differents contact interne et externe
$prop = new Propal($this->db, $this->socid, $origin_id);
$prop = new Propal($this->db);
$prop->fetch($origin_id);
// On recupere le commercial suivi propale
// We get ids of sales representatives of proposal
$this->userid = $prop->getIdcontact('internal', 'SALESREPFOLL');
if ($this->userid)
@ -775,7 +776,7 @@ class Commande extends CommonOrder
$this->add_contact($this->userid[0], 'SALESREPFOLL', 'internal');
}
// On recupere le contact client suivi propale
// We get ids of customer follower of proposal
$this->contactid = $prop->getIdcontact('external', 'CUSTOMER');
if ($this->contactid)
@ -813,7 +814,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_CREATE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -908,7 +909,7 @@ class Commande extends CommonOrder
// Call trigger
$result=$this->call_trigger('ORDER_CLONE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -2228,7 +2229,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_CLASSIFY_BILLED',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
if (! $error)
@ -2447,7 +2448,7 @@ class Commande extends CommonOrder
{
// Call trigger
$result=$this->call_trigger('ORDER_DELETE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -3189,7 +3190,7 @@ class OrderLine extends CommonOrderLine
// Call trigger
$result=$this->call_trigger('LINEORDER_DELETE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
if (!$error) {
@ -3312,7 +3313,7 @@ class OrderLine extends CommonOrderLine
{
// Call trigger
$result=$this->call_trigger('LINEORDER_INSERT',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}
@ -3427,7 +3428,7 @@ class OrderLine extends CommonOrderLine
{
// Call trigger
$result=$this->call_trigger('LINEORDER_UPDATE',$user);
if ($result < 0) $error++;
if ($result < 0) $error++;
// End call triggers
}

View File

@ -88,7 +88,7 @@ if ($action == 'update' && ! $_POST["cancel"])
if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights->banque->configurer)
{
// Modification
$account = new Account($db, $_GET["id"]);
$account = new Account($db);
$account->delete($_GET["id"]);
header("Location: ".DOL_URL_ROOT."/compta/bank/index.php");

View File

@ -3,7 +3,7 @@
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copytight (C) 2005-2009 Regis Houssin <regis.houssin@capnetworks.com>
* Copytight (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* Copytight (C) 2014 Alexandre Spangaro <alexandre.spangaro@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -57,7 +57,7 @@ if ($_POST["action"] == 'add')
$error=0;
// Create account
$account = new Account($db,0);
$account = new Account($db);
$account->ref = dol_sanitizeFileName(trim($_POST["ref"]));
$account->label = trim($_POST["label"]);
@ -119,7 +119,7 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"])
$error=0;
// Update account
$account = new Account($db, $_POST["id"]);
$account = new Account($db);
$account->fetch($_POST["id"]);
$account->ref = dol_string_nospecial(trim($_POST["ref"]));
@ -325,9 +325,9 @@ if ($action == 'create')
print '<td colspan="3"><input size="12" type="text" class="flat" name="account_min_desired" value="'.($_POST["account_min_desired"]?$_POST["account_min_desired"]:$account->account_min_desired).'"></td></tr>';
print '</table>';
print '<br>';
print '<table class="border" width="100%">';
// Accountancy code
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
@ -340,11 +340,11 @@ if ($action == 'create')
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
}
// Accountancy journal
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.$account->accountancy_journal.'"></td></tr>';
print '</table>';
print '<center><br><input value="'.$langs->trans("CreateAccount").'" type="submit" class="button"></center>';
@ -458,19 +458,19 @@ else
print '<td colspan="3">'.$account->comment.'</td></tr>';
print '</table>';
print '<br>';
print '<table class="border" width="100%">';
// Accountancy code
print '<tr><td valign="top" width="25%">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3">'.$account->account_number.'</td></tr>';
// Accountancy journal
print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>';
print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>';
print '</table>';
print '</div>';
@ -611,7 +611,7 @@ else
$doleditor=new DolEditor('account_comment',(isset($_POST["account_comment"])?$_POST["account_comment"]:$account->comment),'',200,'dolibarr_notes','',false,true,$conf->global->FCKEDITOR_ENABLE_SOCIETE,10,70);
$doleditor->Create();
print '</td></tr>';
// Accountancy code
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
{
@ -623,7 +623,7 @@ else
print '<tr><td valign="top">'.$langs->trans("AccountancyCode").'</td>';
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
}
// Accountancy journal
print '<tr><td valign="top">'.$langs->trans("AccountancyJournalCode").'</td>';
print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>';

View File

@ -113,11 +113,10 @@ class box_graph_propales_permonth extends ModeleBoxes
$nowarray=dol_getdate(dol_now(),true);
if (empty($endyear)) $endyear=$nowarray['year'];
$startyear=$endyear-1;
$mode='customer';
$WIDTH=(($shownb && $showtot) || ! empty($conf->dol_optimize_smallscreen))?'256':'320';
$HEIGHT='192';
$stats = new PropaleStats($this->db, $socid, $mode, 0);
$stats = new PropaleStats($this->db, $socid, 0);
// Build graphic number of object. $data = array(array('Lib',val1,val2,val3),...)
if ($shownb)
@ -126,8 +125,7 @@ class box_graph_propales_permonth extends ModeleBoxes
$datatype1 = array_pad(array(), ($endyear-$startyear+1), 'bars');
$filenamenb = $dir."/".$prefix."propalsnbinyear-".$endyear.".png";
if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&amp;file=propalsnbinyear-'.$endyear.'.png';
if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstatssupplier&amp;file=propalsnbinyear-'.$endyear.'.png';
$fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=propalstats&amp;file=propalsnbinyear-'.$endyear.'.png';
$px1 = new DolGraph();
$mesg = $px1->isGraphKo();

View File

@ -335,11 +335,12 @@ class Translate
* Return translated value of key. Search in lang file, then into database.
* Key must be any complete entry into lang file: CurrencyEUR, ...
* If not found, return key.
* WARNING: To avoid infinite loop (getLabelFromKey->transnoentities->getTradFromKey), getLabelFromKey must
* not be called with same value than input.
* The string return is not formated (translated with transnoentitiesnoconv)
* NOTE: To avoid infinite loop (getLabelFromKey->transnoentities->getTradFromKey), if you modify this function,
* check that getLabelFromKey is not called with same value than input.
*
* @param string $key Key to translate
* @return string Translated string
* @return string Translated string (translated with transnoentitiesnoconv)
*/
private function getTradFromKey($key)
{
@ -347,7 +348,6 @@ class Translate
if (! is_string($key)) return 'ErrorBadValueForParamNotAString'; // Avoid multiple errors with code not using function correctly.
//print 'xx'.$key;
$newstr=$key;
if (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
{

View File

@ -165,7 +165,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info=$object->_load_ldap_info();
$dn=$object->_load_ldap_dn($info);
$result=$ldap->delete($dn,$info,$user);
$result=$ldap->delete($dn);
if ($result < 0)
{
$this->error="ErrorLDAP ".$ldap->error;
@ -322,7 +322,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info=$object->_load_ldap_info();
$dn=$object->_load_ldap_dn($info);
$result=$ldap->delete($dn,$info,$user);
$result=$ldap->delete($dn);
if ($result < 0)
{
$this->error="ErrorLDAP ".$ldap->error;
@ -399,7 +399,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info=$object->_load_ldap_info();
$dn=$object->_load_ldap_dn($info);
$result=$ldap->delete($dn,$info,$user);
$result=$ldap->delete($dn);
if ($result < 0)
{
$this->error="ErrorLDAP ".$ldap->error;
@ -576,7 +576,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$info=$object->_load_ldap_info();
$dn=$object->_load_ldap_dn($info);
$result=$ldap->delete($dn,$info,$user);
$result=$ldap->delete($dn);
if ($result < 0)
{
$this->error="ErrorLDAP ".$ldap->error;

View File

@ -52,14 +52,14 @@ if ($_GET["id"])
//on veut supprimer une cat<61>gorie
if ($_REQUEST["cat"])
{
$cat = new Categorie($db,$_REQUEST["cat"]);
$cat = new Categorie($db);
$cat->del_product($product);
}
//on veut ajouter une cat<61>gorie
if (isset($_REQUEST["add_cat"]) && $_REQUEST["add_cat"]>=0)
{
$cat = new Categorie($db,$_REQUEST["add_cat"]);
$cat = new Categorie($db);
$cat->add_product($product);
}

View File

@ -149,7 +149,7 @@ if ($resql)
if (isset($catid))
{
print "<div id='ways'>";
$c = new Categorie($db, $catid);
$c = new Categorie($db);
$ways = $c->print_all_ways(' &gt; ','fourn/product/liste.php');
print " &gt; ".$ways[0]."<br>\n";
print "</div><br>";

View File

@ -1070,7 +1070,7 @@ else
// Liste des utiliseurs du groupes choisi dans la config
$idGroupValid = $cp->getConfCP('userGroup');
$validator = new UserGroup($db,$idGroupValid);
$validator = new UserGroup($db);
$valideur = $validator->listUsersForGroup('',1);
print '<td>';

View File

@ -1412,7 +1412,7 @@ function migrate_price_propal($db,$langs,$conf)
dolibarr_install_syslog("upgrade2: Line $rowid: propalid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
print ". ";
$propalligne->update_total($rowid);
$propalligne->update_total();
/* On touche pas a propal mere
@ -1521,7 +1521,7 @@ function migrate_price_contrat($db,$langs,$conf)
dolibarr_install_syslog("upgrade2: Line $rowid: contratdetid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent -> $total_ht, $total_tva, $total_ttc");
print ". ";
$contratligne->update_total($rowid);
$contratligne->update_total();
$i++;
}
@ -1606,7 +1606,7 @@ function migrate_price_commande($db,$langs,$conf)
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
print ". ";
$commandeligne->update_total($rowid);
$commandeligne->update_total();
/* On touche pas a facture mere
$commande = new Commande($db);
@ -1720,7 +1720,7 @@ function migrate_price_commande_fournisseur($db,$langs,$conf)
dolibarr_install_syslog("upgrade2: Line $rowid: commandeid=$obj->rowid pu=$pu qty=$qty tva_taux=$txtva remise_percent=$remise_percent remise_global=$remise_percent_global -> $total_ht, $total_tva, $total_ttc");
print ". ";
$commandeligne->update_total($rowid);
$commandeligne->update_total();
/* On touche pas a facture mere
$commande = new Commande($db);

View File

@ -411,7 +411,7 @@ if (! defined('NOLOGIN'))
// Call of triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,GETPOST('entity','int'));
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
@ -514,10 +514,11 @@ if (! defined('NOLOGIN'))
$_SESSION["dol_loginmesg"]=$user->error;
}
// TODO We should use a hook here, not a trigger.
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,$_POST["entity"]);
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
@ -556,10 +557,11 @@ if (! defined('NOLOGIN'))
$_SESSION["dol_loginmesg"]=$user->error;
}
// TODO We should use a hook here, not a trigger.
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf,(isset($_POST["entity"])?$_POST["entity"]:0));
$result=$interface->run_triggers('USER_LOGIN_FAILED',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
@ -572,10 +574,11 @@ if (! defined('NOLOGIN'))
{
if (! empty($conf->global->MAIN_ACTIVATE_UPDATESESSIONTRIGGER)) // We do not execute such trigger at each page load by default (triggers are time consuming)
{
// TODO We should use a hook here, not a trigger.
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_UPDATE_SESSION',$user,$user,$langs,$conf,$conf->entity);
$result=$interface->run_triggers('USER_UPDATE_SESSION',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}
@ -588,7 +591,7 @@ if (! defined('NOLOGIN'))
// If we are here, this means authentication was successfull.
if (! isset($_SESSION["dol_login"]))
{
// New session for this login.
// New session for this login has started.
$error=0;
// Store value into session (values always stored)
@ -617,10 +620,11 @@ if (! defined('NOLOGIN'))
$user->update_last_login_date();
// TODO We should use a hook here, not a trigger
// Call triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf,GETPOST('entity','int'));
$result=$interface->run_triggers('USER_LOGIN',$user,$user,$langs,$conf);
if ($result < 0) {
$error++;
}

View File

@ -80,7 +80,7 @@ print '<table class="border" width="100%">';
$client = false;
if ($socid > 0) {
$soc = new Societe($db, $socid);
$soc = new Societe($db);
$soc->fetch($socid);
if ($soc->client)

View File

@ -62,7 +62,7 @@ llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Margins"),$help_ur
if ($socid > 0)
{
$societe = new Societe($db, $socid);
$societe = new Societe($db);
$societe->fetch($socid);
/*

View File

@ -42,7 +42,7 @@ if (!empty($_SESSION["dol_authmode"]) && ($_SESSION["dol_authmode"] == 'forceuse
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($db);
$result=$interface->run_triggers('USER_LOGOUT',$user,$user,$langs,$conf,$conf->entity);
$result=$interface->run_triggers('USER_LOGOUT',$user,$user,$langs,$conf);
if ($result < 0) { $error++; }
// Fin appel triggers