-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure DOKU_INC is always right using an auto_prepend_file
This is basically the same fix as bitnami/containers#12535 Plugins or template may have their own entry points. Eg. the sprintdoc template's svg.php Those entrypoints usually start with something like: ``` if(!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/../../../'); require_once(DOKU_INC . 'inc/init.php'); ``` Since plugins are installed in the volume, __DIR__ will point to the wrong location. By predefining DOKU_INC before any other code runs, this can be avoided.
- Loading branch information
1 parent
9a12b5c
commit 33a8947
Showing
3 changed files
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
/** | ||
* This file is automatically loaded by PHP before any other code. This ensures that DOKU_INC is | ||
* is always pointing to the correct location within the container, even when the entry point is | ||
* a plugin. | ||
*/ | ||
if (!defined('DOKU_INC')) define('DOKU_INC', __DIR__ . '/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters