mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
Debug v21
This commit is contained in:
@@ -2710,12 +2710,17 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
* Check for module compliance with Dolibarr rules and law
|
||||
* If a module is reported by this function,it is surely a malware. Delete it as soon as possible.
|
||||
*
|
||||
* @return int|string Return integer <0 if Error, 0 == not compliant, 'string' with message if module not compliant
|
||||
* @param string $nametocheck Name to check
|
||||
* @return int|string Return integer <0 if Error, 0 == not compliant, 'string' with message if module not compliant
|
||||
*/
|
||||
public function checkForCompliance()
|
||||
public function checkForCompliance($nametocheck)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
if (empty($nametocheck)) {
|
||||
$nametocheck = $this->name;
|
||||
}
|
||||
|
||||
// Get list of illegal modules name or ID
|
||||
if (empty($conf->cache['noncompliantmodules'])) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
|
||||
@@ -2749,7 +2754,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
||||
}
|
||||
|
||||
if (!empty($conf->cache['noncompliantmodules'])) {
|
||||
$modulekey = strtolower($this->name);
|
||||
$modulekey = strtolower($nametocheck);
|
||||
if (in_array($modulekey, array_keys($conf->cache['noncompliantmodules']))) {
|
||||
$answer = trim($conf->cache['noncompliantmodules'][$modulekey]['message']);
|
||||
if (!empty($conf->cache['noncompliantmodules'][$modulekey]['message2'])) {
|
||||
|
||||
Reference in New Issue
Block a user