Skip to content
Snippets Groups Projects
Commit 8a02b314 authored by Joël Pittet's avatar Joël Pittet Committed by Gabriel Carleton-Barnes
Browse files

Issue #3016531 by joelpittet, Chris Matthews: Use getBundle() from public...

Issue #3016531 by joelpittet, Chris Matthews: Use getBundle() from public method on EntityDrupalWrapper
parent 13a45f9a
No related branches found
No related tags found
No related merge requests found
......@@ -171,7 +171,7 @@ class Registration extends Entity {
$wrapper = entity_metadata_wrapper('registration', $this);
$state = $wrapper->state->value();
if (!$state) {
$default_state = registration_get_default_state($wrapper->type->value());
$default_state = registration_get_default_state($wrapper->getBundle());
if ($default_state) {
$this->state = $default_state->identifier();
}
......
......@@ -1246,7 +1246,7 @@ function registration_cron() {
// Determine whether hold expire minimum time time has elapsed.
// Setting for how long the hold lasts is stored on the registration type entity.
$registration_type = registration_type_load($registration_wrapper->type->value());
$registration_type = registration_type_load($registration_wrapper->getBundle());
// Change registration state if hold has expired.
// Expiration time is in hours - hence the multiplication.
if ($registration_type->held_expire !== '0' && (time() - ($registration_type->held_expire * 60 * 60)) > $registration->updated) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment