mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Clean code
This commit is contained in:
@@ -432,8 +432,8 @@ function GETPOSTISSET($paramname)
|
||||
* Can be used before GETPOST to know if the $check param of GETPOST need to check an array or a string
|
||||
*
|
||||
* @param string $paramname Name or parameter to test
|
||||
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
||||
* @return bool True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
|
||||
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get)
|
||||
* @return bool True if we have just submit a POST or GET request with the parameter provided (even if param is empty)
|
||||
*/
|
||||
function GETPOSTISARRAY($paramname, $method = 0)
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
|
||||
$search_btn = GETPOST('button_search', 'alpha');
|
||||
$search_remove_btn = GETPOST('button_removefilter', 'alpha');
|
||||
|
||||
if (is_array(GETPOST('search_status', 'none'))) { // 'none' because we want to know type before sanitizing
|
||||
if (GETPOSTISARRAY('search_status')) {
|
||||
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
||||
} else {
|
||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
||||
|
||||
@@ -464,7 +464,9 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
//var_dump($val);
|
||||
if (!in_array($val[1], array(
|
||||
"'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'",
|
||||
"'search_status'", '"mysqldump"', '"postgresqldump"', "'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'", '"MAIN_MAIL_SMTPS_PW"'))) {
|
||||
'"mysqldump"', '"postgresqldump"',
|
||||
"'db_pass_root'", "'db_pass'", '"pass"', '"pass1"', '"pass2"', '"password"', "'password'",
|
||||
'"MAIN_MAIL_SMTPS_PW"', '"MAIN_MAIL_SMTPS_PW_EMAILING"', '"MAIN_MAIL_SMTPS_PW_TICKET"'))) {
|
||||
$ok=false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user