forked from Wavyzz/dolibarr
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
|
* 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 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)
|
* @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)
|
* @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)
|
function GETPOSTISARRAY($paramname, $method = 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ $search_project_ref = GETPOST('search_project_ref', 'alpha');
|
|||||||
$search_btn = GETPOST('button_search', 'alpha');
|
$search_btn = GETPOST('button_search', 'alpha');
|
||||||
$search_remove_btn = GETPOST('button_removefilter', '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'));
|
$search_status = join(',', GETPOST('search_status', 'array:intcomma'));
|
||||||
} else {
|
} else {
|
||||||
$search_status = (GETPOST('search_status', 'intcomma') != '' ? GETPOST('search_status', 'intcomma') : GETPOST('statut', 'intcomma'));
|
$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);
|
//var_dump($val);
|
||||||
if (!in_array($val[1], array(
|
if (!in_array($val[1], array(
|
||||||
"'replacestring'", "'htmlheader'", "'WEBSITE_HTML_HEADER'", "'WEBSITE_CSS_INLINE'", "'WEBSITE_JS_INLINE'", "'WEBSITE_MANIFEST_JSON'", "'PAGE_CONTENT'", "'WEBSITE_README'",
|
"'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;
|
$ok=false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user