diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 4d0ab65a941..48797dd0432 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -35,6 +35,19 @@ $element = GETPOST('element','alpha',2); $table_element = GETPOST('table_element','alpha',2); $fk_element = GETPOST('fk_element','alpha',2); +/* Example: +field:editval_ref_customer (8 first chars will removed to know name of property) +element:contrat +table_element:contrat +fk_element:4 +type:string +value:aaa +loadmethod: +savemethod: +savemethodname: +*/ + + /* * View */ @@ -81,7 +94,7 @@ if (! empty($field) && ! empty($element) && ! empty($table_element) && ! empty($ } else $newelement = $element; - if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->write) + if (! empty($user->rights->$newelement->creer) || ! empty($user->rights->$newelement->create) || ! empty($user->rights->$newelement->write) || (isset($subelement) && (! empty($user->rights->$newelement->$subelement->creer) || ! empty($user->rights->$newelement->$subelement->write))) || ($element == 'payment' && $user->rights->facture->paiement) || ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer)) diff --git a/htdocs/core/class/genericobject.class.php b/htdocs/core/class/genericobject.class.php index 32960664c17..c89b5c31fea 100644 --- a/htdocs/core/class/genericobject.class.php +++ b/htdocs/core/class/genericobject.class.php @@ -24,8 +24,7 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; /** - * \class GenericObject - * \brief Class of a generic business object + * Class of a generic business object */ class GenericObject extends CommonObject diff --git a/htdocs/core/modules/modWebsites.class.php b/htdocs/core/modules/modWebsites.class.php index 30795c6c0fa..a510e569b60 100644 --- a/htdocs/core/modules/modWebsites.class.php +++ b/htdocs/core/modules/modWebsites.class.php @@ -99,7 +99,7 @@ class modWebsites extends DolibarrModules $this->rights[$r][0] = 10002; $this->rights[$r][1] = 'Create/modify website content'; $this->rights[$r][3] = 0; - $this->rights[$r][4] = 'create'; + $this->rights[$r][4] = 'write'; $r++; $this->rights[$r][0] = 10003; diff --git a/htdocs/websites/index.php b/htdocs/websites/index.php index d61bad409a2..475fe219826 100644 --- a/htdocs/websites/index.php +++ b/htdocs/websites/index.php @@ -486,6 +486,7 @@ if (count($object->records) > 0) { $realurl=$urlwithroot.'/public/websites/index.php?website='.$website; $dataroot=DOL_DATA_ROOT.'/websites/'.$website; + if (! empty($object->virtualhost)) $realurl=$object->virtualhost; // TODO If virtual url defined, we use it /*print ' - '.$langs->trans("RealURL").' '; @@ -507,10 +508,21 @@ if (count($object->records) > 0) print '