From 8fb4108163ea70a817eeba9d4d99e8da90b03912 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Dec 2011 19:22:12 +0100 Subject: [PATCH] Qual: childelement is a protected property --- htdocs/core/class/commonobject.class.php | 7 +++---- htdocs/core/class/html.form.class.php | 5 +++-- htdocs/product/class/product.class.php | 2 +- htdocs/product/fiche.php | 1 + htdocs/societe/class/societe.class.php | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8c199c0a952..302e3a86286 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1731,8 +1731,8 @@ abstract class CommonObject /** * Function to check if an object is used by others * - * @param id Id of object - * @return int <0 if KO, 0 if not used, >0 if already used + * @param int $id Id of object + * @return int <0 if KO, 0 if not used, >0 if already used */ function isObjectUsed($id) { @@ -1807,8 +1807,7 @@ abstract class CommonObject /** - * - * Enter description here ... + * List urls of elemùent * * @param unknown_type $objectid * @param unknown_type $objecttype diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7f8b9150fd3..ba5e55398bc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2230,7 +2230,7 @@ class Form * @param string $action Action * @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , )) * @param string $selectedchoice "" or "no" or "yes" - * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No + * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx * @param int $height Force height of box * @return string 'ajax' if a confirm ajax popup is shown, 'html' if it's an html form */ @@ -2313,7 +2313,8 @@ class Form { $autoOpen=true; $dialogconfirm='dialog-confirm'; - if (! is_int($useajax)) { + if (! is_int($useajax)) + { $button=$useajax; $useajax=1; $autoOpen=false; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index fda5c9bd9d8..eda21194932 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -37,7 +37,7 @@ class Product extends CommonObject public $element='product'; public $table_element='product'; public $fk_element='fk_product'; - public $childtables=array('propaldet','commandedet','facturedet','contratdet','product_fournisseur_price'); + protected $childtables=array('propaldet','commandedet','facturedet','contratdet','product_fournisseur_price'); protected $isnolinkedbythird = 1; // No field fk_soc protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 66f6bf0afb7..1d9a652768e 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -649,6 +649,7 @@ llxHeader('',$langs->trans("CardProduct".$_GET["type"]),$helpurl); $form = new Form($db); $formproduct = new FormProduct($db); + if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 00e4c2c3cc1..69a1acdffa3 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -39,7 +39,7 @@ class Societe extends CommonObject public $element='societe'; public $table_element = 'societe'; public $fk_element='fk_soc'; - public $childtables=array("propal","commande","facture","contrat","facture_fourn","commande_fournisseur"); + protected $childtables=array("propal","commande","facture","contrat","facture_fourn","commande_fournisseur"); protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe var $id;