mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix #yogosha5737
This commit is contained in:
parent
172b615d6c
commit
c98f38a209
|
|
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
|
|||
$langs->loadLangs(array('admin', 'multicurrency'));
|
||||
|
||||
// Access control
|
||||
if (!$user->admin) {
|
||||
if (!$user->admin || empty($conf->multicurrency->enabled)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ $action = GETPOST('action', 'aZ09');
|
|||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
$reg = array();
|
||||
if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
|
||||
$code = $reg[1];
|
||||
$value = GETPOST($code, 'alpha');
|
||||
|
|
|
|||
|
|
@ -33,9 +33,11 @@ if (!$user->admin || empty($conf->modulebuilder->enabled)) {
|
|||
$action = GETPOST('action', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == "update") {
|
||||
$res1 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README', 'restricthtml'), 'chaine', 0, '', $conf->entity);
|
||||
$res2 = dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTOR', GETPOST('MODULEBUILDER_ASCIIDOCTOR', 'nohtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
|
|
|||
|
|
@ -102,11 +102,18 @@ $arrayfields = array(
|
|||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
// Access control
|
||||
// TODO Open this page to a given permission so a sale representative can modify change rates. Permission should be added into module multicurrency.
|
||||
// One permission to read rates (history) and one to add/edit rates.
|
||||
if (!$user->admin || empty($conf->multicurrency->enabled)) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
if ($action == "create") {
|
||||
if (!empty($rateinput)) {
|
||||
$currencyRate_static = new CurrencyRate($db);
|
||||
|
|
@ -225,6 +232,7 @@ if (empty($reshook)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
|
@ -233,8 +241,9 @@ $htmlother = new FormOther($db);
|
|||
|
||||
$title = $langs->trans("CurrencyRate");
|
||||
$page_name = "ListCurrencyRate";
|
||||
$help_url = '';
|
||||
|
||||
llxHeader('', $title, $helpurl, '');
|
||||
llxHeader('', $title, $help_url, '');
|
||||
// Subheader
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans($page_name), $linkback);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user