From 2cdc264bdf081af0f2f1805123965d81447fa04e Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 17 Jul 2013 13:45:52 -0300 Subject: [PATCH 1/2] Run all 7.x branches through Travis. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4498a8fa..17a22707 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ php: - 5.4 branches: only: - - 7.x + - /^7.x/ env: - FEDORA_VERSION="3.5" - FEDORA_VERSION="3.6.2" From 4bcb99ddcbcc2e8a01db43bcf190142a1ba06953 Mon Sep 17 00:00:00 2001 From: Adam Vessey Date: Wed, 17 Jul 2013 13:46:58 -0300 Subject: [PATCH 2/2] Use references when ingesting during steps. Makes the objects available to later submission handlers... Handling a weird case, yes... Need to trigger something only after ingest, but only when ingesting through the form. --- includes/ingest.form.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/ingest.form.inc b/includes/ingest.form.inc index 00783934..6faa642c 100644 --- a/includes/ingest.form.inc +++ b/includes/ingest.form.inc @@ -703,7 +703,7 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { islandora_ingest_form_execute_consecutive_callback_steps($form, $form_state, $step); } // Ingest the objects. - foreach ($form_state['islandora']['objects'] as $object) { + foreach ($form_state['islandora']['objects'] as &$object) { try { islandora_add_object($object); $form_state['redirect'] = "islandora/object/{$object->id}"; @@ -715,6 +715,9 @@ function islandora_ingest_form_submit(array $form, array &$form_state) { drupal_set_message(t('A problem occured while ingesting "@label" (ID: @pid), please notifiy the administrator.', array('@label' => $object->label, '@pid' => $object->id)), 'error'); } } + // XXX: Foreaching with references can be weird... The reference exists in + // the scope outside. + unset($object); } /**