mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0
This commit is contained in:
@@ -1005,6 +1005,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
|||||||
'@phan-var-force string $paramname';
|
'@phan-var-force string $paramname';
|
||||||
if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace)) {
|
if (!is_array($out) && empty($_POST[$paramname]) && empty($noreplace)) {
|
||||||
$reg = array();
|
$reg = array();
|
||||||
|
$regreplace = array();
|
||||||
$maxloop = 20;
|
$maxloop = 20;
|
||||||
$loopnb = 0; // Protection against infinite loop
|
$loopnb = 0; // Protection against infinite loop
|
||||||
|
|
||||||
@@ -1054,11 +1055,17 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null
|
|||||||
} elseif ($reg[1] == 'ID') {
|
} elseif ($reg[1] == 'ID') {
|
||||||
$newout = '__ID__'; // We keep __ID__ we find into backtopage url
|
$newout = '__ID__'; // We keep __ID__ we find into backtopage url
|
||||||
} else {
|
} else {
|
||||||
$newout = ''; // Key not found, we replace with empty string
|
$newout = 'REGREPLACE_'.$loopnb; // Key not found, we replace with temporary string to reload later
|
||||||
|
$regreplace[$loopnb] = $reg[0];
|
||||||
}
|
}
|
||||||
//var_dump('__'.$reg[1].'__ -> '.$newout);
|
//var_dump('__'.$reg[1].'__ -> '.$newout);
|
||||||
$out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out);
|
$out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out);
|
||||||
}
|
}
|
||||||
|
if (!empty($regreplace)) {
|
||||||
|
foreach ($regreplace as $key => $value) {
|
||||||
|
$out = preg_replace('/REGREPLACE_'.$key.'/', $value, $out);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check type of variable and make sanitization according to this
|
// Check type of variable and make sanitization according to this
|
||||||
|
|||||||
@@ -222,3 +222,15 @@ UPDATE llx_c_units SET scale = 1 WHERE code = 'S';
|
|||||||
UPDATE llx_c_tva SET taux = 3 WHERE fk_pays = 102 AND taux = 16;
|
UPDATE llx_c_tva SET taux = 3 WHERE fk_pays = 102 AND taux = 16;
|
||||||
|
|
||||||
UPDATE llx_menu SET url = CONCAT(url, '&mode=init') WHERE fk_mainmenu = 'ticket' AND titre = 'NewTicket' AND url LIKE '/ticket/card.php?action=create%' AND url NOT LIKE '%mode=init%';
|
UPDATE llx_menu SET url = CONCAT(url, '&mode=init') WHERE fk_mainmenu = 'ticket' AND titre = 'NewTicket' AND url LIKE '/ticket/card.php?action=create%' AND url NOT LIKE '%mode=init%';
|
||||||
|
|
||||||
|
-- VMYSQL4.1 ALTER TABLE llx_asset MODIFY COLUMN not_depreciated boolean DEFAULT false;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN not_depreciated DROP DEFAULT, ALTER COLUMN not_depreciated TYPE boolean USING not_depreciated::integer <> 0, ALTER COLUMN not_depreciated SET DEFAULT false;
|
||||||
|
|
||||||
|
-- VMYSQL4.1 ALTER TABLE llx_asset MODIFY COLUMN disposal_depreciated boolean DEFAULT false;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN disposal_depreciated DROP DEFAULT, ALTER COLUMN disposal_depreciated TYPE boolean USING disposal_depreciated::integer <> 0, ALTER COLUMN disposal_depreciated SET DEFAULT false;
|
||||||
|
|
||||||
|
-- VMYSQL4.1 ALTER TABLE llx_asset MODIFY COLUMN disposal_subject_to_vat boolean DEFAULT false;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN disposal_subject_to_vat DROP DEFAULT, ALTER COLUMN disposal_subject_to_vat TYPE boolean USING disposal_subject_to_vat::integer <> 0, ALTER COLUMN disposal_subject_to_vat SET DEFAULT false;
|
||||||
|
|
||||||
|
-- VMYSQL4.1 ALTER TABLE llx_asset_depreciation_options_economic MODIFY COLUMN accelerated_depreciation_option boolean DEFAULT false;
|
||||||
|
-- VPGSQL8.2 ALTER TABLE llx_asset ALTER COLUMN llx_asset_depreciation_options_economic DROP DEFAULT, ALTER COLUMN llx_asset_depreciation_options_economic TYPE boolean USING llx_asset_depreciation_options_economic::integer <> 0, ALTER COLUMN llx_asset_depreciation_options_economic SET DEFAULT false;
|
||||||
|
|||||||
Reference in New Issue
Block a user