| @@ -91,25 +91,14 @@ | ||
| 91 | 91 | <strong>to</strong> (__To Date__, YYYYMMDD / __To Date Time__, YYYYMMDDHHMM)<br> |
| 92 | 92 | <strong>status_id</strong> (publish, draft)<br> |
| 93 | 93 | </p> |
| 94 | 94 | |
| 95 | +<?php if( class_exists('SH4_CFields_Model') ) : ?> | |
| 95 | 96 | <?php |
| 96 | -$cfields = array(); | |
| 97 | +$f = ShiftController4::$instance->root(); | |
| 98 | +$cfieldsQuery = $f->make('SH4_CFields_Query'); | |
| 99 | +$cfields = $cfieldsQuery->read(); | |
| 97 | 100 | ?> |
| 98 | -<?php if( class_exists('SH4_CFields_Model') or class_exists('SH4_CFields2_Model') ) : ?> | |
| 99 | -<?php | |
| 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 | -} | |
| 111 | -?> | |
| 112 | 101 | <?php if( $cfields ) : ?> |
| 113 | 102 | <p> |
| 114 | 103 | <strong>__Optional Arguments__</strong> |
| 115 | 104 | </p> |
| @@ -234,11 +223,8 @@ | ||
| 234 | 223 | <strong>start</strong> (__Start Date Time__, YYYYMMDDHHMM)<br> |
| 235 | 224 | <strong>end</strong> (__End Date Time__, YYYYMMDDHHMM)<br> |
| 236 | 225 | <strong>status_id</strong> (publish, draft)<br> |
| 237 | 226 | <strong>conflict</strong> (__Set to 1 to allow creation of shifts with conflicts__) <em>__optional__</em><br> |
| 238 | -<?php foreach( $cfields as $cfield ) : ?> | |
| 239 | -<strong><?php echo $cfield->getName(); ?></strong> (<?php echo $cfield->getLabel(); ?>)<br> | |
| 240 | -<?php endforeach; ?> | |
| 241 | 227 | </p> |
| 242 | 228 | |
| 243 | 229 | <p> |
| 244 | 230 | <strong>__Examples__</strong> |
| @@ -294,11 +280,8 @@ | ||
| 294 | 280 | <strong>start</strong> (__Start Date Time__, YYYYMMDDHHMM) <em>__optional__</em><br> |
| 295 | 281 | <strong>end</strong> (__End Date Time__, YYYYMMDDHHMM) <em>__optional__</em><br> |
| 296 | 282 | <strong>status_id</strong> (publish, draft) <em>__optional__</em><br> |
| 297 | 283 | <strong>conflict</strong> (__Set to 1 to allow creation of shifts with conflicts__) <em>__optional__</em><br> |
| 298 | -<?php foreach( $cfields as $cfield ) : ?> | |
| 299 | -<strong><?php echo $cfield->getName(); ?></strong> (<?php echo $cfield->getLabel(); ?>)<br> | |
| 300 | -<?php endforeach; ?> | |
| 301 | 284 | </p> |
| 302 | 285 | |
| 303 | 286 | <p> |
| 304 | 287 | <strong>__Examples__</strong> |