FIX #yogosha13770
This commit is contained in:
parent
a4f3740e19
commit
39cd6bfcee
@ -48,6 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|||||||
$langs->loadLangs(array('bills', 'companies', 'donations', 'users'));
|
$langs->loadLangs(array('bills', 'companies', 'donations', 'users'));
|
||||||
|
|
||||||
$id = GETPOST('rowid') ?GETPOST('rowid', 'int') : GETPOST('id', 'int');
|
$id = GETPOST('rowid') ?GETPOST('rowid', 'int') : GETPOST('id', 'int');
|
||||||
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
@ -58,10 +59,11 @@ $projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
|||||||
$public_donation = (int) GETPOST("public", 'int');
|
$public_donation = (int) GETPOST("public", 'int');
|
||||||
|
|
||||||
$object = new Don($db);
|
$object = new Don($db);
|
||||||
$extrafields = new ExtraFields($db);
|
if ($id > 0 || $ref) {
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
$extrafields = new ExtraFields($db);
|
||||||
$result = restrictedArea($user, 'don', $id);
|
|
||||||
|
|
||||||
// fetch optionals attributes and labels
|
// fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
@ -71,6 +73,11 @@ $search_array_options = $extrafields->getOptionalsFromPost($object->table_elemen
|
|||||||
$hookmanager->initHooks(array('doncard', 'globalcard'));
|
$hookmanager->initHooks(array('doncard', 'globalcard'));
|
||||||
|
|
||||||
$upload_dir = $conf->don->dir_output;
|
$upload_dir = $conf->don->dir_output;
|
||||||
|
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$result = restrictedArea($user, 'don', $object->id);
|
||||||
|
|
||||||
$permissiontoadd = $user->rights->don->creer;
|
$permissiontoadd = $user->rights->don->creer;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -49,13 +49,6 @@ $action = GETPOST('action', 'aZ09');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||||
|
|
||||||
// Security check
|
|
||||||
if ($user->socid) {
|
|
||||||
$socid = $user->socid;
|
|
||||||
}
|
|
||||||
$result = restrictedArea($user, 'don', $id, '');
|
|
||||||
|
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
@ -74,13 +67,20 @@ if (!$sortfield) {
|
|||||||
$sortfield = "name";
|
$sortfield = "name";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$object = new Don($db);
|
$object = new Don($db);
|
||||||
$object->fetch($id, $ref);
|
if ($id > 0 || $ref) {
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
$upload_dir = $conf->don->dir_output.'/'.get_exdir($id, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref);
|
$upload_dir = $conf->don->dir_output.'/'.get_exdir($id, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref);
|
||||||
$modulepart = 'don';
|
$modulepart = 'don';
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if ($user->socid) {
|
||||||
|
$socid = $user->socid;
|
||||||
|
}
|
||||||
|
$result = restrictedArea($user, 'don', $object->id);
|
||||||
|
|
||||||
$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php
|
$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,11 +35,11 @@ $hookmanager->initHooks(array('donationindex'));
|
|||||||
|
|
||||||
$langs->load("donations");
|
$langs->load("donations");
|
||||||
|
|
||||||
|
$donation_static = new Don($db);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$result = restrictedArea($user, 'don');
|
$result = restrictedArea($user, 'don');
|
||||||
|
|
||||||
$donation_static = new Don($db);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -38,14 +38,17 @@ $ref = GETPOST('ref', 'alpha');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||||
|
|
||||||
|
$object = new Don($db);
|
||||||
|
if ($id > 0 || $ref) {
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
$result = restrictedArea($user, 'don', $id, '');
|
$result = restrictedArea($user, 'don', $object->id);
|
||||||
|
|
||||||
$object = new Don($db);
|
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -88,6 +88,11 @@ $fieldstosearchall = array(
|
|||||||
'd.firstname'=>'Firstname',
|
'd.firstname'=>'Firstname',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
$result = restrictedArea($user, 'don');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@ -43,17 +43,19 @@ $ref = GETPOST('ref', 'alpha');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('donnote'));
|
||||||
|
|
||||||
|
$object = new Don($db);
|
||||||
|
if ($id > 0 || $ref) {
|
||||||
|
$object->fetch($id, $ref);
|
||||||
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = 0;
|
$socid = 0;
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
$hookmanager->initHooks(array('donnote'));
|
$result = restrictedArea($user, 'don', $object->id, '');
|
||||||
|
|
||||||
$result = restrictedArea($user, 'don', $id, '');
|
|
||||||
|
|
||||||
$object = new Don($db);
|
|
||||||
$object->fetch($id);
|
|
||||||
|
|
||||||
$permissionnote = $user->rights->don->creer; // Used by the include of actions_setnotes.inc.php
|
$permissionnote = $user->rights->don->creer; // Used by the include of actions_setnotes.inc.php
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user