mirror of https://git.dotclear.org/dev/dotclear
No need to declare constants in PHPStan bootstrap
parent
7fea0b3812
commit
1a15531703
|
@ -1,9 +1,5 @@
|
|||
<?php
|
||||
|
||||
// Mock some global constants
|
||||
define('DC_ANTISPAM_CONF_SUPER', true);
|
||||
define('DC_FAIRTRACKBACKS_FORCE', true);
|
||||
|
||||
// Xdebug method()
|
||||
// function xdebug_time_index() {}
|
||||
// function xdebug_get_profiler_filename() {}
|
||||
|
|
|
@ -71,7 +71,7 @@ class Backend extends Process
|
|||
},
|
||||
]);
|
||||
|
||||
if (!DC_ANTISPAM_CONF_SUPER || App::auth()->isSuperAdmin()) {
|
||||
if ((defined('DC_ANTISPAM_CONF_SUPER') && !DC_ANTISPAM_CONF_SUPER) || App::auth()->isSuperAdmin()) {
|
||||
App::behavior()->addBehaviors([
|
||||
'adminBlogPreferencesFormV2' => BackendBehaviors::adminBlogPreferencesForm(...),
|
||||
'adminBeforeBlogSettingsUpdate' => BackendBehaviors::adminBeforeBlogSettingsUpdate(...),
|
||||
|
|
|
@ -30,7 +30,7 @@ class Frontend extends Process
|
|||
return false;
|
||||
}
|
||||
|
||||
if (DC_FAIRTRACKBACKS_FORCE) {
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && 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 (!DC_FAIRTRACKBACKS_FORCE) {
|
||||
if (defined('DC_FAIRTRACKBACKS_FORCE') && !DC_FAIRTRACKBACKS_FORCE) {
|
||||
App::behavior()->addBehavior('AntispamInitFilters', function (ArrayObject $stack) {
|
||||
$stack->append(AntispamFilterFairTrackbacks::class);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue