Merge branch '3.1-beta' of https://eldy@github.com/Dolibarr/dolibarr.git into 3.1-beta
This commit is contained in:
commit
1438c0d0a8
@ -48,22 +48,45 @@ $modules = array();
|
|||||||
$modules_names = array();
|
$modules_names = array();
|
||||||
$modules_files = array();
|
$modules_files = array();
|
||||||
|
|
||||||
// Load list of modules
|
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||||
foreach($conf->file->dol_document_root as $searchdir)
|
|
||||||
{
|
{
|
||||||
$dirtoscan = $searchdir . "/includes/modules/";
|
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||||
$handle=opendir($dirtoscan);
|
|
||||||
|
if ($type == 'alt')
|
||||||
|
{
|
||||||
|
$handle=@opendir($dirroot);
|
||||||
|
if (is_resource($handle))
|
||||||
|
{
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||||
|
{
|
||||||
|
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||||
|
{
|
||||||
|
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load list of modules
|
||||||
|
foreach($modulesdir as $dir)
|
||||||
|
{
|
||||||
|
$handle=opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
{
|
{
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (is_readable($dirtoscan.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
|
if (is_readable($dir.$file) && substr($file, 0, 3) == 'mod' && substr($file, dol_strlen($file) - 10) == '.class.php')
|
||||||
{
|
{
|
||||||
$modName = substr($file, 0, dol_strlen($file) - 10);
|
$modName = substr($file, 0, dol_strlen($file) - 10);
|
||||||
|
|
||||||
if ($modName)
|
if ($modName)
|
||||||
{
|
{
|
||||||
include_once($dirtoscan.$file);
|
include_once($dir.$file);
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
|
|
||||||
$modules[$objMod->numero]=$objMod;
|
$modules[$objMod->numero]=$objMod;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -72,11 +72,32 @@ class Export
|
|||||||
$var=true;
|
$var=true;
|
||||||
$i=0;
|
$i=0;
|
||||||
|
|
||||||
//$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||||
foreach($conf->file->dol_document_root as $dirroot)
|
|
||||||
{
|
{
|
||||||
$dir = $dirroot.'/includes/modules';
|
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||||
|
|
||||||
|
if ($type == 'alt')
|
||||||
|
{
|
||||||
|
$handle=@opendir($dirroot);
|
||||||
|
if (is_resource($handle))
|
||||||
|
{
|
||||||
|
while (($file = readdir($handle))!==false)
|
||||||
|
{
|
||||||
|
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||||
|
{
|
||||||
|
if (is_dir($dirroot . '/' . $file . '/includes/modules/'))
|
||||||
|
{
|
||||||
|
$modulesdir[] = $dirroot . '/' . $file . '/includes/modules/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($modulesdir as $dir)
|
||||||
|
{
|
||||||
// Search available exports
|
// Search available exports
|
||||||
$handle=@opendir($dir);
|
$handle=@opendir($dir);
|
||||||
if (is_resource($handle))
|
if (is_resource($handle))
|
||||||
@ -84,7 +105,7 @@ class Export
|
|||||||
// Search module files
|
// Search module files
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (preg_match("/^(mod.*)\.class\.php$/i",$file,$reg))
|
if (is_readable($dir.$file) && preg_match("/^(mod.*)\.class\.php$/i",$file,$reg))
|
||||||
{
|
{
|
||||||
$modulename=$reg[1];
|
$modulename=$reg[1];
|
||||||
|
|
||||||
@ -96,7 +117,7 @@ class Export
|
|||||||
if ($enabled)
|
if ($enabled)
|
||||||
{
|
{
|
||||||
// Chargement de la classe
|
// Chargement de la classe
|
||||||
$file = $dir."/".$modulename.".class.php";
|
$file = $dir.$modulename.".class.php";
|
||||||
$classname = $modulename;
|
$classname = $modulename;
|
||||||
require_once($file);
|
require_once($file);
|
||||||
$module = new $classname($this->db);
|
$module = new $classname($this->db);
|
||||||
|
|||||||
@ -96,7 +96,7 @@ DirectoryRecommendation=It is recommanded to use a directory outside of your dir
|
|||||||
LoginAlreadyExists=Already exists
|
LoginAlreadyExists=Already exists
|
||||||
DolibarrAdminLogin=Dolibarr admin login
|
DolibarrAdminLogin=Dolibarr admin login
|
||||||
AdminLoginAlreadyExists=Dolibarr administrator account '<b>%s</b>' already exists. Go back, if you want to create another one.
|
AdminLoginAlreadyExists=Dolibarr administrator account '<b>%s</b>' already exists. Go back, if you want to create another one.
|
||||||
WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should remove the <b>install<b> directory or add a file called <b>install.lock</b> into Dolibarr root directory, in order to avoid malicious use of it.
|
WarningRemoveInstallDir=Warning, for security reasons, once the install or upgrade is complete, you should add a file called <b>install.lock</b> into Dolibarr document directory, in order to avoid malicious use of install process.
|
||||||
ThisPHPDoesNotSupportTypeBase=This PHP system does not support any interface to access database type %s
|
ThisPHPDoesNotSupportTypeBase=This PHP system does not support any interface to access database type %s
|
||||||
FunctionNotAvailableInThisPHP=Not available on this PHP
|
FunctionNotAvailableInThisPHP=Not available on this PHP
|
||||||
MigrateScript=Migration script
|
MigrateScript=Migration script
|
||||||
|
|||||||
@ -97,7 +97,7 @@ LoginAlreadyExists=Existe déjà
|
|||||||
DolibarrAdminLogin=Login de l'utilisateur administrateur de Dolibarr
|
DolibarrAdminLogin=Login de l'utilisateur administrateur de Dolibarr
|
||||||
FailedToCreateAdminLogin=Echec de la création du compte administrateur Dolibarr.
|
FailedToCreateAdminLogin=Echec de la création du compte administrateur Dolibarr.
|
||||||
AdminLoginAlreadyExists=Compte administrateur Dolibarr '<b>%s</b>' déjà existant. Revenez en arrière si vous voulez en créer un autre.
|
AdminLoginAlreadyExists=Compte administrateur Dolibarr '<b>%s</b>' déjà existant. Revenez en arrière si vous voulez en créer un autre.
|
||||||
WarningRemoveInstallDir=Attention, pour des raisons de sécurité, une fois l'installation terminée, il est conseillé de supprimer manuellement le répertoire <b>install</b>, ou de placer dans le répertoire racine de Dolibarr un fichier nommé <b>install.lock</b> en lecture seule.
|
WarningRemoveInstallDir=Attention, pour des raisons de sécurité, une fois l'installation terminée, il est conseillé de placer dans le répertoire document de Dolibarr un fichier nommé <b>install.lock</b> en lecture seule.
|
||||||
ThisPHPDoesNotSupportTypeBase=Le système PHP ne supporte pas les interfaces d'accès pour les bases %s
|
ThisPHPDoesNotSupportTypeBase=Le système PHP ne supporte pas les interfaces d'accès pour les bases %s
|
||||||
FunctionNotAvailableInThisPHP=Non disponible sur ce PHP
|
FunctionNotAvailableInThisPHP=Non disponible sur ce PHP
|
||||||
MigrateScript=Script de migration
|
MigrateScript=Script de migration
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user