Skip to content

Commit fedf4cb

Browse files
committed
update checkers
1 parent a3b4f7e commit fedf4cb

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/Ubiquity/controllers/admin/UbiquityMyAdminBaseController.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class UbiquityMyAdminBaseController extends Controller implements HasModelViewer
186186
]
187187
];
188188

189-
public const VERSION = '2.5.2';
189+
public const VERSION = '2.5.3';
190190

191191
public $style;
192192

@@ -414,32 +414,40 @@ protected function reloadConfig($originalConfig) {
414414
}
415415

416416
protected function _checkModelsUpdates(&$config, $onMainPage) {
417+
$msg='Updated models files';
418+
$this->jquery->exec('$(":contains('.$msg.')").closest(".toast-container").html("");',true);
417419
$models = CacheManager::modelsCacheUpdated($config);
418420
if (\is_array($models) && \count($models) > 0) {
419-
$this->_smallUpdateMessageCache($onMainPage, 'models', 'sticky note inverted', 'Updated models files (<b>' . count($models) . '</b>)&nbsp;', 'warning', $onMainPage ? '_initCache/models' : '_initCache/models/models', $onMainPage ? '#messages' : '#main-content');
421+
$this->_smallUpdateMessageCache($onMainPage, 'models', 'sticky note inverted', $msg.' (<b>' . count($models) . '</b>)&nbsp;', 'warning', $onMainPage ? '_initCache/models' : '_initCache/models/models', $onMainPage ? '#messages' : '#main-content');
420422
}
421423
}
422424

423425
protected function _checkRouterUpdates(&$config, $onMainPage) {
426+
$msg='Updated controller files';
427+
$this->jquery->exec('$(":contains('.$msg.')").closest(".toast-container").html("");',true);
424428
$caches = CacheManager::controllerCacheUpdated($config);
425429
if (\is_array($caches) && \count($caches) > 0) {
426430
if (! $this->hasMaintenance()) {
427-
$this->_smallUpdateMessageCache($onMainPage, 'router', 'car', 'Updated controller files ', 'warning', $onMainPage ? '_initCache/controllers' : '_initCacheRouter', $onMainPage ? '#messages' : '#divRoutes');
431+
$this->_smallUpdateMessageCache($onMainPage, 'router', 'car', $msg, 'warning', $onMainPage ? '_initCache/controllers' : '_initCacheRouter', $onMainPage ? '#messages' : '#divRoutes');
428432
}
429433
}
430434
}
431435

432436
protected function _checkConfigUpdates($onMainPage){
437+
$msg='Updated configuration files';
438+
$this->jquery->exec('$(":contains('.$msg.')").closest(".toast-container").html("");',true);
433439
if(Configuration::isConfigUpdated()){
434-
$this->_smallUpdateMessageCache($onMainPage, 'config', 'settings', 'Updated configuration files ', 'warning', $onMainPage ? '_initCache/config' : '_initCache/config/config', $onMainPage ? '#messages' : '#main-content');
440+
$this->_smallUpdateMessageCache($onMainPage, 'config', 'settings', $msg, 'warning', $onMainPage ? '_initCache/config' : '_initCache/config/config', $onMainPage ? '#messages' : '#main-content');
435441
}
436442
}
437443

438444
protected function _checkACLUpdates($onMainPage){
445+
$msg='Updated ACLs files';
446+
$this->jquery->exec('$(":contains('.$msg.')").closest(".toast-container").html("");',true);
439447
if(class_exists(AclManager::class)) {
440448
$config=Startup::$config;
441449
if (AclManager::checkCache($config)) {
442-
$this->_smallUpdateMessageCache($onMainPage, 'acl', 'users', 'Updated ACLs files ', 'warning', $onMainPage ? '_initCache/acls' : '_initCache/acls/acls', $onMainPage ? '#messages' : '#main-content');
450+
$this->_smallUpdateMessageCache($onMainPage, 'acl', 'users', $msg, 'warning', $onMainPage ? '_initCache/acls' : '_initCache/acls/acls', $onMainPage ? '#messages' : '#main-content');
443451
}
444452
}
445453
}

0 commit comments

Comments
 (0)