Uploaded image for project: 'Islandora'
  1. Islandora
  2. ISLANDORA-1451

Inconsistent ways of getting object from ingest form after submitting file upload

    Description

    Came across a minor inconsistency.

    In most solution packs that offer a 'file upload' step, the submit handler for the file upload form includes the line [1]:

        $object = $form_state['islandora']['objects'][0];

    but disk image and web archive solution packs (and none other that I've found) use [2]:

        $objects = &islandora_ingest_form_get_objects($form_state);
        foreach ($objects as $object) { ... }

    We should probably standardize to one or the other, unless there's a reason that disk image and web archive may be creating multiple objects simultaneously.

    [1] https://github.com/Islandora/islandora_solution_pack_pdf/blob/d8bdb83f555c95be8cbfdeb43be4b4c57008b76d/includes/pdf_upload.form.inc#L74
    [2] https://github.com/Islandora/islandora_solution_pack_disk_image/blob/53f61759939860b899b4d8ebdaf98ca4288329ba/includes/disk_image_upload.form.inc#L84 and https://github.com/Islandora/islandora_solution_pack_web_archive/blob/03cb35d6b7b3178d19ca2c8771760e02244774e2/includes/web_archive_upload.form.inc#L111

      Attachments

        Activity

          People

          • Assignee:
            nruest Nick Ruest
            Reporter:
            rosiel Rosie Le Faive
            Reviewer:
            Rosie Le Faive
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: