2
0
forked from Wavyzz/dolibarr

Clean code

This commit is contained in:
Laurent Destailleur
2018-02-26 15:03:09 +01:00
parent 82475e2e5f
commit 7e48db2869
8 changed files with 9 additions and 9 deletions

View File

@@ -140,7 +140,7 @@ if (GETPOST('target') == 'remote')
if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
{ {
$xmlfile = $xmlarray['content']; $xmlfile = $xmlarray['content'];
//print "eee".$xmlfile."eee"; //print "xmlfilestart".$xmlfile."xmlfileend";
$xml = simplexml_load_string($xmlfile); $xml = simplexml_load_string($xmlfile);
} }
else else

View File

@@ -638,7 +638,7 @@ class Setup extends DolibarrApi
if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404')
{ {
$xmlfile = $xmlarray['content']; $xmlfile = $xmlarray['content'];
//print "eee".$xmlfile."eee"; //print "xmlfilestart".$xmlfile."endxmlfile";
$xml = simplexml_load_string($xmlfile); $xml = simplexml_load_string($xmlfile);
} }
else else

View File

@@ -233,7 +233,7 @@ class Facturation
$this->prix_total_localtax2 = $total_localtax2; $this->prix_total_localtax2 = $total_localtax2;
$this->montant_tva = $total_ttc - $total_ht; $this->montant_tva = $total_ttc - $total_ht;
//print $this->prix_total_ttc.'eeee'; exit; //print 'total: '.$this->prix_total_ttc; exit;
} }
/** /**

View File

@@ -324,7 +324,7 @@ switch ($action)
{ {
// We set status to payed // We set status to payed
$result=$invoice->set_paid($user); $result=$invoice->set_paid($user);
//print 'eeeee';exit; //print 'set paid';exit;
} }
} }

View File

@@ -870,7 +870,7 @@ function activateModule($value,$withdeps=1)
// Test if Dolibarr version ok // Test if Dolibarr version ok
$verdol=versiondolibarrarray(); $verdol=versiondolibarrarray();
$vermin=isset($objMod->need_dolibarr_version)?$objMod->need_dolibarr_version:0; $vermin=isset($objMod->need_dolibarr_version)?$objMod->need_dolibarr_version:0;
//print 'eee '.versioncompare($verdol,$vermin).' - '.join(',',$verdol).' - '.join(',',$vermin);exit; //print 'version: '.versioncompare($verdol,$vermin).' - '.join(',',$verdol).' - '.join(',',$vermin);exit;
if (is_array($vermin) && versioncompare($verdol, $vermin) < 0) { if (is_array($vermin) && versioncompare($verdol, $vermin) < 0) {
$ret['errors'][] = $langs->trans("ErrorModuleRequireDolibarrVersion", versiontostring($vermin)); $ret['errors'][] = $langs->trans("ErrorModuleRequireDolibarrVersion", versiontostring($vermin));
return $ret; return $ret;
@@ -1498,7 +1498,7 @@ function showModulesExludedForExternal($modules)
//if (empty($conf->global->$moduleconst)) continue; //if (empty($conf->global->$moduleconst)) continue;
if (! in_array($modulename,$listofmodules)) continue; if (! in_array($modulename,$listofmodules)) continue;
//var_dump($modulename.'eee'.$langs->trans('Module'.$module->numero.'Name')); //var_dump($modulename.' - '.$langs->trans('Module'.$module->numero.'Name'));
if ($i > 0) $text.=', '; if ($i > 0) $text.=', ';
else $text.=' '; else $text.=' ';

View File

@@ -1999,7 +1999,7 @@ function dol_now($mode='gmt')
}*/ }*/
else if ($mode == 'tzuser') // Time for now with user timezone added else if ($mode == 'tzuser') // Time for now with user timezone added
{ {
//print 'eeee'.time().'-'.mktime().'-'.gmmktime(); //print 'time: '.time().'-'.mktime().'-'.gmmktime();
$offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60; $offsettz=(empty($_SESSION['dol_tz'])?0:$_SESSION['dol_tz'])*60*60;
$offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60; $offsetdst=(empty($_SESSION['dol_dst'])?0:$_SESSION['dol_dst'])*60*60;
$ret=(int) dol_now('gmt')+($offsettz+$offsetdst); $ret=(int) dol_now('gmt')+($offsettz+$offsetdst);

View File

@@ -1003,7 +1003,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$freetextheight=0; $freetextheight=0;
if ($line) // Free text if ($line) // Free text
{ {
//$line="eee<br>\nfd<strong>sf</strong>sdf<br>\nghfghg<br>"; //$line="sample text<br>\nfd<strong>sf</strong>sdf<br>\nghfghg<br>";
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT))
{ {
$width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text. $width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.

View File

@@ -128,7 +128,7 @@ if (empty($reshook))
//If the user set a comment, we add it to the log comment //If the user set a comment, we add it to the log comment
$comment = ((isset($_POST['note_holiday'][$userID]) && !empty($_POST['note_holiday'][$userID])) ? ' ('.$_POST['note_holiday'][$userID].')' : ''); $comment = ((isset($_POST['note_holiday'][$userID]) && !empty($_POST['note_holiday'][$userID])) ? ' ('.$_POST['note_holiday'][$userID].')' : '');
//print 'eee'.$val['rowid'].'-'.$userValue; //print 'holiday: '.$val['rowid'].'-'.$userValue;
if ($userValue != '') if ($userValue != '')
{ {
// We add the modification to the log (must be before update of sold because we read current value of sold) // We add the modification to the log (must be before update of sold because we read current value of sold)