Skip to content

Commit 6191222

Browse files
authored
Update YformButton.php
1 parent f159dcf commit 6191222

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

lib/QuickNavigation/Button/YformButton.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ class YformButton implements ButtonInterface
2020
public function get(): string
2121
{
2222
$yform = rex_addon::get('yform');
23-
return match (true) {
24-
!$yform->isAvailable() => '',
25-
version_compare($yform->getVersion(), '5.0.0', '<') && !rex_plugin::get('yform', 'manager')->isAvailable() => '',
26-
default => ''
27-
};
23+
if (version_compare($yform->getVersion(), '5.0.0', '<')) {
24+
if (!$yform->isAvailable() || !rex_plugin::get('yform', 'manager')->isAvailable()) {
25+
return '';
26+
}
27+
}
28+
if (version_compare($yform->getVersion(), '5.0.0-beta1', '>=')) {
29+
if (!$yform->isAvailable() {
30+
return '';
31+
}
32+
}
2833
$tables = rex_yform_manager_table::getAll();
2934

3035
$yperm_suffix = '';

0 commit comments

Comments
 (0)