File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 2020 die;
2121}
2222
23- /**
24- * Manual loaded file: the autoloader.
25- */
26- require_once __DIR__ . '/autoloader.php ' ;
27- $ autoloader = new OWC \OpenPub \Base \Autoloader ();
28-
2923/**
3024 * Not all the members of the OpenWebconcept are using composer in the root of their project.
3125 * Therefore they are required to run a composer install inside this plugin directory.
3226 * In this case the composer autoload file needs to be required.
27+ *
28+ * If this plugin is not installed with composer a custom autoloader is used.
3329 */
34- $ composerAutoload = __DIR__ . '/vendor/autoload.php ' ;
35-
36- if (file_exists ($ composerAutoload )) {
37- require_once $ composerAutoload ;
30+ if (!class_exists (\OWC \OpenPub \Base \Foundation \Plugin::class)) {
31+ if (file_exists (__DIR__ . '/vendor/autoload.php ' )) {
32+ require_once __DIR__ . '/vendor/autoload.php ' ;
33+ } else {
34+ require_once __DIR__ . '/autoloader.php ' ;
35+ $ autoloader = new \OWC \OpenPub \Base \Autoloader ();
36+ }
3837}
3938
4039/**
You can’t perform that action at this time.
0 commit comments