Merge pull request #22101 from dolibit-ut/patch-514

Update conferenceorbooth_card.php
This commit is contained in:
Laurent Destailleur 2022-09-07 13:08:37 +02:00 committed by GitHub
commit 51ee921d11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,27 +17,29 @@
*/
/**
* \file htdocs/eventorganization/conferenceorbooth_card.php
* \ingroup eventorganization
* \brief Page to create/edit/view conferenceorbooth
* \file htdocs/eventorganization/conferenceorbooth_card.php
* \ingroup eventorganization
* \brief Page to create/edit/view conferenceorbooth
*/
require '../main.inc.php';
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/lib/eventorganization_conferenceorbooth.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
global $dolibarr_main_url_root;
// Load translation files required by the page
$langs->loadLangs(array("eventorganization", "projects"));
$langs->loadLangs(array('eventorganization', 'projects'));
// Get parameters
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
@ -45,7 +47,6 @@ $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'co
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
// Get parameters
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$withproject = GETPOST('withproject', 'int');
@ -79,6 +80,7 @@ if (empty($action) && empty($id) && empty($ref)) {
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
// Permissions
$permissiontoread = $user->rights->eventorganization->read;
$permissiontoadd = $user->rights->eventorganization->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->eventorganization->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);