diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 99f85b40fc9..cb1f619eedc 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -32,10 +32,11 @@ $langs->load("errors");
$langs->load("admin");
$mode=isset($_GET["mode"])?GETPOST("mode"):(isset($_SESSION['mode'])?$_SESSION['mode']:0);
-$mesg=GETPOST("mesg");
-$action=GETPOST('action');
+$action=GETPOST('action','alpha');
+$value=GETPOST('value');
-if (!$user->admin) accessforbidden();
+if (! $user->admin)
+ accessforbidden();
$specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional', 4=>'marketplace');
@@ -46,19 +47,17 @@ $specialtostring=array(0=>'common', 1=>'interfaces', 2=>'other', 3=>'functional'
if ($action == 'set' && $user->admin)
{
- $result=activateModule($_GET["value"]);
- $mesg='';
- if ($result) $mesg=$result;
- header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg));
+ $result=activateModule($value);
+ if ($result) setEventMessage($result, 'errors');
+ header("Location: modules.php?mode=".$mode);
exit;
}
if ($action == 'reset' && $user->admin)
{
- $result=unActivateModule($_GET["value"]);
- $mesg='';
- if ($result) $mesg=$result;
- header("Location: modules.php?mode=".$mode."&mesg=".urlencode($mesg));
+ $result=unActivateModule($value);
+ if ($result) setEventMessage($result, 'errors');
+ header("Location: modules.php?mode=".$mode);
exit;
}
@@ -129,7 +128,8 @@ foreach ($modulesdir as $dir)
if (! empty($modNameLoaded[$modName]))
{
$mesg="Error: Module ".$modName." was found twice: Into ".$modNameLoaded[$modName]." and ".$dir.". You probably have an old file on your disk.
";
- dol_syslog($mesg, LOG_ERR);
+ setEventMessage($mesg, 'warnings');
+ dol_syslog($mesg, LOG_ERR);
continue;
}
@@ -269,9 +269,6 @@ $h++;
dol_fiche_head($head, $mode, $langs->trans("Modules"));
-dol_htmloutput_errors($mesg);
-
-
if ($mode != 'marketplace')
{
print "
| '; $rowspan=3; - if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; + if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; print ' | '; - if ($conf->use_javascript_ajax && $socid) print ''.$langs->trans('CopyAddressFromSoc').''; + if ($conf->use_javascript_ajax && $socid) print ''.$langs->trans('CopyAddressFromSoc').''; print ' | '; print ''; @@ -657,7 +657,7 @@ else print ''; if ($conf->use_javascript_ajax) print ''.$langs->trans('CopyAddressFromSoc').''; - print ' | '; + print ''; // Zip / Town print '
| '.$langs->trans("Zip").' / '.$langs->trans("Town").' | ';
diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php
index 3a3f628b67c..05305d582af 100755
--- a/htdocs/core/class/CSMSFile.class.php
+++ b/htdocs/core/class/CSMSFile.class.php
@@ -41,7 +41,7 @@ class CSMSFile
var $deferred;
var $priority;
var $class;
- var $message;
+ var $message;
/**
@@ -147,7 +147,7 @@ class CSMSFile
$sms->deferred=$this->deferred;
$sms->priority=$this->priority;
$sms->class=$this->class;
- $sms->message=$this->message;
+ $sms->message=$this->message;
$res=$sms->SmsSend();
if ($res <= 0)
diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index 0992a97a68f..58a07bd1535 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -296,7 +296,8 @@ class DoliDBPgsql
// To have postgresql case sensitive
$line=str_replace(' LIKE \'',' ILIKE \'',$line);
-
+ $line=str_replace(' LIKE BINARY \'',' LIKE \'',$line);
+
// Delete using criteria on other table must not declare twice the deleted table
// DELETE FROM tabletodelete USING tabletodelete, othertable -> DELETE FROM tabletodelete USING othertable
if (preg_match('/DELETE FROM ([a-z_]+) USING ([a-z_]+), ([a-z_]+)/i',$line,$reg))
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 07985bda263..a4357147732 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -96,8 +96,8 @@ function member_prepare_head($object)
$head[$h][2] = 'info';
$h++;
-
- complete_head_from_modules($conf,$langs,$object,$head,$h,'member','remove');
+
+ complete_head_from_modules($conf,$langs,$object,$head,$h,'member','remove');
return $head;
}
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 495e292d3f6..c28ccb38e7e 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -959,7 +959,15 @@ class pdf_einstein extends ModelePDFCommandes
$posy+=1;
$pdf->SetFont('','', $default_font_size - 1);
- $posy+=5;
+ if ($object->ref_client)
+ {
+ $posy+=5;
+ $pdf->SetXY($posx,$posy);
+ $pdf->SetTextColor(0,0,60);
+ $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
+ }
+
+ $posy+=4;
$pdf->SetXY($posx,$posy);
$pdf->SetTextColor(0,0,60);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date,"%d %b %Y",false,$outputlangs,true), '', 'R');
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
index 31fb518df1b..946bb1958bf 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
@@ -525,8 +525,8 @@ class pdf_expedition_rouget extends ModelePdfExpedition
$text=$linkedobject->ref;
if ($linkedobject->ref_client) $text.=' ('.$linkedobject->ref_client.')';
$Yoff = $Yoff+8;
- $pdf->SetXY($this->page_largeur - $this->marge_droite - 60,$Yoff);
- $pdf->MultiCell(60, 2, $outputlangs->transnoentities("RefOrder") ." : ".$outputlangs->transnoentities($text), 0, 'R');
+ $pdf->SetXY($this->page_largeur - $this->marge_droite - 100,$Yoff);
+ $pdf->MultiCell(100, 2, $outputlangs->transnoentities("RefOrder") ." : ".$outputlangs->transnoentities($text), 0, 'R');
$Yoff = $Yoff+4;
$pdf->SetXY($this->page_largeur - $this->marge_droite - 60,$Yoff);
$pdf->MultiCell(60, 2, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->commande->date,"daytext",false,$outputlangs,true), 0, 'R');
@@ -576,7 +576,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
// If SHIPPING contact defined, we use it
$usecontact=false;
- $arrayidcontact=$object->getIdContact('external','SHIPPING');
+ $arrayidcontact=$object->$origin->getIdContact('external','SHIPPING');
if (count($arrayidcontact) > 0)
{
$usecontact=true;
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index f86af8d8c25..ec5b6330407 100755
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -1099,6 +1099,14 @@ class pdf_crabe extends ModelePDFFactures
$posy+=1;
$pdf->SetFont('','', $default_font_size - 1);
+ if ($object->ref_client)
+ {
+ $posy+=5;
+ $pdf->SetXY($posx,$posy);
+ $pdf->SetTextColor(0,0,60);
+ $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
+ }
+
$objectidnext=$object->getIdReplacingInvoice('validated');
if ($object->type == 0 && $objectidnext)
{
diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php
index a4f1e7d6978..72fe5a31249 100644
--- a/htdocs/core/modules/modProduct.class.php
+++ b/htdocs/core/modules/modProduct.class.php
@@ -90,6 +90,7 @@ class modProduct extends DolibarrModules
// Boxes
$this->boxes = array();
$this->boxes[0][1] = "box_produits.php";
+ $this->boxes[1][1] = "box_produits_alerte_stock.php";
// Permissions
$this->rights = array();
diff --git a/htdocs/install/etape1.php b/htdocs/install/etape1.php
index 8e6ca05e9d4..2e494422048 100644
--- a/htdocs/install/etape1.php
+++ b/htdocs/install/etape1.php
@@ -29,8 +29,8 @@ define('DONOTLOADCONF',1); // To avoid loading conf by file inc.php
include 'inc.php';
-$action=GETPOST('action');
-$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
+$action=GETPOST('action','alpha');
+$setuplang=(GETPOST('selectlang','',3)?GETPOST('selectlang','',3):'auto');
$langs->setDefaultLang($setuplang);
$langs->load("admin");
@@ -38,10 +38,19 @@ $langs->load("install");
$langs->load("errors");
// Recuparation des information de connexion
-$userroot=isset($_POST["db_user_root"])?$_POST["db_user_root"]:"";
-$passroot=isset($_POST["db_pass_root"])?$_POST["db_pass_root"]:"";
+$userroot=GETPOST('db_user_root');
+$passroot=GETPOST('db_pass_root');
// Repertoire des pages dolibarr
-$main_dir=isset($_POST["main_dir"])?trim($_POST["main_dir"]):'';
+$main_dir=GETPOST('main_dir');
+$main_url=GETPOST('main_url');
+// Database server
+$db_type=GETPOST('db_type','alpha');
+$db_host=GETPOST('db_host','alpha');
+$db_name=GETPOST('db_name','alpha');
+$db_user=GETPOST('db_user','alpha');
+$db_pass=GETPOST('db_pass');
+$db_port=GETPOST('db_port','int');
+$db_prefix=GETPOST('db_prefix','alpha');
// Now we load forced value from install.forced.php file.
$useforcedwizard=false;
@@ -71,34 +80,34 @@ if (! is_writable($conffile))
// Check parameters
-if (empty($_POST["db_type"]))
+if (empty($db_type))
{
print ' '.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DatabaseType")).' ';
$error++;
}
-if (empty($_POST["db_host"]))
+if (empty($db_host))
{
print ''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Server")).' ';
$error++;
}
-if (empty($_POST["db_name"]))
+if (empty($db_name))
{
print ''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("DatabaseName")).' ';
$error++;
}
-if (empty($_POST["db_user"]))
+if (empty($db_user))
{
print ''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("Login")).' ';
$error++;
}
-if (! empty($_POST["db_port"]) && ! is_numeric($_POST["db_port"]))
+if (! empty($db_port) && ! is_numeric($db_port))
{
- print ''.$langs->trans("ErrorBadValueForParameter",$_POST["db_port"],$langs->transnoentities("Port")).' ';
+ print ''.$langs->trans("ErrorBadValueForParameter",$db_port,$langs->transnoentities("Port")).' ';
$error++;
}
-if (! empty($_POST["db_prefix"]) && ! preg_match('/^[a-z0-9]+_$/i', $_POST["db_prefix"]))
+if (! empty($db_prefix) && ! preg_match('/^[a-z0-9]+_$/i', $db_prefix))
{
- print ''.$langs->trans("ErrorBadValueForParameter",$_POST["db_prefix"],$langs->transnoentities("DatabasePrefix")).' ';
+ print ''.$langs->trans("ErrorBadValueForParameter",$db_prefix,$langs->transnoentities("DatabasePrefix")).' ';
$error++;
}
@@ -110,9 +119,9 @@ if (substr($main_dir, dol_strlen($main_dir) -1) == "/")
}
// Remove last / into dans main_url
-if (! empty($_POST["main_url"]) && substr($_POST["main_url"], dol_strlen($_POST["main_url"]) -1) == "/")
+if (! empty($main_url) && substr($main_url, dol_strlen($main_url) -1) == "/")
{
- $_POST["main_url"] = substr($_POST["main_url"], 0, dol_strlen($_POST["main_url"])-1);
+ $main_url = substr($main_url, 0, dol_strlen($main_url)-1);
}
// Directory for generated documents (invoices, orders, ecm, etc...)
@@ -123,13 +132,13 @@ if (! $main_data_dir) { $main_data_dir="$main_dir/documents"; }
// Test database connexion
if (! $error)
{
- $result=@include_once $main_dir."/core/db/".$_POST["db_type"].'.class.php';
+ $result=@include_once $main_dir."/core/db/".$db_type.'.class.php';
if ($result)
{
// If we ask database or user creation we need to connect as root, so we need root login
if (! empty($_POST["db_create_database"]) && ! $userroot)
{
- print ''.$langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$_POST["db_name"]).' ';
+ print ''.$langs->trans("YouAskDatabaseCreationSoDolibarrNeedToConnect",$db_name).' ';
print ''; print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").' '; print $langs->trans("ErrorGoBackAndCorrectParameters"); @@ -137,7 +146,7 @@ if (! $error) } if (! empty($_POST["db_create_user"]) && ! $userroot) { - print ' '.$langs->trans("YouAskLoginCreationSoDolibarrNeedToConnect",$_POST["db_user"]).' ';
+ print ''.$langs->trans("YouAskLoginCreationSoDolibarrNeedToConnect",$db_user).' ';
print ''; print $langs->trans("BecauseConnectionFailedParametersMayBeWrong").' '; print $langs->trans("ErrorGoBackAndCorrectParameters"); @@ -147,14 +156,14 @@ if (! $error) // If we need root access if (! $error && (! empty($_POST["db_create_database"]) || ! empty($_POST["db_create_user"]))) { - $databasefortest=$_POST["db_name"]; + $databasefortest=$db_name; if (! empty($_POST["db_create_database"])) { - if ($_POST["db_type"] == 'mysql' || $_POST["db_type"] == 'mysqli') + if ($db_type == 'mysql' || $db_type == 'mysqli') { $databasefortest='mysql'; } - elseif ($_POST["db_type"] == 'pgsql') + elseif ($db_type == 'pgsql') { $databasefortest='postgres'; } @@ -165,14 +174,14 @@ if (! $error) } //print $_POST["db_type"].",".$_POST["db_host"].",$userroot,$passroot,$databasefortest,".$_POST["db_port"]; - $db=getDoliDBInstance($_POST["db_type"],$_POST["db_host"],$userroot,$passroot,$databasefortest,$_POST["db_port"]); + $db=getDoliDBInstance($db_type, $db_host, $userroot, $passroot, $databasefortest, $db_port); dol_syslog("databasefortest=".$databasefortest." connected=".$db->connected." database_selected=".$db->database_selected, LOG_DEBUG); //print "databasefortest=".$databasefortest." connected=".$db->connected." database_selected=".$db->database_selected; if (empty($_POST["db_create_database"]) && $db->connected && ! $db->database_selected) { - print ' '.$langs->trans("ErrorConnectedButDatabaseNotFound",$_POST["db_name"]).' ';
+ print ''.$langs->trans("ErrorConnectedButDatabaseNotFound",$db_name).' ';
print ''; if (! $db->connected) print $langs->trans("IfDatabaseNotExistsGoBackAndUncheckCreate").' '; print $langs->trans("ErrorGoBackAndCorrectParameters"); @@ -191,7 +200,7 @@ if (! $error) // If we need simple access if (! $error && (empty($_POST["db_create_database"]) && empty($_POST["db_create_user"]))) { - $db=getDoliDBInstance($_POST["db_type"],$_POST["db_host"],$_POST["db_user"],$_POST["db_pass"],$_POST["db_name"],$_POST["db_port"]); + $db=getDoliDBInstance($db_type, $db_host, $db_user, $db_pass, $db_name, $db_port); if ($db->error) { @@ -204,7 +213,7 @@ if (! $error) } else { - print " \nFailed to include_once(\"".$main_dir."/core/db/".$_POST["db_type"].".class.php\") \n"; + print " \nFailed to include_once(\"".$main_dir."/core/db/".$db_type.".class.php\") \n"; print ' '.$langs->trans("ErrorWrongValueForParameter",$langs->transnoentities("WebPagesDirectory")).' ';
print $langs->trans("ErrorGoBackAndCorrectParameters");
$error++;
@@ -223,10 +232,10 @@ if (! $error && $db->connected)
{
if (! empty($_POST["db_create_database"]))
{
- $result=$db->select_db($_POST["db_name"]);
+ $result=$db->select_db($db_name);
if ($result)
{
- print ''.$langs->trans("ErrorDatabaseAlreadyExists",$_POST["db_name"]).' ';
+ print ''.$langs->trans("ErrorDatabaseAlreadyExists", $db_name).' ';
print $langs->trans("IfDatabaseExistsGoBackAndCheckCreate").''; print $langs->trans("ErrorGoBackAndCorrectParameters"); $error++; @@ -259,9 +268,10 @@ if (! $error && $db->connected) if (! $error && $db->connected && $action == "set") { umask(0); - foreach($_POST as $cle=>$valeur) + foreach($_POST as $key => $value) { - if (! preg_match('/^db_pass/i',$cle)) dolibarr_install_syslog("Choice for ".$cle." = ".$valeur); + if (! preg_match('/^db_pass/i', $key)) + dolibarr_install_syslog("Choice for ".$key." = ".$value); } // Show title of step @@ -399,7 +409,7 @@ if (! $error && $db->connected && $action == "set") } // Table prefix - $main_db_prefix = ((GETPOST("db_prefix") && GETPOST("db_prefix") != '') ? GETPOST("db_prefix") : 'llx_'); + $main_db_prefix = (! empty($db_prefix) ? $db_prefix : 'llx_'); // Force https $main_force_https = ((GETPOST("main_force_https") && (GETPOST("main_force_https") == "on" || GETPOST("main_force_https") == 1)) ? '1' : '0'); @@ -766,6 +776,7 @@ 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 $db_host,$db_port,$db_name,$db_user,$db_pass,$db_type; global $conffile,$conffiletoshow,$conffiletoshowshort; global $force_dolibarr_lib_ADODB_PATH, $force_dolibarr_lib_NUSOAP_PATH; global $force_dolibarr_lib_TCPDF_PATH, $force_dolibarr_lib_FPDI_PATH; @@ -791,13 +802,13 @@ function write_conf_file($conffile) fputs($fp,'// and explanations for all possibles parameters.'."\n"); fputs($fp,'//'."\n"); - fputs($fp, '$dolibarr_main_url_root=\''.str_replace("'","\'",($_POST["main_url"])).'\';'); + fputs($fp, '$dolibarr_main_url_root=\''.str_replace("'","\'",($main_url)).'\';'); fputs($fp,"\n"); fputs($fp, '$dolibarr_main_document_root=\''.str_replace("'","\'",($main_dir)).'\';'); fputs($fp,"\n"); - fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",($_POST["main_url"]."/".$main_alt_dir_name)).'\';'); + fputs($fp, $main_use_alt_dir.'$dolibarr_main_url_root_alt=\''.str_replace("'","\'",($main_url."/".$main_alt_dir_name)).'\';'); fputs($fp,"\n"); fputs($fp, $main_use_alt_dir.'$dolibarr_main_document_root_alt=\''.str_replace("'","\'",($main_dir."/".$main_alt_dir_name)).'\';'); @@ -806,24 +817,24 @@ function write_conf_file($conffile) fputs($fp, '$dolibarr_main_data_root=\''.str_replace("'","\'",($main_data_dir)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_host=\''.str_replace("'","\'",($_POST["db_host"])).'\';'); + fputs($fp, '$dolibarr_main_db_host=\''.str_replace("'","\'",($db_host)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_port=\''.str_replace("'","\'",($_POST["db_port"])).'\';'); + fputs($fp, '$dolibarr_main_db_port=\''.str_replace("'","\'",($db_port)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_name=\''.str_replace("'","\'",($_POST["db_name"])).'\';'); + fputs($fp, '$dolibarr_main_db_name=\''.str_replace("'","\'",($db_name)).'\';'); fputs($fp,"\n"); fputs($fp, '$dolibarr_main_db_prefix=\''.str_replace("'","\'",($main_db_prefix)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_user=\''.str_replace("'","\'",($_POST["db_user"])).'\';'); + fputs($fp, '$dolibarr_main_db_user=\''.str_replace("'","\'",($db_user)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_pass=\''.str_replace("'","\'",($_POST["db_pass"])).'\';'); + fputs($fp, '$dolibarr_main_db_pass=\''.str_replace("'","\'",($db_pass)).'\';'); fputs($fp,"\n"); - fputs($fp, '$dolibarr_main_db_type=\''.str_replace("'","\'",($_POST["db_type"])).'\';'); + fputs($fp, '$dolibarr_main_db_type=\''.str_replace("'","\'",($db_type)).'\';'); fputs($fp,"\n"); fputs($fp, '$dolibarr_main_db_character_set=\''.str_replace("'","\'",($_POST["dolibarr_main_db_character_set"])).'\';'); diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index 0d1295c8629..5bff4206e02 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -38,27 +38,27 @@ $langs->load("errors"); dolibarr_install_syslog("Fileconf: Entering fileconf.php page"); -// 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). -// We first init "forced values" to nothing. -if (! isset($force_install_noedit)) $force_install_noedit=''; // 1=To block var specific to distrib, 2 to block all technical parameters -if (! isset($force_install_type)) $force_install_type=''; -if (! isset($force_install_dbserver)) $force_install_dbserver=''; -if (! isset($force_install_port)) $force_install_port=''; -if (! isset($force_install_database)) $force_install_database=''; -if (! isset($force_install_prefix)) $force_install_prefix=''; -if (! isset($force_install_createdatabase)) $force_install_createdatabase=''; -if (! isset($force_install_databaselogin)) $force_install_databaselogin=''; -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; -$forcedfile="./install.forced.php"; -if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; // Must be after inc.php -if (@file_exists($forcedfile)) { - $useforcedwizard=true; include_once $forcedfile; +// 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). +// We first init "forced values" to nothing. +if (! isset($force_install_noedit)) $force_install_noedit=''; // 1=To block var specific to distrib, 2 to block all technical parameters +if (! isset($force_install_type)) $force_install_type=''; +if (! isset($force_install_dbserver)) $force_install_dbserver=''; +if (! isset($force_install_port)) $force_install_port=''; +if (! isset($force_install_database)) $force_install_database=''; +if (! isset($force_install_prefix)) $force_install_prefix=''; +if (! isset($force_install_createdatabase)) $force_install_createdatabase=''; +if (! isset($force_install_databaselogin)) $force_install_databaselogin=''; +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; +$forcedfile="./install.forced.php"; +if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.forced.php"; // Must be after inc.php +if (@file_exists($forcedfile)) { + $useforcedwizard=true; include_once $forcedfile; } //$force_install_message='This is the message'; diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index f8b90a48a00..5be28fc93ae 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -41,7 +41,7 @@ $action=GETPOST('action','alpha'); $confirm=GETPOST('confirm','alpha'); $cancel=GETPOST('cancel','alpha'); $key=GETPOST('key'); -$catMere=GETPOST('catMere'); +$parent=GETPOST('parent'); // Security check if (! empty($user->societe_id)) $socid=$user->societe_id; @@ -144,9 +144,9 @@ if ($action == 'search') $sql.= " OR p.label LIKE '%".$key."%')"; } } - if (! empty($conf->categorie->enabled) && $catMere != -1 and $catMere) + if (! empty($conf->categorie->enabled) && ! empty($parent) && $parent != -1) { - $sql.= " AND cp.fk_categorie ='".$db->escape($catMere)."'"; + $sql.= " AND cp.fk_categorie ='".$db->escape($parent)."'"; } $sql.= " ORDER BY p.ref ASC"; @@ -366,7 +366,7 @@ if ($id || $ref) if (! empty($conf->categorie->enabled)) { print ' | |
| '.$langs->trans("CategoryFilter").' | '; - print ''.$form->select_all_categories(0,$catMere).' | '.$form->select_all_categories(0, $parent).' | '; } print '