PluginProbe
ShiftController Employee Shift Scheduling / trunk
ShiftController Employee Shift Scheduling vtrunk
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
← All changes | sh4/api/html/view.html.php +11 -3 4.9.92trunk View file →
@@ -96,11 +96,19 @@
96 96 $cfields = array();
97 97 ?>
98 98 <?php if( class_exists('SH4_CFields_Model') or class_exists('SH4_CFields2_Model') ) : ?>
99 99 <?php
100 -$f = ShiftController4::$instance->root();
101 -$cfieldsQuery = $f->make('SH4_CFields_Query');
102 -$cfields = $cfieldsQuery->read();
100 +$cfields = array();
101 +$f = null;
102 +if (class_exists('ShiftController4Legacy_Pro')) {
103 + $f = ShiftController4Legacy_Pro::$instance->root();
104 +} elseif (class_exists('ShiftController4')) {
105 + $f = ShiftController4::$instance->root();
106 +}
107 +if (null !== $f) {
108 + $cfieldsQuery = $f->make('SH4_CFields_Query');
109 + $cfields = $cfieldsQuery->read();
110 +}
103 111 ?>
104 112 <?php if( $cfields ) : ?>
105 113 <p>
106 114 <strong>__Optional Arguments__</strong>