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

metadataPrefix case causes inconsistencies

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.x-1.8, 7.x-1.9, 7.x-1.10
    • Fix Version/s: 7.x-1.11
    • Component/s: OAI Provider
    • Labels:
      None

      Description

      Playing with the OAI provider I noticed that I could use both "mods" and "MODS" for the metadataPrefix, but only when using "mods" would I get the identifier injected into the result.

      This seems to be because the query of MySQL for metadata prefixes is case-insensitive (https://github.com/Islandora/islandora_oai/blob/7.x/includes/request.inc#L605) but the check for variables are not (https://github.com/Islandora/islandora_oai/blob/7.x/includes/handler.inc#L182).

      Either we should push everything to upper or lower case, or make the initial query case sensitive like

      $result = db_query("SELECT * FROM {islandora_oai_metadata_formats} WHERE BINARY metadata_prefix=:metadata_prefix ", array(':metadata_prefix' => $val));

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              whikloj Jared Whiklo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: