Fix: Code could not works for debian packages
This commit is contained in:
parent
2c15532a31
commit
d78bfeeb4f
@ -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`;
|
||||
|
||||
@ -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");
|
||||
|
||||
@ -16,7 +16,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.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -24,7 +25,7 @@
|
||||
* \ingroup core
|
||||
* \brief File of class to manage storage of current setup
|
||||
* Config is stored into file conf.php
|
||||
* \version $Id: conf.class.php,v 1.64 2011/08/01 13:26:22 hregis Exp $
|
||||
* \version $Id: conf.class.php,v 1.62 2011/07/30 10:23:26 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -144,13 +145,13 @@ class Conf
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->triggers_modules[] = '/'.$modulename.'/includes/triggers/';
|
||||
$this->triggers_modules[] = '/'.$modulename.'/inc/triggers/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for login method activated by a module
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_LOGIN_METHOD$/i',$key,$reg))
|
||||
{
|
||||
$modulename = strtolower($reg[1]);
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/includes/login/';
|
||||
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/'; // TODO Replace inc by includes to have same path than standard
|
||||
}
|
||||
// If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
|
||||
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
|
||||
|
||||
@ -20,14 +20,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/filefunc.inc.php
|
||||
* \ingroup core
|
||||
* \brief File that include conf.php file and functions.lib.php
|
||||
* \version $Id: filefunc.inc.php,v 1.21 2011/07/31 23:19:04 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)
|
||||
@ -64,7 +65,7 @@ $conffiletoshowshort = "conf.php";
|
||||
# Define localization of conf file
|
||||
$conffile = "conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
# For debian/redhat like systems
|
||||
# For debian like systems
|
||||
#$conffile = "/etc/dolibarr/conf.php";
|
||||
#$conffiletoshow = "/etc/dolibarr/conf.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/index.php
|
||||
* \brief Dolibarr home page
|
||||
* \version $Id: index.php,v 1.200 2011/07/31 23:19:05 eldy Exp $
|
||||
* \version $Id: index.php,v 1.199 2011/07/30 10:23:24 eldy Exp $
|
||||
*/
|
||||
|
||||
define('NOCSRFCHECK',1); // This is login page. We must be able to go on it from another web site.
|
||||
@ -573,7 +574,7 @@ if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING))
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:19:05 $ - $Revision: 1.200 $');
|
||||
llxFooter('$Date: 2011/07/30 10:23:24 $ - $Revision: 1.199 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -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/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.87 2011/07/31 23:26:19 eldy Exp $
|
||||
* \version $Id: check.php,v 1.85 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
include_once("./inc.php");
|
||||
|
||||
@ -38,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");
|
||||
|
||||
|
||||
@ -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/install/etape0.php
|
||||
* \ingroup install
|
||||
* \brief Show and ask charset for database
|
||||
* \version $Id: etape0.php,v 1.42 2011/07/31 23:26:25 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
|
||||
@ -48,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");
|
||||
|
||||
|
||||
@ -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/install/etape1.php
|
||||
* \ingroup install
|
||||
* \brief Build conf file on disk
|
||||
* \version $Id: etape1.php,v 1.136 2011/07/31 23:26:18 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
|
||||
@ -38,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");
|
||||
|
||||
@ -527,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;
|
||||
|
||||
|
||||
@ -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/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.106 2011/07/31 23:26:19 eldy Exp $
|
||||
* \version $Id: etape2.php,v 1.104 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include("./inc.php");
|
||||
@ -53,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");
|
||||
|
||||
|
||||
@ -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/install/etape4.php
|
||||
* \ingroup install
|
||||
* \brief Ask login and password of Dolibarr admin user
|
||||
* \version $Id: etape4.php,v 1.38 2011/07/31 23:26:26 eldy Exp $
|
||||
* \version $Id: etape4.php,v 1.36 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -40,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");
|
||||
|
||||
|
||||
@ -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/install/etape5.php
|
||||
* \ingroup install
|
||||
* \brief Last page of upgrade or install process
|
||||
* \version $Id: etape5.php,v 1.107 2011/07/31 23:26:19 eldy Exp $
|
||||
* \version $Id: etape5.php,v 1.103 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -62,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);
|
||||
|
||||
@ -101,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))
|
||||
@ -205,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'");
|
||||
@ -314,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)
|
||||
{
|
||||
@ -363,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)
|
||||
{
|
||||
|
||||
@ -17,14 +17,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/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.94 2011/07/31 23:26:27 eldy Exp $
|
||||
* \version $Id: fileconf.php,v 1.92 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
include_once("./inc.php");
|
||||
|
||||
@ -38,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='';
|
||||
@ -52,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");
|
||||
|
||||
@ -160,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>";
|
||||
@ -171,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>
|
||||
@ -209,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>
|
||||
@ -311,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>
|
||||
@ -346,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>
|
||||
@ -365,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>
|
||||
@ -373,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>
|
||||
@ -382,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>
|
||||
@ -399,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"); ?>
|
||||
@ -410,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"); ?>
|
||||
@ -441,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) {
|
||||
|
||||
@ -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/install/inc.php
|
||||
* \ingroup core
|
||||
* \brief File that define environment for install pages
|
||||
* \version $Id: inc.php,v 1.137 2011/07/31 23:26:18 eldy Exp $
|
||||
* \version $Id: inc.php,v 1.136 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
define('DOL_VERSION','3.1.0-beta'); // Also defined in htdocs/master.inc.php (Ex: x.y.z-alpha, x.y.z)
|
||||
@ -74,12 +75,10 @@ $conffiletoshowshort = "conf.php";
|
||||
# Define localization of conf file
|
||||
$conffile = "../conf/conf.php";
|
||||
$conffiletoshow = "htdocs/conf/conf.php";
|
||||
$lockfile = '../../install.lock';
|
||||
# For debian/redhat like systems
|
||||
# For debian like systems
|
||||
#$conffile = "/etc/dolibarr/conf.php";
|
||||
#$conffiletoshow = "/etc/dolibarr/conf.php";
|
||||
#$lockfile = '/etc/dolibarr/install.lock'; # Web has no permission to write here
|
||||
$lockfile = '../../install.lock';
|
||||
|
||||
|
||||
if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
||||
{
|
||||
@ -179,7 +178,7 @@ if (preg_match('/install.lock/i',$_SERVER["SCRIPT_FILENAME"]))
|
||||
}
|
||||
exit;
|
||||
}
|
||||
if (file_exists($lockfile))
|
||||
if (file_exists('../../install.lock'))
|
||||
{
|
||||
print 'Install pages have been disabled for security reason (by lock file install.lock into dolibarr root directory).<br>';
|
||||
if (! empty($dolibarr_main_url_root))
|
||||
|
||||
@ -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/install/licence.php
|
||||
* \ingroup install
|
||||
* \brief Page to show licence (Removed from install process to save time)
|
||||
* \version $Id: licence.php,v 1.21 2011/07/31 23:26:22 eldy Exp $
|
||||
* \version $Id: licence.php,v 1.19 2011/07/30 10:23:25 eldy Exp $
|
||||
*/
|
||||
|
||||
include_once("./inc.php");
|
||||
@ -32,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");
|
||||
|
||||
|
||||
@ -18,14 +18,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/main.inc.php
|
||||
* \ingroup core
|
||||
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
|
||||
* \version $Id: main.inc.php,v 1.756 2011/07/31 23:19:05 eldy Exp $
|
||||
* \version $Id: main.inc.php,v 1.755 2011/07/30 10:23:24 eldy Exp $
|
||||
*/
|
||||
|
||||
@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
|
||||
|
||||
@ -21,7 +21,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.
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -29,7 +30,7 @@
|
||||
* \ingroup core
|
||||
* \brief File that defines environment for all Dolibarr process (pages or scripts)
|
||||
* This script reads the conf file, init $lang, $db and and empty $user
|
||||
* \version $Id: master.inc.php,v 1.352 2011/08/01 12:25:14 hregis Exp $
|
||||
* \version $Id: master.inc.php,v 1.350 2011/07/30 10:23:24 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -70,14 +71,14 @@ $conf->file->character_set_client=strtoupper($force_charset_do_notuse);
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
|
||||
|
||||
// Define array of document root directories
|
||||
$conf->file->dol_document_root=array('main' => DOL_DOCUMENT_ROOT);
|
||||
$conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT);
|
||||
if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
// dolibarr_main_document_root_alt contains several directories
|
||||
$values=preg_split('/[;,]/',$dolibarr_main_document_root_alt);
|
||||
foreach($values as $value)
|
||||
{
|
||||
$conf->file->dol_document_root['alt']=$value;
|
||||
$conf->file->dol_document_root[]=$value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user