mirror of https://git.dotclear.org/dev/dotclear
Use constant('CONSTANT_NAME') rather than direct CONSTANT_NAME to get value
to avoid false errors of static code analyzer on undefined constantsfeature/quickmenu
parent
a55c0b5d76
commit
a641663fe9
|
@ -75,7 +75,7 @@ class AntispamFilterAkismet extends SpamFilter
|
|||
{
|
||||
parent::__construct();
|
||||
|
||||
if (defined('DC_AKISMET_SUPER') && DC_AKISMET_SUPER && !App::auth()->isSuperAdmin()) {
|
||||
if (defined('DC_AKISMET_SUPER') && constant('DC_AKISMET_SUPER') && !App::auth()->isSuperAdmin()) {
|
||||
$this->has_gui = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ class Backend extends Process
|
|||
},
|
||||
]);
|
||||
|
||||
if ((defined('DC_ANTISPAM_CONF_SUPER') && !DC_ANTISPAM_CONF_SUPER) || App::auth()->isSuperAdmin()) {
|
||||
if ((defined('DC_ANTISPAM_CONF_SUPER') && !constant('DC_ANTISPAM_CONF_SUPER')) || App::auth()->isSuperAdmin()) {
|
||||
App::behavior()->addBehaviors([
|
||||
'adminBlogPreferencesFormV2' => BackendBehaviors::adminBlogPreferencesForm(...),
|
||||
'adminBeforeBlogSettingsUpdate' => BackendBehaviors::adminBeforeBlogSettingsUpdate(...),
|
||||
|
|
|
@ -65,7 +65,7 @@ class IpLookup extends SpamFilter
|
|||
{
|
||||
parent::__construct();
|
||||
|
||||
if (defined('DC_DNSBL_SUPER') && DC_DNSBL_SUPER && !App::auth()->isSuperAdmin()) {
|
||||
if (defined('DC_DNSBL_SUPER') && constant('DC_DNSBL_SUPER') && !App::auth()->isSuperAdmin()) {
|
||||
$this->has_gui = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class Frontend extends Process
|
|||
return false;
|
||||
}
|
||||
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && DC_FAIRTRACKBACKS_FORCE) {
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && constant('DC_FAIRTRACKBACKS_FORCE')) {
|
||||
App::behavior()->addBehavior('AntispamInitFilters', function (ArrayObject $stack) {
|
||||
$stack->append(AntispamFilterFairTrackbacks::class);
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ class Prepend extends Process
|
|||
return false;
|
||||
}
|
||||
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && !DC_FAIRTRACKBACKS_FORCE) {
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && !constant('DC_FAIRTRACKBACKS_FORCE')) {
|
||||
App::behavior()->addBehavior('AntispamInitFilters', function (ArrayObject $stack) {
|
||||
$stack->append(AntispamFilterFairTrackbacks::class);
|
||||
});
|
||||
|
|
|
@ -336,7 +336,7 @@ class HttpClient extends Socket
|
|||
$this->setHost($host, $port);
|
||||
|
||||
if (defined('HTTP_PROXY_HOST') && defined('HTTP_PROXY_PORT')) {
|
||||
$this->setProxy(HTTP_PROXY_HOST, HTTP_PROXY_PORT);
|
||||
$this->setProxy(constant('HTTP_PROXY_HOST'), constant('HTTP_PROXY_PORT'));
|
||||
}
|
||||
|
||||
if ($timeout) {
|
||||
|
|
Loading…
Reference in New Issue