mirror of
https://github.com/humhub/humhub.git
synced 2025-01-29 12:28:06 +01:00
Fixed IncompleteSetupWarning Admin Check
This commit is contained in:
parent
e2bfd54e22
commit
83eaf7335a
@ -32,7 +32,7 @@ class IncompleteSetupWarning extends Widget
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
if (Yii::$app->user->isAdmin()) {
|
||||
if (!Yii::$app->user->isAdmin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ class IncompleteSetupWarning extends Widget
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$problems = $this->getProblems();
|
||||
|
||||
if (count($problems) === 0) {
|
||||
@ -80,6 +81,7 @@ class IncompleteSetupWarning extends Widget
|
||||
*/
|
||||
protected function checkQueue()
|
||||
{
|
||||
|
||||
// Only for database queue
|
||||
if (Yii::$app->queue instanceof Queue) {
|
||||
/** @var Queue $queue */
|
||||
@ -94,6 +96,7 @@ class IncompleteSetupWarning extends Widget
|
||||
->andWhere('[[pushed_at]] <= :time - delay', [':time' => $time])
|
||||
->one($queue->db);
|
||||
|
||||
|
||||
if (is_array($counter) && $counter['jobCount'] > 0) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user