N°2522 - API : Deprecate SetupPage:log*

This commit is contained in:
acognet
2020-08-20 17:42:49 +02:00
parent 1afc6cd4c5
commit c4b7be5b6f
11 changed files with 300 additions and 299 deletions

View File

@@ -337,7 +337,7 @@ class ModuleDiscovery
$bOk = @eval('$bResult = '.$sBooleanExpr.'; return true;');
if ($bOk == false)
{
SetupPage::log_warning("Eval of '$sBooleanExpr' returned false");
SetupLog::Warning("Eval of '$sBooleanExpr' returned false");
echo "Failed to parse the boolean Expression = '$sBooleanExpr'<br/>";
}
}
@@ -467,7 +467,7 @@ class ModuleDiscovery
if ($bRet === false)
{
SetupPage::log_warning("Eval of $sRelDir/$sFile returned false");
SetupLog::Warning("Eval of $sRelDir/$sFile returned false");
}
//echo "<p>Done.</p>\n";
@@ -475,12 +475,12 @@ class ModuleDiscovery
catch(ParseError $e)
{
// PHP 7
SetupPage::log_warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage()." at line ".$e->getLine());
SetupLog::Warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage()." at line ".$e->getLine());
}
catch(Exception $e)
{
// Continue...
SetupPage::log_warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage());
SetupLog::Warning("Eval of $sRelDir/$sFile caused an exception: ".$e->getMessage());
}
}
}
@@ -503,27 +503,27 @@ class SetupWebPage extends ModuleDiscovery
// For backward compatibility with old modules...
public static function log_error($sText)
{
SetupPage::log_error($sText);
SetupLog::Error($sText);
}
public static function log_warning($sText)
{
SetupPage::log_warning($sText);
SetupLog::Warning($sText);
}
public static function log_info($sText)
{
SetupPage::log_info($sText);
SetupLog::Info($sText);
}
public static function log_ok($sText)
{
SetupPage::log_ok($sText);
SetupLog::Ok($sText);
}
public static function log($sText)
{
SetupPage::log($sText);
SetupLog::Ok($sText);
}
}