Fix: missing <br> and strict mode

This commit is contained in:
Regis Houssin 2012-09-07 18:16:05 +02:00
parent d60211a7c8
commit c98e456ba9
4 changed files with 22 additions and 21 deletions

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -45,9 +45,9 @@ $modules = array(
// Conditions pour que l'option soit proposee
$conditions = array(
'SOCIETE' => 1,
'PRODUCTDESC' => ($conf->product->enabled||$conf->service->enabled),
'MAILING' => $conf->mailing->enabled,
'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled),
'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)),
'MAILING' => ! empty($conf->mailing->enabled),
'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)),
);
// Picto
$picto = array(
@ -129,14 +129,14 @@ else
print '<td>'.$langs->trans($desc).'</td>';
print '<td align="center" width="100">';
$constante = 'FCKEDITOR_ENABLE_'.$const;
$value = $conf->global->$constante;
if($value == 0)
$value = (isset($conf->global->$constante)?$conf->global->$constante:0);
if ($value == 0)
{
print '<a href="fckeditor.php?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
print '<a href="'.$_SERVER['PHP_SELF'].'?action=activate_'.strtolower($const).'">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
}
else if($value == 1)
else if ($value == 1)
{
print '<a href="fckeditor.php?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
print '<a href="'.$_SERVER['PHP_SELF'].'?action=disable_'.strtolower($const).'">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
}
print "</td>";
@ -164,7 +164,7 @@ else
*/
}
$db->close();
llxFooter();
$db->close();
?>

View File

@ -139,7 +139,8 @@ if (! empty($conf->margin->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
$doleditor=new DolEditor('product_desc', GETPOST('product_desc'), '', 150, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, $nbrows, 70);
$enable=(isset($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
$doleditor=new DolEditor('product_desc', GETPOST('product_desc'), '', 150, 'dolibarr_details', '', false, true, $enable, $nbrows, 70);
$doleditor->Create();
?>
</td>

View File

@ -60,7 +60,7 @@
</span>
<span id="price_base_type" class="hideobject"></span>
<?php } else if ($line->fk_product > 0) { ?>
<?php } else if ($line->fk_product > 0) { ?>
<a href="<?php echo DOL_URL_ROOT.'/product/fiche.php?id='.$line->fk_product; ?>">
<?php
@ -73,10 +73,9 @@
echo ' - '.nl2br($line->product_label);
?>
<br>
<?php
}
?>
<?php } ?>
<br>
<?php
if (is_object($hookmanager))
@ -87,10 +86,11 @@
}
// editeur wysiwyg
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$doleditor=new DolEditor('product_desc',$line->description,'',164,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,$nbrows,70);
$enable=(isset($conf->global->FCKEDITOR_ENABLE_DETAILS)?$conf->global->FCKEDITOR_ENABLE_DETAILS:0);
$doleditor=new DolEditor('product_desc',$line->description,'',164,'dolibarr_details','',false,true,$enable,$nbrows,70);
$doleditor->Create();
?>
</td>

View File

@ -69,7 +69,7 @@ if (! empty($action) && $action == 'fetch' && ! empty($id))
$found=false;
// Multiprice
if ($price_level >= 1) // If we need a particular price level (from 1 to 6)
if (isset($price_level) && $price_level >= 1) // If we need a particular price level (from 1 to 6)
{
$sql = "SELECT price, price_ttc, price_base_type, tva_tx";
$sql.= " FROM ".MAIN_DB_PREFIX."product_price ";