[web-wiki] master: Allow for auth file to be relocated to a different directory
| From: | Derick Rethans | Date: | Thu, 03 Apr 2025 15:01:33 +0000 |
| Subject: | [web-wiki] master: Allow for auth file to be relocated to a different directory | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-32825@lists.php.net to get a copy of this message | ||
Author: Derick Rethans (derickr)
Date: 2025-04-03T15:26:56+01:00
Commit: https://github.com/php/web-wiki/commit/ae3e9504f8898b9919ebe4c9dcf166edf4ecd86b
Raw diff: https://github.com/php/web-wiki/commit/ae3e9504f8898b9919ebe4c9dcf166edf4ecd86b.diff
Allow for auth file to be relocated to a different directory
Changed paths:
A dokuwiki/inc/preload.php
Diff:
diff --git a/dokuwiki/inc/preload.php b/dokuwiki/inc/preload.php
new file mode 100644
index 00000000..78021f8f
--- /dev/null
+++ b/dokuwiki/inc/preload.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * This is an example for a farm setup. Simply copy this file to preload.php and
+ * uncomment what you need. See http://www.dokuwiki.org/farms for more information.
+ * You can also use preload.php for other things than farming, e.g. for moving
+ * local configuration files out of the main ./conf directory.
+ */
+
+// set this to your farm directory
+//if(!defined('DOKU_FARMDIR')) define('DOKU_FARMDIR',
'/var/www/farm');
+
+// include this after DOKU_FARMDIR if you want to use farms
+//include(fullpath(dirname(__FILE__)).'/farm.php');
+
+if (getenv("WIKI_AUTH_FILE") !== false) {
+ $config_cascade['plainauth.users'] = array(
+ 'default' => getenv('WIKI_AUTH_FILE'),
+ );
+}