Fix: Code could not works for debian packages
This commit is contained in:
parent
c8ee93737c
commit
6995805b4d
@ -2,7 +2,7 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# \file build/makepack-dolibarr.pl
|
||||
# \brief Dolibarr package builder (tgz, zip, rpm, deb, exe, aps)
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.121 2011/07/28 23:05:13 eldy Exp $
|
||||
# \version $Id: makepack-dolibarr.pl,v 1.122 2011/07/30 10:23:26 eldy Exp $
|
||||
# \author (c)2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
@ -48,7 +48,7 @@ if (-d "/usr/src/RPM") {
|
||||
|
||||
|
||||
use vars qw/ $REVISION $VERSION /;
|
||||
$REVISION='$Revision: 1.121 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$REVISION='$Revision: 1.122 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
|
||||
$VERSION="1.0 (build $REVISION)";
|
||||
|
||||
|
||||
@ -263,6 +263,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.tgz`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/dolibarr-*.zip`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/build/doxygen/doxygen_warnings.log`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
@ -291,11 +292,6 @@ if ($nboftargetok) {
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/doc/images/dolibarr_screenshot12.png`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/documents`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/document`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.mysql`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.old`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf.php.postgres`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/conf/conf*sav*`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/custom2`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/theme/bureau2crea`;
|
||||
@ -306,6 +302,7 @@ if ($nboftargetok) {
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`;
|
||||
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/php_writeexcel/php.bmp`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpexcel`;
|
||||
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/smarty`;
|
||||
#$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/freetype6.dll`;
|
||||
#$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/zlib1.dll`;
|
||||
#$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/phpexcel/PHPExcel/Shared/PDF/fonts/utils/pfm2afm`;
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2010 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/admin/modules.php
|
||||
* \brief Page to activate/disable all modules
|
||||
* \version $Id: modules.php,v 1.156 2011/07/31 22:23:22 eldy Exp $
|
||||
* \version $Id: modules.php,v 1.157 2011/08/01 12:25:15 hregis Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -79,12 +79,35 @@ $modules = array();
|
||||
$orders = array();
|
||||
$categ = array();
|
||||
$dirmod = array();
|
||||
$modulesdir = array();
|
||||
$i = 0; // is a sequencer of modules found
|
||||
$j = 0; // j is module number. Automatically affected if module number not defined.
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$modulesdir[] = $dirroot . "/includes/modules/";
|
||||
|
||||
if ($type == 'alt')
|
||||
{
|
||||
$althandle=@opendir($dirroot);
|
||||
if (is_resource($althandle))
|
||||
{
|
||||
while (($file = readdir($althandle))!==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/';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
dol_syslog("Scan directory ".$dir." for modules");
|
||||
@ -449,5 +472,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.156 $');
|
||||
llxFooter('$Date: 2011/08/01 12:25:15 $ - $Revision: 1.157 $');
|
||||
?>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/admin/perms.php
|
||||
* \ingroup core
|
||||
* \brief Page d'administration/configuration des permissions par defaut
|
||||
* \version $Id: perms.php,v 1.42 2011/07/31 22:23:26 eldy Exp $
|
||||
* \version $Id: perms.php,v 1.43 2011/08/01 12:53:37 hregis Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -76,10 +76,34 @@ $db->begin();
|
||||
|
||||
// Charge les modules soumis a permissions
|
||||
$modules = array();
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
$dir = $dirroot . "/includes/modules/";
|
||||
$modulesdir = array();
|
||||
|
||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||
{
|
||||
$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)
|
||||
{
|
||||
// Load modules attributes in arrays (name, numero, orders) from dir directory
|
||||
//print $dir."\n<br>";
|
||||
$handle=@opendir($dir);
|
||||
@ -194,5 +218,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:26 $ - $Revision: 1.42 $');
|
||||
llxFooter('$Date: 2011/08/01 12:53:37 $ - $Revision: 1.43 $');
|
||||
?>
|
||||
|
||||
@ -12,14 +12,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/proxy.php
|
||||
* \ingroup core
|
||||
* \brief Page setup proxy to use for external web access
|
||||
* \version $Id: proxy.php,v 1.7 2011/07/31 22:23:24 eldy Exp $
|
||||
* \version $Id: proxy.php,v 1.6 2011/07/29 21:04:27 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -205,5 +206,5 @@ dol_htmloutput_mesg($mesg);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:24 $ - $Revision: 1.7 $');
|
||||
llxFooter('$Date: 2011/07/29 21:04:27 $ - $Revision: 1.6 $');
|
||||
?>
|
||||
|
||||
@ -13,14 +13,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/security_other.php
|
||||
* \ingroup core
|
||||
* \brief Security options setup
|
||||
* \version $Id: security_other.php,v 1.41 2011/07/31 22:23:22 eldy Exp $
|
||||
* \version $Id: security_other.php,v 1.40 2011/07/29 21:04:27 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -347,5 +348,5 @@ $formfile->form_attach_new_file(DOL_URL_ROOT.'/admin/security_other.php',$langs-
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.41 $');
|
||||
llxFooter('$Date: 2011/07/29 21:04:27 $ - $Revision: 1.40 $');
|
||||
?>
|
||||
|
||||
@ -14,13 +14,14 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/system/constall.php
|
||||
* \brief Page to show all Dolibarr setup (config file and database constants)
|
||||
* \version $Id: constall.php,v 1.24 2011/07/31 22:23:14 eldy Exp $
|
||||
* \version $Id: constall.php,v 1.23 2011/07/30 10:23:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
|
||||
@ -14,13 +14,14 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/system/index.php
|
||||
* \brief Home page of system information
|
||||
* \version $Id: index.php,v 1.49 2011/07/31 22:23:14 eldy Exp $
|
||||
* \version $Id: index.php,v 1.48 2011/07/27 23:50:52 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@ -126,5 +127,5 @@ print '<br>';
|
||||
print info_admin($langs->trans("SystemInfoDesc")).'<br>';
|
||||
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:14 $ - $Revision: 1.49 $');
|
||||
llxFooter('$Date: 2011/07/27 23:50:52 $ - $Revision: 1.48 $');
|
||||
?>
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
require('../main.inc.php');
|
||||
|
||||
@ -16,14 +16,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/comm/action/index.php
|
||||
* \ingroup agenda
|
||||
* \brief Home page of calendar events
|
||||
* \version $Id: index.php,v 1.184 2011/07/31 22:23:20 eldy Exp $
|
||||
* \version $Id: index.php,v 1.183 2011/07/22 06:51:31 simnandez Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@ -785,7 +786,7 @@ $("#actionagenda_vcal_link").attr("href","/public/agenda/agendaexport.php?format
|
||||
';
|
||||
*/
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:20 $ - $Revision: 1.184 $');
|
||||
llxFooter('$Date: 2011/07/22 06:51:31 $ - $Revision: 1.183 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -15,14 +15,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/bank/bankid_fr.php
|
||||
* \ingroup banque
|
||||
* \brief Fiche creation compte bancaire
|
||||
* \version $Id: bankid_fr.php,v 1.28 2011/07/31 22:23:20 eldy Exp $
|
||||
* \version $Id: bankid_fr.php,v 1.27 2011/07/29 20:47:35 eldy Exp $
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -385,5 +386,5 @@ if ($_GET["id"] && $_GET["action"] == 'edit' && $user->rights->banque->configure
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:20 $ - $Revision: 1.28 $');
|
||||
llxFooter('$Date: 2011/07/29 20:47:35 $ - $Revision: 1.27 $');
|
||||
?>
|
||||
|
||||
@ -15,14 +15,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/bank/fiche.php
|
||||
* \ingroup banque
|
||||
* \brief Page to create/view a bank account
|
||||
* \version $Id: fiche.php,v 1.78 2011/07/31 22:23:16 eldy Exp $
|
||||
* \version $Id: fiche.php,v 1.77 2011/07/29 20:47:35 eldy Exp $
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -607,5 +608,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:16 $ - $Revision: 1.78 $');
|
||||
llxFooter('$Date: 2011/07/29 20:47:35 $ - $Revision: 1.77 $');
|
||||
?>
|
||||
|
||||
@ -14,14 +14,15 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/bank/rappro.php
|
||||
* \ingroup banque
|
||||
* \brief Page to reconciliate bank transactions
|
||||
* \version $Id: rappro.php,v 1.68 2011/07/31 22:23:16 eldy Exp $
|
||||
* \version $Id: rappro.php,v 1.67 2011/07/26 23:16:47 eldy Exp $
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
@ -402,5 +403,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:16 $ - $Revision: 1.68 $');
|
||||
llxFooter('$Date: 2011/07/26 23:16:47 $ - $Revision: 1.67 $');
|
||||
?>
|
||||
|
||||
@ -15,13 +15,14 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/prelevement/create.php
|
||||
* \brief Prelevement
|
||||
* \version $Id: create.php,v 1.35 2011/07/31 22:23:29 eldy Exp $
|
||||
* \version $Id: create.php,v 1.34 2011/07/29 21:15:39 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../bank/pre.inc.php");
|
||||
@ -275,5 +276,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:29 $ - $Revision: 1.35 $');
|
||||
llxFooter('$Date: 2011/07/29 21:15:39 $ - $Revision: 1.34 $');
|
||||
?>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
* \file htdocs/filefunc.inc.php
|
||||
* \ingroup core
|
||||
* \brief File that include conf.php file and functions.lib.php
|
||||
* \version $Id: filefunc.inc.php,v 1.19 2011/07/21 22:11:30 eldy Exp $
|
||||
* \version $Id: filefunc.inc.php,v 1.20 2011/07/30 10:23:24 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.1.0-beta'); // Also defined in htdocs/install/inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
@ -61,8 +61,17 @@ error_reporting(E_ALL ^ E_NOTICE);
|
||||
//error_reporting(E_ALL);
|
||||
|
||||
|
||||
$conffiletoshowshort = "conf.php";
|
||||
# Define localization of conf file
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
# For debian like systems
|
||||
#$conffile = "/etc/dolibarr/conf.php";
|
||||
#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
|
||||
|
||||
// Include configuration
|
||||
$result=@include_once("conf/conf.php");
|
||||
$result=@include_once($conffile);
|
||||
if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done and we are in a web session
|
||||
{
|
||||
header("Location: install/index.php");
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* \file htdocs/install/check.php
|
||||
* \ingroup install
|
||||
* \brief Test if file conf can be modified and if does not exists, test if install process can create it
|
||||
* \version $Id: check.php,v 1.86 2011/07/30 14:56:43 eldy Exp $
|
||||
* \version $Id: check.php,v 1.85 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
include_once("./inc.php");
|
||||
|
||||
@ -39,9 +39,7 @@ $langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin='';
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("Dolibarr install/upgrade process started");
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
* \file htdocs/install/etape0.php
|
||||
* \ingroup install
|
||||
* \brief Show and ask charset for database
|
||||
* \version $Id: etape0.php,v 1.41 2011/07/30 14:56:43 eldy Exp $
|
||||
* \version $Id: etape0.php,v 1.40 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
||||
@ -49,9 +49,7 @@ $passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
|
||||
$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("--- etape0: Entering etape0.php page");
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/install/etape1.php
|
||||
* \ingroup install
|
||||
* \brief Build conf file on disk
|
||||
* \version $Id: etape1.php,v 1.135 2011/07/30 14:56:42 eldy Exp $
|
||||
* \version $Id: etape1.php,v 1.134 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
|
||||
@ -39,9 +39,7 @@ $langs->load("admin");
|
||||
$langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("--- etape1: Entering etape1.php page");
|
||||
|
||||
@ -528,7 +526,6 @@ function write_conf_file($conffile)
|
||||
global $dolibarr_main_url_root,$dolibarr_main_document_root,$dolibarr_main_data_root,$dolibarr_main_db_host;
|
||||
global $dolibarr_main_db_port,$dolibarr_main_db_name,$dolibarr_main_db_user,$dolibarr_main_db_pass;
|
||||
global $dolibarr_main_db_type,$dolibarr_main_db_character_set,$dolibarr_main_db_collation,$dolibarr_main_authentication;
|
||||
global $conffile,$conffiletoshow,$conffiletoshowshort;
|
||||
|
||||
$error=0;
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/install/etape2.php
|
||||
* \ingroup install
|
||||
* \brief Create tables, primary keys, foreign keys, indexes and functions into database and then load reference data
|
||||
* \version $Id: etape2.php,v 1.105 2011/07/30 14:56:43 eldy Exp $
|
||||
* \version $Id: etape2.php,v 1.104 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include("./inc.php");
|
||||
@ -54,9 +54,7 @@ if ($dolibarr_main_db_type == "pgsql") $choix=2;
|
||||
if ($dolibarr_main_db_type == "mssql") $choix=3;
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after a Doliwamp install wizard.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("--- etape2: Entering etape2.php page");
|
||||
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
* \file htdocs/install/etape4.php
|
||||
* \ingroup install
|
||||
* \brief Ask login and password of Dolibarr admin user
|
||||
* \version $Id: etape4.php,v 1.37 2011/07/30 14:56:43 eldy Exp $
|
||||
* \version $Id: etape4.php,v 1.36 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -41,9 +41,7 @@ $langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
if (! isset($force_install_dolibarrlogin)) $force_install_dolibarrlogin='';
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("--- etape4: Entering etape4.php page");
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
* \file htdocs/install/etape5.php
|
||||
* \ingroup install
|
||||
* \brief Last page of upgrade or install process
|
||||
* \version $Id: etape5.php,v 1.106 2011/07/31 13:28:45 eldy Exp $
|
||||
* \version $Id: etape5.php,v 1.103 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -63,9 +63,12 @@ if (! isset($force_install_databasepass)) $force_install_databasepass='';
|
||||
if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin='';
|
||||
if (! isset($force_install_databaserootpass)) $force_install_databaserootpass='';
|
||||
if (! isset($force_install_lockinstall)) $force_install_lockinstall='';
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
$usedoliwamp=false;
|
||||
if (file_exists("./install.forced.php"))
|
||||
{
|
||||
$usedoliwamp=true;
|
||||
include_once("./install.forced.php");
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("--- etape5: Entering etape5.php page", LOG_INFO);
|
||||
|
||||
@ -102,7 +105,6 @@ if ($action == "set")
|
||||
*/
|
||||
|
||||
pHeader($langs->trans("SetupEnd"),"etape5");
|
||||
print '<br>';
|
||||
|
||||
// Test if we can run a first install process
|
||||
if (! GETPOST("versionfrom") && ! GETPOST("versionto") && ! is_writable($conffile))
|
||||
@ -206,7 +208,7 @@ if ($action == "set" || preg_match('/upgrade/i',$action))
|
||||
if (! $resql) dol_print_error($db,'Error in setup program');
|
||||
$conf->global->MAIN_VERSION_LAST_INSTALL=$targetversion;
|
||||
|
||||
if ($useforcedwizard)
|
||||
if ($usedoliwamp)
|
||||
{
|
||||
dolibarr_install_syslog('install/etape5.php set MAIN_REMOVE_INSTALL_WARNING const to 1', LOG_DEBUG);
|
||||
$resql=$db->query("DELETE FROM llx_const WHERE ".$db->decrypt('name')."='MAIN_REMOVE_INSTALL_WARNING'");
|
||||
@ -315,6 +317,7 @@ if ($action == "set")
|
||||
if (! empty($force_install_lockinstall))
|
||||
{
|
||||
// Install is finished, we create the lock file
|
||||
$lockfile="../../install.lock";
|
||||
$fp = @fopen($lockfile, "w");
|
||||
if ($fp)
|
||||
{
|
||||
@ -364,6 +367,7 @@ elseif (preg_match('/upgrade/i',$action))
|
||||
if (! empty($force_install_lockinstall))
|
||||
{
|
||||
// Upgrade is finished, we create the lock file
|
||||
$lockfile="../../install.lock";
|
||||
$fp = @fopen($lockfile, "w");
|
||||
if ($fp)
|
||||
{
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* \file htdocs/install/fileconf.php
|
||||
* \ingroup install
|
||||
* \brief Ask all informations required to build Dolibarr htdocs/conf/conf.php file (will be wrote on disk on next page)
|
||||
* \version $Id: fileconf.php,v 1.93 2011/07/30 14:56:43 eldy Exp $
|
||||
* \version $Id: fileconf.php,v 1.92 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
include_once("./inc.php");
|
||||
|
||||
@ -39,8 +39,8 @@ $langs->load("install");
|
||||
$langs->load("errors");
|
||||
|
||||
// You can force preselected values of the config step of Dolibarr by adding a file
|
||||
// install.forced.php into directory htdocs/install (This is the case with some wizard
|
||||
// installer like DoliWamp, DoliMamp or DoliBuntu).
|
||||
// install.forced.php into directory htdocs/install (This is the case with some installer
|
||||
// lile DoliWamp, DoliMamp or DoliBuntu.
|
||||
// We first init "forced values" to nothing.
|
||||
if (! isset($force_install_noedit)) $force_install_noedit='';
|
||||
if (! isset($force_install_type)) $force_install_type='';
|
||||
@ -53,9 +53,7 @@ if (! isset($force_install_databasepass)) $force_install_databasepass='';
|
||||
if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin='';
|
||||
if (! isset($force_install_databaserootpass)) $force_install_databaserootpass='';
|
||||
// Now we load forced value from install.forced.php file.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("Fileconf: Entering fileconf.php page");
|
||||
|
||||
@ -161,10 +159,7 @@ if (! empty($force_install_message))
|
||||
}
|
||||
?>
|
||||
<td class="label" valign="top">
|
||||
<?php
|
||||
if ($force_install_noedit == 2) print '<input type="hidden" value="'.$dolibarr_main_data_root.'" name="main_data_dir">';
|
||||
print '<input type="text" size="60" value="'.$dolibarr_main_data_root.'"'.(($force_install_noedit != 2)?'':' disabled="true"').' name="main_data_dir'.(($force_install_noedit != 2)?'':'_bis').'">';
|
||||
?>
|
||||
<input type="text" size="60" value="<?php print $dolibarr_main_data_root; ?>"<?php print (empty($todoforce_install_main_data_root)?'':' disabled="true"'); ?> name="main_data_dir">
|
||||
</td>
|
||||
<td class="comment"><?php
|
||||
print $langs->trans("WithNoSlashAtTheEnd")."<br>";
|
||||
@ -172,7 +167,7 @@ if (! empty($force_install_message))
|
||||
print $langs->trans("Examples").":<br>";
|
||||
?>
|
||||
<ul>
|
||||
<li>/var/lib/dolibarr/documents</li>
|
||||
<li>/var/dolibarr_documents</li>
|
||||
<li>C:/My Documents/dolibarr/</li>
|
||||
</ul>
|
||||
</td>
|
||||
@ -210,10 +205,7 @@ if (empty($dolibarr_main_url_root))
|
||||
<td valign="top" class="label"><b> <?php echo $langs->trans("URLRoot"); ?></b>
|
||||
</td>
|
||||
<td valign="top" class="label">
|
||||
<?php
|
||||
if ($force_install_noedit == 2) print '<input type="hidden" value="'.$dolibarr_main_url_root.'" name="main_url">';
|
||||
print '<input type="text" size="60" value="'.$dolibarr_main_url_root.'"'.(($force_install_noedit != 2)?'':' disabled="true"').' name="main_url'.(($force_install_noedit != 2)?'':'_bis').'">';
|
||||
?>
|
||||
<input type="text" size="60" name="main_url"<?php print (empty($todoforce_install_main_data_root)?'':' disabled="true"'); ?> value="<?php print $dolibarr_main_url_root; ?>">
|
||||
</td>
|
||||
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
|
||||
<ul>
|
||||
@ -312,9 +304,9 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
if ($force_install_noedit && $force_install_type) print '<input id="db_type" type="hidden" value="'.$force_install_type.'" name="db_type">';
|
||||
print '<select id="db_type" name="db_type'.(empty($force_install_noedit) || empty($force_install_type)?'':'_bis').'"'.($force_install_noedit && $force_install_type?' disabled="true"':'').'>';
|
||||
print $option;
|
||||
print '</select>';
|
||||
print '</select> </td>';
|
||||
|
||||
?></td>
|
||||
?>
|
||||
<td class="comment"><?php echo $langs->trans("DatabaseType"); ?></td>
|
||||
|
||||
</tr>
|
||||
@ -347,7 +339,7 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<tr>
|
||||
<td class="label" valign="top"><b> <?php echo $langs->trans("DatabaseName"); ?> </b></td>
|
||||
|
||||
<td class="label" valign="top"><input type="text" id="db_name" name="db_name"
|
||||
<td class="label" valign="top"><input type="text" name="db_name"
|
||||
value="<?php echo (! empty($dolibarr_main_db_name))?$dolibarr_main_db_name:$force_install_database; ?>"></td>
|
||||
<td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td>
|
||||
</tr>
|
||||
@ -366,7 +358,7 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<tr>
|
||||
<td class="label" valign="top"><b><?php echo $langs->trans("Login"); ?></b>
|
||||
</td>
|
||||
<td class="label" valign="top"><input type="text" id="db_user" name="db_user"
|
||||
<td class="label" valign="top"><input type="text" name="db_user"
|
||||
value="<?php print (! empty($dolibarr_main_db_user))?$dolibarr_main_db_user:$force_install_databaselogin; ?>"></td>
|
||||
<td class="comment"><?php echo $langs->trans("AdminLogin"); ?></td>
|
||||
</tr>
|
||||
@ -374,7 +366,7 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<tr>
|
||||
<td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b>
|
||||
</td>
|
||||
<td class="label" valign="top"><input type="password" id="db_pass" name="db_pass"
|
||||
<td class="label" valign="top"><input type="password" name="db_pass"
|
||||
value="<?php print (! empty($dolibarr_main_db_pass))?$dolibarr_main_db_pass:$force_install_databasepass; ?>"></td>
|
||||
<td class="comment"><?php echo $langs->trans("AdminPassword"); ?></td>
|
||||
</tr>
|
||||
@ -383,7 +375,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<td class="label" valign="top"><?php echo $langs->trans("CreateUser"); ?>
|
||||
</td>
|
||||
|
||||
<td class="label" valign="top"><input type="checkbox" id="db_create_user" name="db_create_user"
|
||||
<td class="label" valign="top"><input type="checkbox"
|
||||
id="db_create_user" name="db_create_user"
|
||||
<?php if (! empty($force_install_createuser)) print ' checked="on"'; ?>></td>
|
||||
<td class="comment"><?php echo $langs->trans("CheckToCreateUser"); ?>
|
||||
</td>
|
||||
@ -400,7 +393,7 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
|
||||
<tr>
|
||||
<td class="label" valign="top"><?php echo $langs->trans("Login"); ?></td>
|
||||
<td class="label" valign="top"><input type="text" id="db_user_root" name="db_user_root" class="needroot"
|
||||
<td class="label" valign="top"><input type="text" name="db_user_root" class="needroot"
|
||||
value="<?php print (! empty($db_user_root))?$db_user_root:$force_install_databaserootlogin; ?>"></td>
|
||||
<td class="label">
|
||||
<div class="comment"><?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
|
||||
@ -411,7 +404,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
|
||||
<tr>
|
||||
<td class="label" valign="top"><?php echo $langs->trans("Password"); ?>
|
||||
</td>
|
||||
<td class="label" valign="top"><input type="password" id="db_pass_root" name="db_pass_root" class="needroot"
|
||||
<td class="label" valign="top"><input type="password" class="needroot"
|
||||
name="db_pass_root"
|
||||
value="<?php print (! empty($db_pass_root))?$db_pass_root:$force_install_databaserootpass; ?>"></td>
|
||||
<td class="label">
|
||||
<div class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
|
||||
@ -442,9 +436,6 @@ jQuery(document).ready(function() {
|
||||
jQuery("#db_create_user").click(function() {
|
||||
init_needroot();
|
||||
});
|
||||
<?php if ($force_install_noedit) { ?>
|
||||
jQuery("#db_pass").focus();
|
||||
<?php } ?>
|
||||
});
|
||||
|
||||
function checkDatabaseName(databasename) {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
* \file htdocs/install/licence.php
|
||||
* \ingroup install
|
||||
* \brief Page to show licence (Removed from install process to save time)
|
||||
* \version $Id: licence.php,v 1.20 2011/07/30 14:56:42 eldy Exp $
|
||||
* \version $Id: licence.php,v 1.19 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -33,9 +33,7 @@ $langs->setDefaultLang($setuplang);
|
||||
$langs->load("install");
|
||||
|
||||
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||
$useforcedwizard=false;
|
||||
if (file_exists("./install.forced.php")) { $useforcedwizard=true; include_once("./install.forced.php"); }
|
||||
else if (file_exists("/etc/dolibarr/install.forced.php")) { $useforcedwizard=include_once("/etc/dolibarr/install.forced.php"); }
|
||||
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||
|
||||
dolibarr_install_syslog("Licence: Entering licence.php page");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user