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

Refactor CRM_Utils_File sourceSQLFile

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.16
    • Fix Version/s: 4.7.20
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Minor (add functionality in backwards-compatible manner)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      There is a variable in sourceSQLFile called $isQueryString which should be removed.

      This should essentially be split into two functions, with sourceSQLFile just loading the SQL and passing it to another function (maybe sourceQuery) which does the running of it. Then functions that use sourceSQLFile with $isQueryString=TRUE (such as function source) could call sourceQuery directly.

       

      This would make this code much less brittle!

        Attachments

          Activity

            People

            • Assignee:
              johnff John Kirk
              Reporter:
              johnff John Kirk
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: