forked from Wavyzz/dolibarr
Fix: fix not initialized variables
This commit is contained in:
@@ -68,7 +68,7 @@ class AntiVir
|
||||
$return_var=0;
|
||||
$safemode=ini_get("safe_mode");
|
||||
// Create a clean fullcommand
|
||||
dol_syslog("AntiVir::dol_avscan_file Run command=".$fullcommand." with safe_mode ".($safe_mode?"on":"off"));
|
||||
dol_syslog("AntiVir::dol_avscan_file Run command=".$fullcommand." with safe_mode ".($safemode?"on":"off"));
|
||||
// Run CLI command. If run of Windows, you can get return with echo %ERRORLEVEL%
|
||||
$lastline=exec($fullcommand, $output, $return_var);
|
||||
|
||||
|
||||
@@ -352,7 +352,7 @@ abstract class CommonObject
|
||||
$sql.= " AND ec.fk_c_type_contact=tc.rowid";
|
||||
$sql.= " AND tc.element = '".$this->element."'";
|
||||
|
||||
dol_syslog(get_class($object)."::swapContactStatus sql=".$sql);
|
||||
dol_syslog(get_class($this)."::swapContactStatus sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
|
||||
@@ -47,16 +47,17 @@ class FormOrder
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie la liste des sources de commandes
|
||||
* \param selected Id de la source pre-selectionnee
|
||||
* \param htmlname Nom de la liste deroulante
|
||||
* \param addempty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
||||
* \return array Tableau des sources de commandes
|
||||
* Renvoie la liste des sources de commandes
|
||||
*
|
||||
* @param selected Id de la source pre-selectionnee
|
||||
* @param htmlname Nom de la liste deroulante
|
||||
* @param addempty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
||||
* @return array Tableau des sources de commandes
|
||||
*/
|
||||
function selectSourcesCommande($selected='',$htmlname='source_id',$addempty=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
print '<select class="flat" name="'.$htmlname.'" '.$htmloption.'>';
|
||||
print '<select class="flat" name="'.$htmlname.'">';
|
||||
if ($addempty) print '<option value="-1" selected="selected"> </option>';
|
||||
|
||||
// TODO Use a table called llx_c_input_reason
|
||||
|
||||
@@ -311,7 +311,6 @@ class FormOther
|
||||
$moreforfilter.='>';
|
||||
$moreforfilter.=$obj_usr->firstname." ".$obj_usr->name." (".$obj_usr->login.')';
|
||||
$moreforfilter.='</option>';
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql_usr);
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ class Menubase
|
||||
//print 'name='.$tab[$x][3].' pere='.$pere." ".$tab[$x][6];
|
||||
|
||||
$this->newmenu->add((! preg_match("/^(http:\/\/|https:\/\/)/i",$tab[$x][2])) ? $tab[$x][2] : $tab[$x][2], $tab[$x][3], $rang -1, $tab[$x][4], $tab[$x][5], $tab[$x][8]);
|
||||
$this->recur($tab, $tab[$x][0], $rang +1, $lelfmenu);
|
||||
$this->recur($tab, $tab[$x][0], $rang +1, $leftmenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class vCard
|
||||
$key = "ADR";
|
||||
if ($type!="") $key.= ";$type";
|
||||
$key.= ";CHARSET=".$this->encoding;
|
||||
$this->properties[$key] = encode($name).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country);
|
||||
$this->properties[$key] = ";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country);
|
||||
|
||||
if ($this->properties["LABEL;$type;CHARSET=".$this->encoding] == "")
|
||||
{
|
||||
|
||||
@@ -374,6 +374,7 @@ function actions_prepare_head($action)
|
||||
|
||||
/**
|
||||
* Define head array for tabs of agenda setup pages
|
||||
*
|
||||
* @return Array of head
|
||||
*/
|
||||
function calendars_prepare_head($param)
|
||||
@@ -388,6 +389,8 @@ function calendars_prepare_head($param)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
$object=(object) array();
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
|
||||
@@ -675,7 +675,7 @@ function check_value($mask,$value)
|
||||
$maskrefclient_maskclientcode=$regClientRef[1];
|
||||
$maskrefclient_maskcounter=$regClientRef[2];
|
||||
$maskrefclient_maskoffset=0; //default value of maskrefclient_counter offset
|
||||
$maskrefclient_clientcode=substr($valueforccc,0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code to form maskrefclient_clientcode
|
||||
$maskrefclient_clientcode=substr('',0,dol_strlen($maskrefclient_maskclientcode));//get n first characters of client code to form maskrefclient_clientcode
|
||||
$maskrefclient_clientcode=str_pad($maskrefclient_clientcode,dol_strlen($maskrefclient_maskclientcode),"#",STR_PAD_RIGHT);//padding maskrefclient_clientcode for having exactly n characters in maskrefclient_clientcode
|
||||
$maskrefclient_clientcode=dol_string_nospecial($maskrefclient_clientcode);//sanitize maskrefclient_clientcode for sql insert and sql select like
|
||||
if (dol_strlen($maskrefclient_maskcounter) > 0 && dol_strlen($maskrefclient_maskcounter) < 3) return 'CounterMustHaveMoreThan3Digits';
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
/**
|
||||
* Return array head with list of tabs to view object informations
|
||||
*
|
||||
* @param object Member
|
||||
* @return array head
|
||||
*/
|
||||
|
||||
@@ -265,13 +265,10 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
|
||||
function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $mytask=0)
|
||||
{
|
||||
global $user, $bc, $langs;
|
||||
global $form;
|
||||
global $form, $projectstatic, $taskstatic;
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
$taskstatic = new Task($db);
|
||||
|
||||
$var=true;
|
||||
|
||||
$numlines=count($lines);
|
||||
@@ -380,12 +377,10 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
|
||||
function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole, $projectsListId='')
|
||||
{
|
||||
global $user, $bc, $langs;
|
||||
global $projectstatic, $taskstatic;
|
||||
|
||||
$lastprojectid=0;
|
||||
|
||||
$projectstatic = new Project($db);
|
||||
$taskstatic = new Task($db);
|
||||
|
||||
$projectsArrayId=explode(',',$projectsListId);
|
||||
|
||||
$numlines=count($lines);
|
||||
|
||||
@@ -84,9 +84,9 @@ function check_user_password_ldap($usertotest,$passwordtotest,$entitytotest)
|
||||
if ($ldapdebug)
|
||||
{
|
||||
dol_syslog("functions_ldap::check_user_password_ldap Server:".join(',',$ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType);
|
||||
dol_syslog("functions_ldap::check_user_password_ldap uid/samacountname=".$ldapuserattr.", dn=".$ladpdn.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword);
|
||||
dol_syslog("functions_ldap::check_user_password_ldap uid/samacountname=".$ldapuserattr.", dn=".$ldapdn.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword);
|
||||
print "DEBUG: Server:".join(',',$ldap->server).", Port:".$ldap->serverPort.", Protocol:".$ldap->ldapProtocolVersion.", Type:".$ldap->serverType."\n";
|
||||
print "DEBUG: uid/samacountname=".$ldapuserattr.", dn=".$ladpdn.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword."\n";
|
||||
print "DEBUG: uid/samacountname=".$ldapuserattr.", dn=".$ldapdn.", Admin:".$ldap->searchUser.", Pass:".$ldap->searchPassword."\n";
|
||||
}
|
||||
|
||||
$resultFetchLdapUser=0;
|
||||
|
||||
@@ -204,7 +204,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after)
|
||||
print '<div class="menu_titre" id="menu_titre_logo"></div>';
|
||||
print '<div class="menu_top" id="menu_top_logo"></div>';
|
||||
print '<div class="menu_contenu" id="menu_contenu_logo">';
|
||||
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";
|
||||
print '<center><img title="" src="'.$urllogo.'"></center>'."\n";
|
||||
print '</div>';
|
||||
print '<div class="menu_end" id="menu_end_logo"></div>';
|
||||
print '</div>'."\n";
|
||||
|
||||
@@ -601,7 +601,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
print '<div class="menu_titre" id="menu_titre_logo"></div>';
|
||||
print '<div class="menu_top" id="menu_top_logo"></div>';
|
||||
print '<div class="menu_contenu" id="menu_contenu_logo">';
|
||||
print '<center><img title="'.$title.'" src="'.$urllogo.'"></center>'."\n";
|
||||
print '<center><img title="" src="'.$urllogo.'"></center>'."\n";
|
||||
print '</div>';
|
||||
print '<div class="menu_end" id="menu_end_logo"></div>';
|
||||
print '</div>'."\n";
|
||||
|
||||
@@ -167,7 +167,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
|
||||
$pdf->Output($_file,'F');
|
||||
if (! empty($conf->global->MAIN_UMASK))
|
||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||
@chmod($_file, octdec($conf->global->MAIN_UMASK));
|
||||
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
return 1; // Pas d'erreur
|
||||
@@ -359,7 +359,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
|
||||
$nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
|
||||
//print 'e'.$line.'t'.dol_nboflines($line);exit;
|
||||
$posy=$marge_basse + ($nbofline*3) + ($line1?3:0) + ($line2?3:0);
|
||||
$posy=$marge_basse + ($nbofline*3);
|
||||
|
||||
if ($line) // Free text
|
||||
{
|
||||
@@ -372,7 +372,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$pdf->line($marge_gauche, $page_hauteur-$posy, 200, $page_hauteur-$posy);
|
||||
$posy--;
|
||||
|
||||
if ($line1)
|
||||
/*if ($line1)
|
||||
{
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
|
||||
@@ -383,7 +383,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
||||
$posy-=3;
|
||||
$pdf->SetXY($marge_gauche,-$posy);
|
||||
$pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
// Show page nb only on iso languages (so default Helvetica font)
|
||||
if (pdf_getPDFFont($outputlangs) == 'Helvetica')
|
||||
|
||||
@@ -48,7 +48,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -155,6 +155,8 @@ function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0
|
||||
global $conf,$user,$langs;
|
||||
$langs->load("orders");
|
||||
|
||||
$error=0;
|
||||
|
||||
$dir = "/core/modules/commande/";
|
||||
$srctemplatepath='';
|
||||
$modelisok=0;
|
||||
|
||||
@@ -43,7 +43,7 @@ class mod_contract_magre extends ModelNumRefContracts
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -177,7 +177,7 @@ function don_create($db, $id, $message, $modele, $outputlangs)
|
||||
|
||||
// we delete preview files
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
dol_delete_preview($object);
|
||||
dol_delete_preview($obj);
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -43,7 +43,7 @@ class mod_expedition_ribera extends ModelNumRefExpedition
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -166,7 +166,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$langs->load("companies");
|
||||
$langs->load("errors");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $this->description.".<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
@@ -266,11 +266,10 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
{
|
||||
$id = $object;
|
||||
$object = new Facture($this->db);
|
||||
$object->fetch($id);
|
||||
|
||||
$result=$object->fetch($id);
|
||||
if ($result < 0)
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
dol_print_error($this->db,$object->error);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -149,6 +149,8 @@ function facture_pdf_create($db, $object, $message, $modele, $outputlangs, $hide
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$error=0;
|
||||
|
||||
// Increase limit for PDF build
|
||||
$err=error_reporting();
|
||||
error_reporting(0);
|
||||
|
||||
@@ -52,7 +52,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -45,7 +45,7 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($this->db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte.= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
||||
@@ -234,7 +234,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
|
||||
$tab_height_in_current_page=$tab_height_newpage;
|
||||
}
|
||||
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblines - 1))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
|
||||
@@ -298,7 +298,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$tab_top_in_current_page=$tab_top_newpage;
|
||||
$tab_height_in_current_page=$tab_height_newpage;
|
||||
}
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblignes - 1))
|
||||
if (($nexY+$nblineFollowDesc) > ($tab_top_in_current_page+$tab_height_in_current_page) && $i < ($nblines - 1))
|
||||
{
|
||||
if ($pagenb == 1)
|
||||
{
|
||||
@@ -344,6 +344,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
// Check product remaining to be delivered
|
||||
// TODO doit etre modifie
|
||||
//$waitingDelivery = $object->getRemainingDelivered();
|
||||
$waitingDelivery='';
|
||||
|
||||
if (is_array($waitingDelivery) & !empty($waitingDelivery))
|
||||
{
|
||||
|
||||
@@ -202,7 +202,7 @@ class mailing_framboise extends MailingTargets
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$s.='</select>';
|
||||
|
||||
@@ -218,7 +218,7 @@ class mailing_thirdparties extends MailingTargets
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
$s.='</select>';
|
||||
|
||||
@@ -132,6 +132,8 @@ class modComptabilite extends DolibarrModules
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,6 +129,8 @@ class modContrat extends DolibarrModules
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ class modMailing extends DolibarrModules
|
||||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@ class modNotification extends DolibarrModules
|
||||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -149,6 +149,8 @@ class modTax extends DolibarrModules
|
||||
// Nettoyage avant activation
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,10 @@ class modWorkflow extends DolibarrModules
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
//$result=$this->load_tables();
|
||||
// Permissions
|
||||
$this->remove();
|
||||
|
||||
$sql = array();
|
||||
|
||||
return $this->_init($sql);
|
||||
}
|
||||
|
||||
@@ -132,6 +132,8 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
|
||||
|
||||
$form=new Form($db);
|
||||
$formother=new FormOther($db);
|
||||
$projectstatic = new Project($db);
|
||||
$taskstatic = new Task($db);
|
||||
|
||||
$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
llxHeader("",$langs->trans("Tasks"),$help_url);
|
||||
|
||||
Reference in New Issue
Block a user