PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/src/autoload.php +6 -10 1.6.4 → 1.8.16 View file →
@@ -24,30 +24,26 @@
24 24 * @since 1.5
25 25 */
26 26 spl_autoload_register(function($class)
27 27 {
28 + $vcm_exists = is_file(implode(DIRECTORY_SEPARATOR, [VCM_SITE_PATH, 'helpers', 'lib.vikchannelmanager.php']));
29 +
28 30 // handle base VCM library
29 - if ($class === 'VikChannelManager')
31 + if ($class === 'VikChannelManager' || $class === 'E4jConnectRequest')
30 32 {
31 - require_once implode(DIRECTORY_SEPARATOR, [VCM_SITE_PATH, 'helpers', 'lib.vikchannelmanager.php']);
32 -
33 - return true;
33 + return $vcm_exists && include_once implode(DIRECTORY_SEPARATOR, [VCM_SITE_PATH, 'helpers', 'lib.vikchannelmanager.php']);
34 34 }
35 35
36 36 // handle config VCM library
37 37 if ($class === 'VikChannelManagerConfig')
38 38 {
39 - require_once implode(DIRECTORY_SEPARATOR, [VCM_SITE_PATH, 'helpers', 'vcm_config.php']);
40 -
41 - return true;
39 + return $vcm_exists && include_once implode(DIRECTORY_SEPARATOR, [VCM_SITE_PATH, 'helpers', 'vcm_config.php']);
42 40 }
43 41
44 42 // handle base VBO library
45 43 if ($class === 'VikBooking')
46 44 {
47 - require_once implode(DIRECTORY_SEPARATOR, [VBO_SITE_PATH, 'helpers', 'lib.vikbooking.php']);
48 -
49 - return true;
45 + return (bool) require_once implode(DIRECTORY_SEPARATOR, [VBO_SITE_PATH, 'helpers', 'lib.vikbooking.php']);
50 46 }
51 47
52 48 $guess_vbo = stripos($class, 'VBO');
53 49 $guess_vcm = stripos($class, 'VCM');