Skip to content

Commit bf8b8a8

Browse files
authored
Conditionally initialize Api
estful based on yform version
1 parent 55fc0b2 commit bf8b8a8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

boot.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@
4747
rex_cronjob_manager::registerType(Cronjob\Sync::class);
4848
}
4949

50-
Api\Restful::init();
50+
if (version_compare(rex_addon::get('yform')->getVersion(), '5.0.0', '<')) {
51+
if (rex_plugin::get('yform', 'rest')->isAvailable()) {
52+
Api\Restful::init();
53+
}
54+
} else {
55+
Api\Restful::init();
56+
}
5157

5258
if (rex::isBackend()) {
5359
/**

0 commit comments

Comments
 (0)