[Fusionforge-commits] r10993 - in trunk/src: common/include utils

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Oct 14 18:56:54 CEST 2010


Author: lolando
Date: 2010-10-14 18:56:54 +0200 (Thu, 14 Oct 2010)
New Revision: 10993

Modified:
   trunk/src/common/include/gettext.php
   trunk/src/common/include/pre.php
   trunk/src/utils/forge_get_config
Log:
Trying to reduce the database accesses in forge_get_config script so it can be used for the creation of the database

Modified: trunk/src/common/include/gettext.php
===================================================================
--- trunk/src/common/include/gettext.php	2010-10-14 16:44:40 UTC (rev 10992)
+++ trunk/src/common/include/gettext.php	2010-10-14 16:56:54 UTC (rev 10993)
@@ -43,6 +43,14 @@
 		else just use default language as configured for the installation
 	*/
 
+	if (!isset($_SERVER['SERVER_SOFTWARE'])) {
+		// In command-line scripts
+		if (forge_get_config('default_language')) {
+			return forge_get_config('default_language') ;
+		}
+		return "English";
+	}
+
 	// Logged in -> use preferences
 	if (session_loggedin()) {
 		$user = session_get_user () ;

Modified: trunk/src/common/include/pre.php
===================================================================
--- trunk/src/common/include/pre.php	2010-10-14 16:44:40 UTC (rev 10992)
+++ trunk/src/common/include/pre.php	2010-10-14 16:56:54 UTC (rev 10993)
@@ -180,7 +180,10 @@
 // SCM-specific plugins subsystem
 require_once $gfcommon.'include/SCMPlugin.class.php' ;
 
-setup_plugin_manager () ;
+if (!isset ($fusionforge_no_plugins)
+    || $fusionforge_no_plugins) {
+	setup_plugin_manager () ;
+}
 
 // Jabber subsystem
 if (forge_get_config('use_jabber')) {

Modified: trunk/src/utils/forge_get_config
===================================================================
--- trunk/src/utils/forge_get_config	2010-10-14 16:44:40 UTC (rev 10992)
+++ trunk/src/utils/forge_get_config	2010-10-14 16:56:54 UTC (rev 10993)
@@ -24,6 +24,7 @@
  */
         
 require (dirname(__FILE__).'/../common/include/env.inc.php');
+$fusionforge_no_plugins = true ;
 require_once $gfcommon.'include/pre.php';
 
 if (count ($argv) == 3) {




More information about the Fusionforge-commits mailing list