| @@ 259-264 (lines=6) @@ | ||
| 256 | $evt_obj->save(); |
|
| 257 | ||
| 258 | //before going any further make sure our dates are setup correctly so that the end date is always equal or greater than the start date. |
|
| 259 | if( $DTM->get_raw('DTT_EVT_start') > $DTM->get_raw('DTT_EVT_end') ) { |
|
| 260 | $DTM->set('DTT_EVT_end', $DTM->get('DTT_EVT_start') ); |
|
| 261 | EE_Registry::instance()->load_helper('DTT_Helper'); |
|
| 262 | $DTM = EEH_DTT_Helper::date_time_add($DTM, 'DTT_EVT_end', 'days'); |
|
| 263 | $DTM->save(); |
|
| 264 | } |
|
| 265 | ||
| 266 | // now we have to make sure we add the new DTT_ID to the $saved_dtt_ids array |
|
| 267 | // because it is possible there was a new one created for the autosave. |
|
| @@ 462-466 (lines=5) @@ | ||
| 459 | //$TKT->save(); |
|
| 460 | ||
| 461 | //before going any further make sure our dates are setup correctly so that the end date is always equal or greater than the start date. |
|
| 462 | if( $TKT->get_raw('TKT_start_date') > $TKT->get_raw('TKT_end_date') ) { |
|
| 463 | $TKT->set('TKT_end_date', $TKT->get('TKT_start_date') ); |
|
| 464 | EE_Registry::instance()->load_helper('DTT_Helper'); |
|
| 465 | $TKT = EEH_DTT_Helper::date_time_add($TKT, 'TKT_end_date', 'days'); |
|
| 466 | } |
|
| 467 | ||
| 468 | //let's make sure the base price is handled |
|
| 469 | $TKT = ! $create_new_TKT ? $this->_add_prices_to_ticket( array(), $TKT, $update_prices, $base_price, $base_price_id ) : $TKT; |
|
| @@ 1128-1133 (lines=6) @@ | ||
| 1125 | $TKT->save(); |
|
| 1126 | ||
| 1127 | //before going any further make sure our dates are setup correctly so that the end date is always equal or greater than the start date. |
|
| 1128 | if( $TKT->get_raw('TKT_start_date') > $TKT->get_raw('TKT_end_date') ) { |
|
| 1129 | $TKT->set('TKT_end_date', $TKT->get('TKT_start_date') ); |
|
| 1130 | EE_Registry::instance()->load_helper('DTT_Helper'); |
|
| 1131 | $TKT = EEH_DTT_Helper::date_time_add($TKT, 'TKT_end_date', 'days'); |
|
| 1132 | $TKT->save(); |
|
| 1133 | } |
|
| 1134 | ||
| 1135 | //initially let's add the ticket to the dtt |
|
| 1136 | $saved_dtt->_add_relation_to( $TKT, 'Ticket' ); |
|