[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1422-g44bef2e

Marc-Etienne VARGENAU vargenau at libremir.placard.fr.eu.org
Thu Feb 2 12:22:07 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  44bef2e6e70a3067e5df65ec43029f966bd0019b (commit)
       via  c4b653bf22a8fb77fe1e15daab90f83f491fb35a (commit)
      from  363c58b8a975cf7f2813d0e363ab5b4881650524 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=44bef2e6e70a3067e5df65ec43029f966bd0019b

commit 44bef2e6e70a3067e5df65ec43029f966bd0019b
Author: Marc-Etienne Vargenau <marc-etienne.vargenau at nokia.com>
Date:   Thu Feb 2 12:22:03 2017 +0100

    Add ALLOWED_LOAD; use wiki_path

diff --git a/src/plugins/wiki/www/g b/src/plugins/wiki/www/g
index 5e68c52..1ed1edb 100644
--- a/src/plugins/wiki/www/g
+++ b/src/plugins/wiki/www/g
@@ -75,7 +75,7 @@ if (defined('WIKI_SOAP')) {
         $group_id = $help->getID();
     } else {
         // Test system don't have help project, use projecta instead.
-        $group_id = 6;
+        $group_id = group_get_object_by_name('projecta')->getID();
     }
 }
 
@@ -150,6 +150,9 @@ if (! isset($group_id) || ! isset($project)) {
     // Do not use a directory per user but only one (per project)
     define('UPLOAD_USERDIR', false);
 
+    // Allow Load File only from /tmp
+    define('ALLOWED_LOAD', '/tmp');
+
     // Use black list of extensions instead of white list
     define('DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS', true);
 
@@ -270,10 +273,12 @@ if (! isset($group_id) || ! isset($project)) {
         // clear out the globals, just in case...
     }
 
+    $wiki_path = forge_get_config('wiki_path', 'wiki');
+
     // Load the default configuration.
-    require_once(dirname(__FILE__).'/lib/prepend.php');
-    require_once(dirname(__FILE__).'/lib/IniConfig.php');
-    IniConfig(dirname(__FILE__)."/config/config-default.ini");
+    require_once($wiki_path.'/lib/prepend.php');
+    require_once($wiki_path.'/lib/IniConfig.php');
+    IniConfig($wiki_path."/config/config-default.ini");
 
     // Override the default configuration for VARIABLES after index.php:
     // E.g. Use another DB:
@@ -284,7 +289,8 @@ if (! isset($group_id) || ! isset($project)) {
     $DBParams['prefix'] = "plugin_wiki_";
 
     // Start the wiki
-    include dirname(__FILE__).'/lib/main.php';
+    chdir($wiki_path);
+    include $wiki_path.'/lib/main.php';
 }
 
 /**

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=c4b653bf22a8fb77fe1e15daab90f83f491fb35a

commit c4b653bf22a8fb77fe1e15daab90f83f491fb35a
Author: Marc-Etienne Vargenau <marc-etienne.vargenau at nokia.com>
Date:   Thu Feb 2 12:21:19 2017 +0100

    Add wiki_help_project and wiki_path

diff --git a/src/plugins/wiki/etc/wiki.ini b/src/plugins/wiki/etc/wiki.ini
index c72ba2b..683e9f0 100644
--- a/src/plugins/wiki/etc/wiki.ini
+++ b/src/plugins/wiki/etc/wiki.ini
@@ -6,3 +6,5 @@
 ; is available in installation_environment = development only.
 plugin_status = valid
 
+wiki_help_project = "help"
+wiki_path = "/var/www/phpwiki"

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/wiki/etc/wiki.ini |  2 ++
 src/plugins/wiki/www/g        | 16 +++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list