Merge pull request #8915 from grandoc/new_branch_04_06_2018

clean and update code
This commit is contained in:
Laurent Destailleur 2018-06-13 20:16:19 +02:00 committed by GitHub
commit b8e927d347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 15 deletions

View File

@ -176,7 +176,6 @@ class printing_printgcp extends PrintingDriver
global $bc, $conf, $langs; global $bc, $conf, $langs;
$error = 0; $error = 0;
$langs->load('printing'); $langs->load('printing');
$var=true;
$html = '<tr class="liste_titre">'; $html = '<tr class="liste_titre">';
$html.= '<td>'.$langs->trans('GCP_Name').'</td>'; $html.= '<td>'.$langs->trans('GCP_Name').'</td>';
@ -190,11 +189,9 @@ class printing_printgcp extends PrintingDriver
$html.= '</tr>'."\n"; $html.= '</tr>'."\n";
$list = $this->getlist_available_printers(); $list = $this->getlist_available_printers();
//$html.= '<td><pre>'.print_r($list,true).'</pre></td>'; //$html.= '<td><pre>'.print_r($list,true).'</pre></td>';
$var = true;
foreach ($list['available'] as $printer_det) foreach ($list['available'] as $printer_det)
{ {
$var = !$var; $html.= '<tr class="oddeven">';
$html.= "<tr ".$bc[$var].">";
$html.= '<td>'.$printer_det['name'].'</td>'; $html.= '<td>'.$printer_det['name'].'</td>';
$html.= '<td>'.$printer_det['displayName'].'</td>'; $html.= '<td>'.$printer_det['displayName'].'</td>';
$html.= '<td>'.$printer_det['id'].'</td>'; // id to identify printer to use $html.= '<td>'.$printer_det['id'].'</td>'; // id to identify printer to use

View File

@ -144,7 +144,6 @@ class printing_printipp extends PrintingDriver
{ {
global $bc, $conf, $langs; global $bc, $conf, $langs;
$error = 0; $error = 0;
$var=true;
$html = '<tr class="liste_titre">'; $html = '<tr class="liste_titre">';
$html.= '<td>'.$langs->trans('IPP_Uri').'</td>'; $html.= '<td>'.$langs->trans('IPP_Uri').'</td>';
@ -160,12 +159,11 @@ class printing_printipp extends PrintingDriver
$html.= '<td align="center">'.$langs->trans("Select").'</td>'; $html.= '<td align="center">'.$langs->trans("Select").'</td>';
$html.= "</tr>\n"; $html.= "</tr>\n";
$list = $this->getlist_available_printers(); $list = $this->getlist_available_printers();
$var = true;
foreach ($list as $value) foreach ($list as $value)
{ {
$printer_det = $this->get_printer_detail($value); $printer_det = $this->get_printer_detail($value);
$html.= "<tr ".$bc[$var].">"; $html.= '<tr class="oddeven">';
$html.= '<td>'.$value.'</td>'; $html.= '<td>'.$value.'</td>';
//$html.= '<td><pre>'.print_r($printer_det,true).'</pre></td>'; //$html.= '<td><pre>'.print_r($printer_det,true).'</pre></td>';
$html.= '<td>'.$printer_det->printer_name->_value0.'</td>'; $html.= '<td>'.$printer_det->printer_name->_value0.'</td>';

View File

@ -68,8 +68,8 @@ class doc_generic_project_odt extends ModelePDFProjects
{ {
global $conf,$langs,$mysoc; global $conf,$langs,$mysoc;
$langs->load("main"); // Load traductions files requiredby by page
$langs->load("companies"); $langs->loadLangs(array("companies", "main"));
$this->db = $db; $this->db = $db;
$this->name = "ODT templates"; $this->name = "ODT templates";

View File

@ -84,8 +84,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
{ {
global $conf,$langs; global $conf,$langs;
$langs->load("companies"); // Load traductions files requiredby by page
$langs->load("errors"); $langs->loadLangs(array("companies", "errors"));
$form = new Form($this->db); $form = new Form($this->db);

View File

@ -419,7 +419,6 @@ if ($num > 0)
$style='pair'; $style='pair';
$now = dol_now(); $now = dol_now();
$i=0; $i=0;
$var=true;
$totalarray=array(); $totalarray=array();
while ($i < min($num,$limit)) while ($i < min($num,$limit))
{ {