Qual: Removed tons of warning

This commit is contained in:
Laurent Destailleur 2011-11-22 14:00:03 +01:00
parent ded3e4efad
commit 1770a46519
15 changed files with 57 additions and 72 deletions

View File

@ -435,7 +435,8 @@ class Adherent extends CommonObject
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('memberdao'));
$parameters=array('socid'=>$socid);
$parameters=array('id'=>$this->id);
$action='';
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{

View File

@ -921,6 +921,7 @@ class Propal extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
$action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}

View File

@ -829,6 +829,7 @@ class Commande extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
$action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
@ -924,6 +925,7 @@ class Commande extends CommonObject
$hookmanager->callHooks(array('orderdao'));
$parameters=array('objFrom'=>$object);
$action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
@ -1580,7 +1582,8 @@ class Commande extends CommonObject
$this->stocks = array();
// Tableau des id de produit de la commande
$array_of_product=array();
// Recherche total en stock pour chaque produit
if (count($array_of_product))

View File

@ -570,6 +570,7 @@ class Facture extends CommonObject
if (is_object($hookmanager))
{
$parameters=array('objFrom'=>$objFrom);
$action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
}
@ -665,6 +666,7 @@ class Facture extends CommonObject
$hookmanager->callHooks(array('invoicedao'));
$parameters=array('objFrom'=>$object);
$action='';
$reshook=$hookmanager->executeHooks('createfrom',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;

View File

@ -715,15 +715,15 @@ class BonPrelevement extends CommonObject
* Create a withdraw
*
* @param int $banque code of bank
* @param int $guichet code of banck office
* @param int $agence code of bank office (guichet)
* @param string $mode real=do action, simu=test only
* @return int <0 if KO, nbre of invoice withdrawed if OK
*/
function Create($banque=0, $guichet=0, $mode='real')
function Create($banque=0, $agence=0, $mode='real')
{
global $conf,$langs;
dol_syslog("BonPrelevement::Create banque=$banque guichet=$guichet");
dol_syslog("BonPrelevement::Create banque=$banque agence=$agence");
require_once (DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php");
require_once (DOL_DOCUMENT_ROOT."/societe/class/societe.class.php");

View File

@ -2127,6 +2127,7 @@ abstract class CommonObject
if (empty($line->fk_parent_line))
{
$parameters=array('line'=>$line,'var'=>$var,'i'=>$i);
$action='';
$reshook=$hookmanager->executeHooks('printOriginObjectLine',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
}
}

View File

@ -1810,7 +1810,7 @@ class Form
$tmparray[$obj->rowid]['label']=$label;
$i++;
}
$this->cache_demand_reason=dol_sort_array($tmparray,'label', $order='asc', $natsort, $case_sensitive);
$this->cache_demand_reason=dol_sort_array($tmparray,'label', $order='asc');
unset($tmparray);
return 1;

View File

@ -480,11 +480,12 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
/**
* Show html area for list of contacts
* @param conf Object conf
* @param langs Object langs
* @param db Database handler
* @param object Third party object
* @param backtopage Url to go once contact is created
*
* @param Conf $conf Object conf
* @param Translate $langs Object langs
* @param DoliDB $db Database handler
* @param Object $object Third party object
* @param string $backtopage Url to go once contact is created
*/
function show_contacts($conf,$langs,$db,$object,$backtopage='')
{
@ -743,6 +744,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
/**
* Show html area with actions done
*
* @param conf Object conf
* @param langs Object langs
* @param db Object db
@ -837,6 +839,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
$numaction++;
$i++;
}
$db->free($resql);
}
else
{
@ -967,8 +970,6 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
}
$out.="</table>\n";
$out.="<br>\n";
$db->free($result);
}
if ($noprint) return $out;

View File

@ -685,6 +685,7 @@ function pdf_writelinedesc(&$pdf,$object,$i,$outputlangs,$w,$h,$posx,$posy,$hide
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('pdf'=>$pdf,'i'=>$i,'outputlangs'=>$outputlangs,'w'=>$w,'h'=>$h,'posx'=>$posx,'posy'=>$posy,'hideref'=>$hideref,'hidedesc'=>$hidedesc,'issupplierline'=>$issupplierline,'special_code'=>$special_code);
$action='';
$reshook=$hookmanager->executeHooks('pdf_writelinedesc',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -929,6 +930,7 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0,$hookmanager=
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlinevatrate',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -959,6 +961,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0,$hookmanage
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineupexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -985,6 +988,7 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0,$hookmanager=fals
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineqty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -1013,6 +1017,7 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0,$hookmanage
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineqty_asked',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -1041,6 +1046,7 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0,$hookmana
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineqty_shipped',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -1069,6 +1075,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0,$hookm
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineqty_keeptoship',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -1099,6 +1106,7 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0,$hookma
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlineremisepercent',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else
@ -1136,6 +1144,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0,$hookman
$special_code = $object->lines[$i]->special_code;
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
$action='';
return $hookmanager->executeHooks('pdf_getlinetotalexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
}
else

View File

@ -142,9 +142,10 @@ function group_prepare_head($object)
/**
* Show list of themes. Show all thumbs of themes
* @param fuser User concerned or '' for global theme
* @param edit 1 to add edit form
* @param foruserprofile Show for user profile view
*
* @param User $fuser User concerned or '' for global theme
* @param int $edit 1 to add edit form
* @param boolean $foruserprofile Show for user profile view
*/
function show_theme($fuser,$edit=0,$foruserprofile=false)
{
@ -166,21 +167,21 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
// Title
if ($foruserprofile)
{
print '<tr class="liste_titre"><td width="25%">'.$langs->trans("Parameter").'</td><td width="25%">'.$langs->trans("DefaultValue").'</td>';
print '<td colspan="2">&nbsp;</td>';
print '<tr class="liste_titre"><th width="25%">'.$langs->trans("Parameter").'</th><th width="25%">'.$langs->trans("DefaultValue").'</th>';
print '<th colspan="2">&nbsp;</th>';
print '</tr>';
}
else
{
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("DefaultSkin").'</td>';
print '<td align="right">';
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("DefaultSkin").'</th>';
print '<th align="right">';
$url='http://www.dolistore.com/lang-en/4-skins';
if (preg_match('/fr/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-fr/4-themes';
//if (preg_match('/es/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-es/4-themes';
print '<a href="'.$url.'" target="_blank">';
print $langs->trans('DownloadMoreSkins');
print '</a>';
print '</td></tr>';
print '</th></tr>';
}
$var=false;
@ -190,8 +191,8 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("DefaultSkin").'</td>';
print '<td>'.$conf->global->MAIN_THEME.'</td>';
print '<td '.$bc[$var].' align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td '.$bc[$var].'>&nbsp;</td>';
print '<td align="left" nowrap="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
print '<td>&nbsp;</td>';
print '</tr>';
}
@ -203,12 +204,6 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
print '</tr>';
}
if ($edit)
{
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");
}
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">';

View File

@ -56,10 +56,10 @@ class MenuTop {
$classname='class="tmenu"';
print_start_menu_entry_empty($idsel);
print '<a class="tmenuimage" href="'.dol_buildpath('/index.php',1).'?mainmenu=home&amp;leftmenu="'.($atarget?" target=$atarget":"").'>';
print '<a class="tmenuimage" href="'.dol_buildpath('/index.php',1).'?mainmenu=home&amp;leftmenu="'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
print '<div class="mainmenu '.$idsel.'"><span class="mainmenu_'.$idsel.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
print '</a>';
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($tabMenu[$i]['atarget']?" target='".$tabMenu[$i]['atarget']."'":($atarget?" target=$atarget":"")).'>';
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.DOL_URL_ROOT.'"'.($this->atarget?' target="'.$this->atarget.'"':'').'>';
print_text_menu_entry_empty($langs->trans("Home"));
print '</a>';
print_end_menu_entry_empty();

View File

@ -358,7 +358,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if ($deja_regle || $amount_credit_notes_included || $amount_deposits_included)
{
$this->_tableau_versements($pdf, $fac, $posy);
$this->_tableau_versements($pdf, $object, $posy);
}
// Pied de page

View File

@ -28,13 +28,18 @@ $user->getrights('ecm');
/**
* Replace the default llxHeader function
*
* @param string $head Optionnal head lines
* @param string $title HTML title
* @param string $help_url Link to online url help
* @param string $morehtml More content into html header
* @param string $head Optionnal head lines
* @param string $title HTML title
* @param string $help_url Link to online url help
* @param string $morehtml More content into html header
* @param string $target Force target on menu links
* @param int $disablejs More content into html header
* @param int $disablehead More content into html header
* @param array $arrayofjs Array of complementary js files
* @param array $arrayofcss Array of complementary css files
* @return none
*/
function llxHeader($head = '', $title='', $help_url='', $morehtml='')
function llxHeader($head = '', $title='', $help_url='', $morehtml='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='')
{
global $conf,$langs,$user;
$langs->load("ftp");

View File

@ -282,7 +282,7 @@ class ActionsCardService extends Product
}
else
{
dol_print_error($db,$sql);
dol_print_error($this->db,$sql);
}
}
@ -298,6 +298,7 @@ class ActionsCardService extends Product
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{
global $conf;
global $search_categ,$sall,$sref,$sbarcode,$snom,$catid;
$this->getFieldList();

View File

@ -1005,40 +1005,6 @@ class Societe extends CommonObject
}
/**
* \brief Retournes les factures impayees de la societe
* \return array tableau des id de factures impayees
*
*/
function factures_impayes()
{
$facimp = array();
/*
* Lignes
*/
$sql = "SELECT f.rowid";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.fk_soc = '".$this->id . "'";
$sql .= " AND f.fk_statut = '1' AND f.paye = '0'";
$resql=$this->db->query($sql);
if ($resql)
{
$num = $this->db->num_rows($resql);
$i = 0;
while ($i < $num)
{
$objp = $this->db->fetch_object($resql);
$array_push($facimp, $objp->rowid);
$i++;
print $i;
}
$this->db->free();
}
return $facimp;
}
/**
* Update record to set prefix
*/