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

Wrong hook names in islandora.api.php

    Details

    • Type: Documentation
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.x-1.8
    • Fix Version/s: 7.x-1.10
    • Labels:
      None

      Description

      While looking at islandora.api.php to find out what hooks I can use to run after a specific datastream has been ingested/modified/purged, I found the following hooks:

      I tried using them, but couldn't get them to fire. Reading some of the other hooks in the islandora.api.php file, I found some very similar hooks that worked, but used a different (more specific) hook naming pattern:

      These functions include dsid in the function name. They also worked the first time I tried invoking them. I figured since they were so close to the other ones, I'd try adding the datastream name to the function after the CModel to create:

      • hook_cmodel_pid_dsid_slandora_datastream_modified
      • hook_cmodel_pid_dsid_islandora_datastream_purged

      and they worked. I believe this implies that the function names in the islandora.api.php file are incorrect. I'm not sure if Drupal *.api.php files ever actually get evaluated or if they are merely code documentation, so I set the status of this ticket to "Documentation".

      If I'm not mistaken and this really is just a simple typo, I can go ahead and make a PR to fix this.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bryjbrown Bryan Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: