[Fusionforge-commits] FusionForge branch master updated. a6121f9aa67dc7ab3d3999e4ff5ca199fbfafd32

Franck VILLAUME nerville at fusionforge.org
Fri Dec 6 17:39:03 CET 2013


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  a6121f9aa67dc7ab3d3999e4ff5ca199fbfafd32 (commit)
      from  1de8f530030a13727e72956c9215c07e4b8285ef (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 -----------------------------------------------------------------
commit a6121f9aa67dc7ab3d3999e4ff5ca199fbfafd32
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Dec 6 17:38:42 2013 +0100

    ckeditor: add support for specific install path

diff --git a/src/plugins/ckeditor/common/ckeditorPlugin.class.php b/src/plugins/ckeditor/common/ckeditorPlugin.class.php
index 67fbc07..1920214 100644
--- a/src/plugins/ckeditor/common/ckeditorPlugin.class.php
+++ b/src/plugins/ckeditor/common/ckeditorPlugin.class.php
@@ -4,6 +4,7 @@
  *
  * Copyright 2011 (c) Alcatel-Lucent
  * Copyright (C) 2012 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2013, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge-plugin-ckeditor
  *
@@ -40,6 +41,7 @@ class ckeditorPlugin extends Plugin {
 		$this->hooks[] = "userisactivecheckbox";
 		$this->hooks[] = "userisactivecheckboxpost";
 		$this->hooks[] = "text_editor";
+		$this->ckeditor_path = forge_get_config('ckeditor_path', 'ckeditor');
 
 		// Toolbar
 		$this->toolBar['complete'] = array(
@@ -93,9 +95,13 @@ class ckeditorPlugin extends Plugin {
 
 	private function displayCKeditorArea(&$params) {
 		$name = isset($params['name'])? $params['name'] : 'body';
-		if (file_exists ("/usr/share/ckeditor/ckeditor.php")) {
+		if (file_exists("/usr/share/ckeditor/ckeditor.php")) {
 			require_once '/usr/share/ckeditor/ckeditor.php';
-			$editor = new CKeditor($name) ;
+			$editor = new CKeditor($name);
+			$editor->basePath = util_make_uri('/ckeditor/');
+		} else if (is_file($this->ckeditor_path.'/ckeditor.php') {
+			require_once $this->ckeditor_path.'/ckeditor.php';
+			$editor = new CKeditor($name);
 			$editor->basePath = util_make_uri('/ckeditor/');
 		} else {
 			include_once $GLOBALS['gfplugins'].'ckeditor/www/ckeditor.php';
diff --git a/src/plugins/ckeditor/etc/ckeditor.ini b/src/plugins/ckeditor/etc/ckeditor.ini
index 760357a..fe8171e 100644
--- a/src/plugins/ckeditor/etc/ckeditor.ini
+++ b/src/plugins/ckeditor/etc/ckeditor.ini
@@ -6,3 +6,5 @@
 ; Any other strings means it's under work or broken and plugin
 ; is available in installation_environment = development only.
 plugin_status = 'need validation'
+
+ckeditor_path = /set/path/to/ckeditor/installation

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

Summary of changes:
 src/plugins/ckeditor/common/ckeditorPlugin.class.php |   10 ++++++++--
 src/plugins/ckeditor/etc/ckeditor.ini                |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list