diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 5907c754644..4dd005fca85 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -59,10 +59,10 @@ $max=100; $form = new Form($db); -llxHeader('',$title); - $title = $langs->trans('FiscalYears'); +llxHeader('',$title,LOG_ERR); + print_fiche_titre($langs->trans('FiscalYears')); $sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity"; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 102f45496c6..f8a36c4f71a 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -70,7 +70,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($rowid); $canvas = $object->canvas?$object->canvas:GETPOST("canvas"); -$objcanvas=''; +$objcanvas=null; if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; @@ -79,7 +79,7 @@ if (! empty($canvas)) } // Security check -$result=restrictedArea($user,'adherent',$rowid,'','','fk_soc', 'rowid', $objcanvas); +$result=restrictedArea($user, 'adherent', $rowid, '', '', 'fk_soc', 'rowid', $objcanvas); if ($rowid > 0) { diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php index c81366bc5e9..ac0fe715c99 100644 --- a/htdocs/admin/dons.php +++ b/htdocs/admin/dons.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2012-2013 Juanjo Menent * Copyright (C) 2013 Philippe Grand - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014 Alexandre Spangaro * * 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 @@ -37,6 +37,8 @@ $typeconst=array('yesno','texte','chaine'); $action = GETPOST('action','alpha'); +$type='donation'; + /* * Action @@ -135,7 +137,7 @@ else if ($action == 'setart200') { $res = dolibarr_set_const($db, "DONATION_ART200", $setart200, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - + if (! $error) { setEventMessage($langs->trans("SetupSaved"), 'mesgs'); } else { @@ -147,7 +149,7 @@ else if ($action == 'setart238') { $res = dolibarr_set_const($db, "DONATION_ART238", $setart238, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - + if (! $error) { setEventMessage($langs->trans("SetupSaved"), 'mesgs'); } else { @@ -159,7 +161,7 @@ else if ($action == 'setart885') { $res = dolibarr_set_const($db, "DONATION_ART885", $setart885, 'yesno', 0, '', $conf->entity); if (! $res > 0) $error ++; - + if (! $error) { setEventMessage($langs->trans("SetupSaved"), 'mesgs'); } else { @@ -183,7 +185,7 @@ print_fiche_titre($langs->trans("DonationsSetup"),$linkback,'setup'); * Params */ print_titre($langs->trans("Options")); - + print ''; print ''; print ''; @@ -207,11 +209,11 @@ print ''; /* * French params */ -if ($conf->global->MAIN_LANG_DEFAULT == "fr_FR") +if ($conf->global->MAIN_LANG_DEFAULT == "fr_FR") { print '
'; print_titre($langs->trans("FrenchOptions")); - + print '
'.$langs->trans("Parameter").'
'; print ''; print ''; @@ -377,7 +379,7 @@ if (is_resource($handle)) print ''; - + // Preview print '
' . $langs->trans('Parameters') . ''; print $form->textwithpicto('',$htmltooltip,-1,0); print ''; print ''.img_object($langs->trans("Preview"),'generic').''; diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index e85d3dbed71..9b7eb8ea755 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -34,7 +34,7 @@ */ abstract class CommonObject { - protected $db; + public $db; public $error; public $errors; public $canvas; // Contains canvas name if it is diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 94898ec5452..5448df14010 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -56,7 +56,7 @@ class ExtraFields var $error; var $errno; - static $type2label=array( + public static $type2label=array( 'varchar'=>'String', 'text'=>'TextLong', 'int'=>'Int', diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 8c29e2d6a77..d4a2144285f 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -26,6 +26,7 @@ /** * Prepare array with list of admin tabs * + * @param $object Object instance we show card * @return array Array of tabs to show */ function admin_accounting_prepare_head($object=null) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 237fa97c0f0..5f9d42cdd44 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -74,7 +74,7 @@ if ($id > 0 || ! empty($ref)) // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $canvas = !empty($object->canvas)?$object->canvas:GETPOST("canvas"); -$objcanvas=''; +$objcanvas=null; if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index c199344647e..a6b09cea8a6 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -69,7 +69,7 @@ $limit = $conf->liste_limit; // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $canvas=GETPOST("canvas"); -$objcanvas=''; +$objcanvas=null; if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index d9b3538eb72..c8480d6e65a 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -63,7 +63,7 @@ $search_categ = GETPOST("search_categ"); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $canvas=GETPOST("canvas"); -$objcanvas=''; +$objcanvas=null; if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 0a5a9303d90..62869daf366 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -65,7 +65,7 @@ $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($socid); $canvas = $object->canvas?$object->canvas:GETPOST("canvas"); -$objcanvas=''; +$objcanvas=null; if (! empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php';