OSDN Git Service
BugTrack/2213 Use relative path for internal link - get_base_uri()
Add URI type enum.
* PKWK_URI_RELATIVE : relative path (ex: ./, index.php )
* PKWK_URI_ROOT : Root relative path (ex: /wiki/)
* PKWK_URI_ABSOLUTE : Absolute URI (ex: http://example.com/wiki/)
We will use get_base_uri() to make internal link.
get_base_uri(): returns simple URL that indicates this script(PukiWiki)
For example for 'http://example.com/wiki/' site,
* `get_base_uri()` returns './'
* `get_base_uri(PKWK_URI_ROOT)` returns '/wiki/'
* `get_base_uri(PKWK_URI_ABSOLUTE)` returns 'http://example.com/wiki/'
get_page_uri($page) returns simple URL that indicates specific page.
For example,
* `get_page_uri('News')` returns './?News'
* `get_page_uri('News', PKWK_URI_ROOT)` returns '/wiki/?News'
* `get_page_uri('News', PKWK_URI_ABSOLUTE)` returns
'https://example.com/wiki/?News'