diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 856f5a412d9..d1a4ff48f67 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -1,7 +1,7 @@ - * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2012 Juanjo Menent +/* Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * 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 ''.$langs->trans($desc).''; print ''; $constante = 'FCKEDITOR_ENABLE_'.$const; - $value = $conf->global->$constante; - if($value == 0) + $value = (isset($conf->global->$constante)?$conf->global->$constante:0); + if ($value == 0) { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } - else if($value == 1) + else if ($value == 1) { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } print ""; @@ -164,7 +164,7 @@ else */ } -$db->close(); llxFooter(); +$db->close(); ?> \ No newline at end of file diff --git a/htdocs/core/tpl/objectline_add.tpl.php b/htdocs/core/tpl/objectline_add.tpl.php index 6131a644c99..4fa3a8274df 100644 --- a/htdocs/core/tpl/objectline_add.tpl.php +++ b/htdocs/core/tpl/objectline_add.tpl.php @@ -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(); ?> diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 693a591e5fa..baf07f67455 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -60,7 +60,7 @@ - fk_product > 0) { ?> + fk_product > 0) { ?> product_label); ?> -
- + + +
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(); ?> diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 4cfece08d34..d1874d11eaa 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -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 ";