Fix: convert line delimiters !!!

This commit is contained in:
Regis Houssin
2012-09-19 17:53:09 +02:00
parent 63a68d0d1c
commit d58c106f66
20 changed files with 109 additions and 109 deletions

View File

@@ -440,7 +440,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
}
// Clean some parameters
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
// Si verif ok et action add, on ajoute la ligne
if ($ok && GETPOST('actionadd'))
@@ -814,7 +814,7 @@ if ($id)
/*
$tmparray=getLabelOfField($fieldlist[$field]);
$showfield=$tmp['showfield'];
$valuetoshow=$tmp['valuetoshow'];
$valuetoshow=$tmp['valuetoshow'];
$align=$tmp['align'];
$sortable=$tmp['sortable'];
*/

View File

@@ -237,13 +237,13 @@ if ($action == 'edit') // Edit
print '</tr>';
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
{
// Show bugtrack link
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
print '</td>';
print '<td width="20">&nbsp;</td>';
{
// Show bugtrack link
$var=!$var;
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
print $form->selectyesno('MAIN_BUGTRACK_ENABLELINK',$conf->global->MAIN_BUGTRACK_ENABLELINK,1);
print '</td>';
print '<td width="20">&nbsp;</td>';
print '</tr>';
}
@@ -390,13 +390,13 @@ else // Show
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
print '</td></tr>';
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
{
// Show bugtrack link
$var=!$var;
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
print '<td width="20">&nbsp;</td>';
// Show bugtrack link
$var=!$var;
print '<tr '.$bc[$var].'"><td width="35%">'.$langs->trans("ShowBugTrackLink").'</td><td>';
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
print '<td width="20">&nbsp;</td>';
print "</tr>";
}

View File

@@ -263,21 +263,21 @@ class Contact extends CommonObject
unset($this->state_code);
unset($this->state);
// Actions on extra fields (by external module or standard code)
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
$hookmanager->initHooks(array('contactdao'));
$parameters=array('socid'=>$this->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
// Actions on extra fields (by external module or standard code)
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
$hookmanager->initHooks(array('contactdao'));
$parameters=array('socid'=>$this->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
{
$result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
else if ($reshook < 0) $error++;
$result=$this->insertExtraFields();
if ($result < 0)
{
$error++;
}
}
else if ($reshook < 0) $error++;
if (! $error && ! $notrigger)
{

View File

@@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$langs->load("companies");
$langs->load("users");
@@ -48,7 +48,7 @@ $socid = GETPOST('socid','int');
if ($user->societe_id) $socid=$user->societe_id;
$object = new Contact($db);
$extrafields = new ExtraFields($db);
$extrafields = new ExtraFields($db);
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$object->getCanvas($id);
@@ -76,7 +76,7 @@ $hookmanager->initHooks(array('contactcard'));
$parameters=array('id'=>$id, 'objcanvas'=>$objcanvas);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
$error=$hookmanager->error; $errors=array_merge($errors, (array) $hookmanager->errors);
if (empty($reshook))
{
@@ -254,14 +254,14 @@ if (empty($reshook))
$object->priv = $_POST["priv"];
$object->note = $_POST["note"];
// Get extra fields
foreach($_POST as $key => $value)
{
if (preg_match("/^options_/",$key))
{
$object->array_options[$key]=GETPOST($key);
}
}
// Get extra fields
foreach($_POST as $key => $value)
{
if (preg_match("/^options_/",$key))
{
$object->array_options[$key]=GETPOST($key);
}
}
$result = $object->update($_POST["contactid"], $user);
@@ -285,8 +285,8 @@ if (empty($reshook))
* View
*/
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('contact');
// fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label('contact');
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
llxHeader('',$langs->trans("ContactsAddresses"),$help_url);
@@ -492,20 +492,20 @@ else
// Note
print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3" valign="top"><textarea name="note" cols="70" rows="'.ROWS_3.'">'.(isset($_POST["note"])?$_POST["note"]:$object->note).'</textarea></td></tr>';
// Other attributes
$parameters=array('colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showInputField($key,$value);
print '</td></tr>'."\n";
}
}
// Other attributes
$parameters=array('colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options["options_".$key])?$object->array_options["options_".$key]:''));
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showInputField($key,$value);
print '</td></tr>'."\n";
}
}
print "</table><br>";
@@ -688,20 +688,20 @@ else
print isset($_POST["note"])?$_POST["note"]:$object->note;
print '</textarea></td></tr>';
// Other attributes
$parameters=array('colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showInputField($key,$value);
print "</td></tr>\n";
}
}
// Other attributes
$parameters=array('colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:$object->array_options["options_".$key]);
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showInputField($key,$value);
print "</td></tr>\n";
}
}
$object->load_ref_elements();
if (! empty($conf->commande->enabled))
@@ -898,20 +898,20 @@ else
print nl2br($object->note);
print '</td></tr>';
// Other attributes
$parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showOutputField($key,$value);
print "</td></tr>\n";
}
}
// Other attributes
$parameters=array('socid'=>$socid, 'colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label))
{
foreach($extrafields->attribute_label as $key=>$label)
{
$value=(isset($_POST["options_".$key])?$_POST["options_".$key]:(isset($object->array_options['options_'.$key])?$object->array_options['options_'.$key]:''));
print '<tr><td>'.$label.'</td><td colspan="3">';
print $extrafields->showOutputField($key,$value);
print "</td></tr>\n";
}
}
$object->load_ref_elements();
if (! empty($conf->commande->enabled))

View File

@@ -906,12 +906,12 @@ function dol_meta_create($object)
// Define parent dir of elements
$element=$object->element;
if ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande';
elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture';
elseif ($object->element == 'project') $dir = $conf->projet->dir_output;
elseif ($object->element == 'shipping') $dir = $conf->expedition->dir_output.'/sending';
elseif ($object->element == 'delivery') $dir = $conf->expedition->dir_output.'/receipt';
elseif ($object->element == 'fichinter') $dir = $conf->ficheinter->dir_output;
if ($object->element == 'order_supplier') $dir = $conf->fournisseur->dir_output.'/commande';
elseif ($object->element == 'invoice_supplier') $dir = $conf->fournisseur->dir_output.'/facture';
elseif ($object->element == 'project') $dir = $conf->projet->dir_output;
elseif ($object->element == 'shipping') $dir = $conf->expedition->dir_output.'/sending';
elseif ($object->element == 'delivery') $dir = $conf->expedition->dir_output.'/receipt';
elseif ($object->element == 'fichinter') $dir = $conf->ficheinter->dir_output;
else $dir=empty($conf->$element->dir_output)?'':$conf->$element->dir_output;
if ($dir)

View File

@@ -262,7 +262,7 @@ class pdf_einstein extends ModelePDFCommandes
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -206,7 +206,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 3);
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.

View File

@@ -233,7 +233,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -265,7 +265,7 @@ class pdf_crabe extends ModelePDFFactures
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -246,7 +246,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -184,7 +184,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -239,7 +239,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot-50); // The only function to edit the bottom margin of current page to set it.

View File

@@ -263,7 +263,7 @@ class pdf_azur extends ModelePDFPropales
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -260,7 +260,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -272,7 +272,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$curY = $nexY;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
$pdf->SetTextColor(0,0,0);
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
$pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.

View File

@@ -1905,7 +1905,7 @@ class CommandeFournisseurLigne
var $total_localtax2;
var $total_ttc;
var $info_bits;
var $special_code;
var $special_code;
// From llx_product
var $libelle; // Label produit

View File

@@ -266,7 +266,7 @@ print '<br>';
print_fiche_titre($langs->trans('TitleOptionMainCP'),'','');
dol_fiche_head(array(),'','');
dol_fiche_head(array(),'','');
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?leftmenu=setup" name="config">'."\n";
print '<input type="hidden" name="action" value="add" />'."\n";
@@ -334,13 +334,13 @@ print '</table>'."\n";
print '<div align="center"><input type="submit" value="'.$langs->trans("ConfirmConfigCP").'" name="bouton" class="button"/></div>'."\n";
print '</form>'."\n\n";
dol_fiche_end();
dol_fiche_end();
print '<br>';
print_fiche_titre($langs->trans('TitleOptionEventCP'),'','');
dol_fiche_head(array(),'','');
dol_fiche_head(array(),'','');
$cp_events = $cp->fetchEventsCP();

View File

@@ -146,7 +146,7 @@ if ($action == 'create')
print "<br>";
print_titre($langs->trans('NewAttribute'));
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields.tpl.php';
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields.tpl.php';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

View File

@@ -134,7 +134,7 @@ if ($id > 0 || ! empty($ref))
print '<br>';
$colwidth=30;
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php';
dol_fiche_end();;
}

View File

@@ -354,10 +354,10 @@ else
//var_dump($tasksarray);
//var_dump($tasksrole);
if (! empty($conf->use_javascript_ajax))
if (! empty($conf->use_javascript_ajax))
{
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
}
include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
}
print '<table id="tablelines" class="noborder" width="100%">';
print '<tr class="liste_titre">';