mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
NEW: Hidden option API_DISABLE_COMPRESSION is now visible in API setup
page.
This commit is contained in:
parent
fa1bddc79d
commit
de25cf3a72
|
|
@ -134,6 +134,7 @@ NEW: Use lang selector when using a field key 'lang' in modulebuilder
|
|||
NEW: we need to be able to put more filters on deleteByParentField() function
|
||||
NEW: make it easier to set the `keyword`, `keywords` and `description` attributes of an ecm file object
|
||||
NEW: Experimental feature to manage user sessions in database
|
||||
NEW: Hidden option API_DISABLE_COMPRESSION is now visible in API setup page.
|
||||
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ if (!$user->admin) {
|
|||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
//Activate ProfId
|
||||
// Activate Production mode
|
||||
if ($action == 'setproductionmode') {
|
||||
$status = GETPOST('status', 'alpha');
|
||||
|
||||
|
|
@ -69,6 +69,18 @@ if ($action == 'setproductionmode') {
|
|||
}
|
||||
}
|
||||
|
||||
// Disable compression mode
|
||||
if ($action == 'setdisablecomprssion') {
|
||||
$status = GETPOST('status', 'alpha');
|
||||
|
||||
if (dolibarr_set_const($db, 'API_DISABLE_COMPRESSION', $status, 'chaine', 0, '', 0) > 0) {
|
||||
header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'save') {
|
||||
dolibarr_set_const($db, 'API_RESTRICT_ON_IP', GETPOST('API_RESTRICT_ON_IP', 'alpha'));
|
||||
}
|
||||
|
|
@ -116,6 +128,21 @@ if ($production_mode) {
|
|||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("API_DISABLE_COMPRESSION").'</td>';
|
||||
$disable_compression = (empty($conf->global->API_DISABLE_COMPRESSION) ?false:true);
|
||||
if ($disable_compression) {
|
||||
print '<td><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisablecomprssion&token='.newToken().'&value='.($i + 1).'&status=0">';
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
print '</a></td>';
|
||||
} else {
|
||||
print '<td><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setdisablecomprssion&token='.newToken().'&value='.($i + 1).'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("RESTRICT_ON_IP");
|
||||
print ' '.$langs->trans("Example").': '.$langs->trans("IPListExample");
|
||||
|
|
|
|||
|
|
@ -2215,4 +2215,5 @@ IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=If you want to use a third tax, you
|
|||
PDF_USE_1A=Generate PDF with PDF/A-1b format
|
||||
MissingTranslationForConfKey = Missing translation for %s
|
||||
NativeModules=Native modules
|
||||
NoDeployedModulesFoundWithThisSearchCriteria=No modules found for these search criteria
|
||||
NoDeployedModulesFoundWithThisSearchCriteria=No modules found for these search criteria
|
||||
API_DISABLE_COMPRESSION=Disable compression of API responses
|
||||
Loading…
Reference in New Issue
Block a user