MantisBT: master 44d3fecc

Author Committer Branch Timestamp Parent
raspopov community master 2024-12-06 11:51 master 5a104a10
Affected Issues  0035082: Allow plugin_file_path() to return the files directory and use the current plugin by default
Changeset

Improve plugin_file_path() function

  • Automatically detect the current plugin when $p_base_name = ''
  • Return the path to the plugin's "files" directory when $p_filename = ''

This will allow plugins to dynamically provide files from their 'files'
directory. Currently, the directory is hard-coded but not easily
accessible.

Fixes 0035082, PR https://github.com/mantisbt/mantisbt/pull/2054

Signed-off-by: Damien Regad dregad@mantisbt.org

mod - core/plugin_api.php Diff File
mod - docbook/Developers_Guide/en-US/Plugins_Building.xml Diff File