MantisBT: master b36ac41d

Author Committer Branch Timestamp Parent
dregad dregad master 2014-06-02 02:38 master 732126b6
Affected Issues  0016995: Absolute g_manual_url becomes relative on proj_doc_page.php
Changeset

Fix absolute URLs issue with 'User Documentation' link

This resolves the issue with absolute URLs specified in $g_manual_url
becoming relative on project documentation pages.

Following discussions in the pull request [1], the solution implements
additional logic in the print_doc_menu() function that checks whether
the provided URL is absolute or relative (based on presence of an URL
scheme):

  • if relative, makes sure the local path exists
  • if absolute, uses the URL as-is without check

Since this is currently the only use case for absolute URLs with
helper_mantis_url() and the documentation feature is deprecated, it made
more sense to have the logic in print_doc_menu() rather than creating a
new API function.

Fixes 0016995

[1] https://github.com/mantisbt/mantisbt/pull/144

mod - config_defaults_inc.php Diff File
mod - core/html_api.php Diff File