[omd-commits] OMD Git: omd: DokuWiki: use local plugins dir

git version control git at mathias-kettner.de
Tue Oct 13 11:12:40 CEST 2015


Module:   omd
Branch:   master
Commit:   8c8de0e3ab4288cb429a21296c2ef9bcf62b8d52
URL:      http://omdistro.org/projects/omd/repository/revisions/8c8de0e3ab4288cb429a21296c2ef9bcf62b8d52

Author:   Matthias Gallinger <mg at consol.de>
Date:     Mon Oct 12 17:46:22 2015 +0200
Commiter: Sven Nierlein <Sven.Nierlein at consol.de>
Date:     Mon Oct 12 17:46:22 2015 +0200

DokuWiki: use local plugins dir

---

 packages/dokuwiki/Makefile    |    6 ++++++
 packages/dokuwiki/preload.php |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/packages/dokuwiki/Makefile b/packages/dokuwiki/Makefile
index 394c91e..8b8157f 100644
--- a/packages/dokuwiki/Makefile
+++ b/packages/dokuwiki/Makefile
@@ -46,6 +46,7 @@ install:
 
 skel:
 	mkdir -p $(SKEL)/etc/dokuwiki
+	mkdir -p $(SKEL)/var/dokuwiki/lib/plugins
 	cp $(DIR)/conf/*.conf				$(SKEL)/etc/dokuwiki/.
 	cp $(DIR)/conf/*.php$				$(SKEL)/etc/dokuwiki/.
 	cp $(DIR)/conf/acl.auth.php.dist	$(SKEL)/etc/dokuwiki/acl.auth.php
@@ -56,6 +57,11 @@ skel:
 	    ( cd $(SKEL) ; patch -p1 ) < $$p || exit 1; \
 	done
 
+	cd $(SKEL)/var/dokuwiki/lib/plugins/ ; \
+	for i in `ls -1 $(DESTDIR)$(OMD_ROOT)/share/dokuwiki/htdocs/lib/plugins/` ; do \
+	    ln -s ../../../../share/dokuwiki/htdocs/lib/plugins/$$i . ; \
+	done
+
 clean:
 	# Remove files created by build/install
 	rm -rf $(DIR)
diff --git a/packages/dokuwiki/preload.php b/packages/dokuwiki/preload.php
index 36b62f9..d9c5d0a 100644
--- a/packages/dokuwiki/preload.php
+++ b/packages/dokuwiki/preload.php
@@ -4,12 +4,14 @@ if(substr($_SERVER["SCRIPT_FILENAME"], 0, 4) == '/omd') {
     $site_parts = array_slice(explode('/' ,dirname($_SERVER["SCRIPT_FILENAME"])), 0, 4);
     $site = $site_parts[count($site_parts)-1];
     define('DOKU_CONF', '/omd/sites/'.$site.'/etc/dokuwiki/');
+    define('DOKU_PLUGIN', '/omd/sites/'.$site.'/var/dokuwiki/lib/plugins/');
     unset($site_parts);
     unset($site);
 } else {
     $site=getenv('OMD_SITE');
     define('DOKU_CONF', '/omd/sites/'.$site.'/etc/dokuwiki/');
-    define('DOKU_INC', '/omd/sites/'.$site.'/var/dokuwiki/data/');
+    define('DOKU_INC', '/omd/sites/'.$site.'/var/dokuwiki/');
+    define('DOKU_PLUGIN', '/omd/sites/'.$site.'/var/dokuwiki/lib/plugins/');
     unset($site);
 }
 



More information about the omd-commits mailing list