Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19922

CRM_Utils_File::findFiles should sort files alphabetically

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.7.15
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      There are certain situations where it would be nice if we could rely on CRM_Utils_File::findFiles to return the files it has found in alphabetical order.

      For example if we knew the order that _hook_civix_civicrm_managed was going to return files matching *.mgd.php, it would provide a way around the limitation mentioned under limitations in https://civicrm.org/blog/totten/api-and-art-installation (when "you need to create a sequence of related entities").

      managed-entities-1.mgd.php:

      //create an entity
      

      managed-entities-2.mgd.php:

      // api getsingle the entity created in managed-entities-1.mgd.php
      // create entity with details from created entity
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              michaelmcandrew Michael McAndrew
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: