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

"Custom PHP Path Directory" doesn't affect Smarty plugin directory path

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.3
    • Fix Version/s: 3.2
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      Currently the only way to add or modify Smarty plugins is to add or modify files in one of the existing Smarty plugin directories (CRM/Core/Smarty/plugins or packages/Smarty/plugins). It would be nice if developers could achieve the same result without modifying or adding files under the CiviCRM source tree. This seems to be what "Custom PHP Path Directory" (under civicrm/admin/setting/path) is aimed at, but this setting does not affect where Smarty looks for plugins.

      The attached patch adds this functionality by changing one line in CRM/Core/Smarty.php. This solution was recommended by lobo in an IRC exchange today.

      I've put the custom directory path ahead of both the Smarty core plugin path and the CiviCRM plugin path – not sure if that's best, but it seems right to allow the user to override Smarty and Civi plugins in this way.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              allenshaw Allen Shaw
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: