This commit is contained in:
eldy 2011-09-29 22:21:57 +02:00
parent 1122903694
commit 8ff32f8ada
11 changed files with 4285 additions and 4301 deletions

View File

@ -350,7 +350,6 @@ else
print '<td align="center">'; print '<td align="center">';
if ($allowinstall) if ($allowinstall)
{ {
//print '<a href="licence.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; // To restore licence page
print '<a href="fileconf.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>'; print '<a href="fileconf.php?selectlang='.$setuplang.'">'.$langs->trans("Start").'</a>';
} }
else else

View File

@ -676,6 +676,7 @@ pFooter($error,$setuplang,'jsinfo');
* *
* @param string $mainfile Full path name of main file to generate/update * @param string $mainfile Full path name of main file to generate/update
* @param string $main_dir Full path name to main.inc.php file * @param string $main_dir Full path name to main.inc.php file
* @return void
*/ */
function write_main_file($mainfile,$main_dir) function write_main_file($mainfile,$main_dir)
{ {
@ -697,6 +698,7 @@ function write_main_file($mainfile,$main_dir)
* *
* @param string $masterfile Full path name of master file to generate/update * @param string $masterfile Full path name of master file to generate/update
* @param string $main_dir Full path name to master.inc.php file * @param string $main_dir Full path name to master.inc.php file
* @return void
*/ */
function write_master_file($masterfile,$main_dir) function write_master_file($masterfile,$main_dir)
{ {
@ -716,7 +718,8 @@ function write_master_file($masterfile,$main_dir)
/** /**
* Save configuration file. No particular permissions are set by installer. * Save configuration file. No particular permissions are set by installer.
* *
* @param conffile Path to conf file to generate/update * @param string $conffile Path to conf file to generate/update
* @return void
*/ */
function write_conf_file($conffile) function write_conf_file($conffile)
{ {

View File

@ -80,7 +80,8 @@ if (! empty($force_install_message))
} }
?> ?>
<table border="0" cellpadding="1" cellspacing="0"> <table
border="0" cellpadding="1" cellspacing="0">
<tr> <tr>
<td colspan="3" class="label" align="center"> <td colspan="3" class="label" align="center">
@ -122,12 +123,10 @@ if (! empty($force_install_message))
} }
} }
?> ?>
<td class="label" valign="top"> <td class="label" valign="top"><?php
<?php
if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_document_root.'" name="main_dir">'; if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_document_root.'" name="main_dir">';
print '<input type="text" size="60" value="'.$dolibarr_main_document_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_dir'.(empty($force_install_noedit)?'':'_bis').'">'; print '<input type="text" size="60" value="'.$dolibarr_main_document_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_dir'.(empty($force_install_noedit)?'':'_bis').'">';
?> ?></td>
</td>
<td class="comment"><?php <td class="comment"><?php
print $langs->trans("WithNoSlashAtTheEnd")."<br>"; print $langs->trans("WithNoSlashAtTheEnd")."<br>";
print $langs->trans("Examples").":<br>"; print $langs->trans("Examples").":<br>";
@ -158,12 +157,10 @@ if (! empty($force_install_message))
} }
} }
?> ?>
<td class="label" valign="top"> <td class="label" valign="top"><?php
<?php
if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_data_root.'" name="main_data_dir">'; if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_data_root.'" name="main_data_dir">';
print '<input type="text" size="60" value="'.$dolibarr_main_data_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_data_dir'.(empty($force_install_noedit)?'':'_bis').'">'; print '<input type="text" size="60" value="'.$dolibarr_main_data_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_data_dir'.(empty($force_install_noedit)?'':'_bis').'">';
?> ?></td>
</td>
<td class="comment"><?php <td class="comment"><?php
print $langs->trans("WithNoSlashAtTheEnd")."<br>"; print $langs->trans("WithNoSlashAtTheEnd")."<br>";
print $langs->trans("DirectoryRecommendation")."<br>"; print $langs->trans("DirectoryRecommendation")."<br>";
@ -177,10 +174,10 @@ if (! empty($force_install_message))
</tr> </tr>
<!-- Root URL $dolibarr_main_url_root --> <!-- Root URL $dolibarr_main_url_root -->
<?php <?php
if (! empty($main_url)) $dolibarr_main_url_root=$main_url; if (! empty($main_url)) $dolibarr_main_url_root=$main_url;
if (empty($dolibarr_main_url_root)) if (empty($dolibarr_main_url_root))
{ {
// If defined (Ie: Apache with Linux) // If defined (Ie: Apache with Linux)
if (isset($_SERVER["SCRIPT_URI"])) { if (isset($_SERVER["SCRIPT_URI"])) {
$dolibarr_main_url_root=$_SERVER["SCRIPT_URI"]; $dolibarr_main_url_root=$_SERVER["SCRIPT_URI"];
@ -202,17 +199,15 @@ if (empty($dolibarr_main_url_root))
$dolibarr_main_url_root = preg_replace('/\/$/','',$dolibarr_main_url_root); // Remove the / $dolibarr_main_url_root = preg_replace('/\/$/','',$dolibarr_main_url_root); // Remove the /
$dolibarr_main_url_root = preg_replace('/\/index\.php$/','',$dolibarr_main_url_root); // Remove the /index.php $dolibarr_main_url_root = preg_replace('/\/index\.php$/','',$dolibarr_main_url_root); // Remove the /index.php
$dolibarr_main_url_root = preg_replace('/\/install$/','',$dolibarr_main_url_root); // Remove the /install $dolibarr_main_url_root = preg_replace('/\/install$/','',$dolibarr_main_url_root); // Remove the /install
} }
?> ?>
<tr> <tr>
<td valign="top" class="label"><b> <?php echo $langs->trans("URLRoot"); ?></b> <td valign="top" class="label"><b> <?php echo $langs->trans("URLRoot"); ?></b>
</td> </td>
<td valign="top" class="label"> <td valign="top" class="label"><?php
<?php
if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_url_root.'" name="main_url">'; if ($force_install_noedit) print '<input type="hidden" value="'.$dolibarr_main_url_root.'" name="main_url">';
print '<input type="text" size="60" value="'.$dolibarr_main_url_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_url'.(empty($force_install_noedit)?'':'_bis').'">'; print '<input type="text" size="60" value="'.$dolibarr_main_url_root.'"'.(empty($force_install_noedit)?'':' disabled="disabled"').' name="main_url'.(empty($force_install_noedit)?'':'_bis').'">';
?> ?></td>
</td>
<td class="comment"><?php print $langs->trans("Examples").":<br>"; ?> <td class="comment"><?php print $langs->trans("Examples").":<br>"; ?>
<ul> <ul>
<li>http://localhost/</li> <li>http://localhost/</li>
@ -221,9 +216,9 @@ if (empty($dolibarr_main_url_root))
</td> </td>
</tr> </tr>
<?php <?php
if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if the installation process is "https://" if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if the installation process is "https://"
?> ?>
<tr> <tr>
<td valign="top" class="label"><?php echo $langs->trans("ForceHttps"); ?></td> <td valign="top" class="label"><?php echo $langs->trans("ForceHttps"); ?></td>
<td class="label" valign="top"><input type="checkbox" <td class="label" valign="top"><input type="checkbox"
@ -233,9 +228,9 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
</td> </td>
</tr> </tr>
<?php <?php
} }
?> ?>
<!-- Dolibarr database --> <!-- Dolibarr database -->
@ -320,7 +315,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<tr> <tr>
<td valign="top" class="label"><b> <?php echo $langs->trans("Server"); ?> <td valign="top" class="label"><b> <?php echo $langs->trans("Server"); ?>
</b></td> </b></td>
<td valign="top" class="label"><input type="text" name="db_host<?php print ($force_install_noedit==2 && $force_install_dbserver)?'_bis':''; ?>" <td valign="top" class="label"><input type="text"
name="db_host<?php print ($force_install_noedit==2 && $force_install_dbserver)?'_bis':''; ?>"
<?php if ($force_install_noedit==2 && $force_install_dbserver) print ' disabled="disabled"'; ?> <?php if ($force_install_noedit==2 && $force_install_dbserver) print ' disabled="disabled"'; ?>
value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:(empty($force_install_dbserver)?'localhost':$force_install_dbserver); ?>"> value="<?php print (! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:(empty($force_install_dbserver)?'localhost':$force_install_dbserver); ?>">
<?php if ($force_install_noedit==2 && $force_install_dbserver) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:$force_install_dbserver).'">'; ?> <?php if ($force_install_noedit==2 && $force_install_dbserver) print '<input type="hidden" name="db_host" value="'.((! empty($dolibarr_main_db_host))?$dolibarr_main_db_host:$force_install_dbserver).'">'; ?>
@ -332,7 +328,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<tr> <tr>
<td valign="top" class="label"><?php echo $langs->trans("Port"); ?></td> <td valign="top" class="label"><?php echo $langs->trans("Port"); ?></td>
<td valign="top" class="label"><input type="text" name="db_port<?php print ($force_install_noedit==2 && $force_install_port)?'_bis':''; ?>" <td valign="top" class="label"><input type="text"
name="db_port<?php print ($force_install_noedit==2 && $force_install_port)?'_bis':''; ?>"
<?php if ($force_install_noedit==2 && $force_install_port) print ' disabled="disabled"'; ?> <?php if ($force_install_noedit==2 && $force_install_port) print ' disabled="disabled"'; ?>
value="<?php print (! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port; ?>"> value="<?php print (! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port; ?>">
<?php if ($force_install_noedit==2 && $force_install_port) print '<input type="hidden" name="db_port" value="'.((! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port).'">'; ?> <?php if ($force_install_noedit==2 && $force_install_port) print '<input type="hidden" name="db_port" value="'.((! empty($dolibarr_main_db_port))?$dolibarr_main_db_port:$force_install_port).'">'; ?>
@ -343,9 +340,11 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
</tr> </tr>
<tr> <tr>
<td class="label" valign="top"><b> <?php echo $langs->trans("DatabaseName"); ?> </b></td> <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" id="db_name"
name="db_name"
value="<?php echo (! empty($dolibarr_main_db_name))?$dolibarr_main_db_name:($force_install_database?$force_install_database:'dolibarr'); ?>"></td> value="<?php echo (! empty($dolibarr_main_db_name))?$dolibarr_main_db_name:($force_install_database?$force_install_database:'dolibarr'); ?>"></td>
<td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td> <td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td>
</tr> </tr>
@ -364,7 +363,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<tr> <tr>
<td class="label" valign="top"><b><?php echo $langs->trans("Login"); ?></b> <td class="label" valign="top"><b><?php echo $langs->trans("Login"); ?></b>
</td> </td>
<td class="label" valign="top"><input type="text" id="db_user" name="db_user" <td class="label" valign="top"><input type="text" id="db_user"
name="db_user"
value="<?php print (! empty($dolibarr_main_db_user))?$dolibarr_main_db_user:$force_install_databaselogin; ?>"></td> 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> <td class="comment"><?php echo $langs->trans("AdminLogin"); ?></td>
</tr> </tr>
@ -372,7 +372,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<tr> <tr>
<td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b> <td class="label" valign="top"><b><?php echo $langs->trans("Password"); ?></b>
</td> </td>
<td class="label" valign="top"><input type="password" id="db_pass" name="db_pass" <td class="label" valign="top"><input type="password" id="db_pass"
name="db_pass"
value="<?php print (! empty($dolibarr_main_db_pass))?$dolibarr_main_db_pass:$force_install_databasepass; ?>"></td> 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> <td class="comment"><?php echo $langs->trans("AdminPassword"); ?></td>
</tr> </tr>
@ -381,7 +382,8 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<td class="label" valign="top"><?php echo $langs->trans("CreateUser"); ?> <td class="label" valign="top"><?php echo $langs->trans("CreateUser"); ?>
</td> </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> <?php if (! empty($force_install_createuser)) print ' checked="on"'; ?>></td>
<td class="comment"><?php echo $langs->trans("CheckToCreateUser"); ?> <td class="comment"><?php echo $langs->trans("CheckToCreateUser"); ?>
</td> </td>
@ -401,10 +403,10 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
<tr> <tr>
<td class="label" valign="top"><?php echo $langs->trans("Login"); ?></td> <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" id="db_user_root"
name="db_user_root" class="needroot"
value="<?php print (! empty($db_user_root))?$db_user_root:$force_install_databaserootlogin; ?>"></td> value="<?php print (! empty($db_user_root))?$db_user_root:$force_install_databaserootlogin; ?>"></td>
<td class="comment"> <td class="comment"><?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
<?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
<!-- <!--
<?php echo '<br>'.$langs->trans("Examples").':<br>' ?> <?php echo '<br>'.$langs->trans("Examples").':<br>' ?>
<ul> <ul>
@ -413,15 +415,16 @@ if (! empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') { // Enabled if t
</ul> </ul>
</td> </td>
--> -->
</tr> </tr>
<tr> <tr>
<td class="label" valign="top"><?php echo $langs->trans("Password"); ?> <td class="label" valign="top"><?php echo $langs->trans("Password"); ?>
</td> </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"
id="db_pass_root" name="db_pass_root" class="needroot"
value="<?php print (! empty($db_pass_root))?$db_pass_root:$force_install_databaserootpass; ?>"></td> value="<?php print (! empty($db_pass_root))?$db_pass_root:$force_install_databaserootpass; ?>"></td>
<td class="comment"> <td class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
<?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>
</td> </td>
</tr> </tr>
@ -519,9 +522,9 @@ function jscheckparam()
} }
</script> </script>
<?php <?php
// $db->close(); Not database connexion yet // $db->close(); Not database connexion yet
pFooter($err,$setuplang,'jscheckparam'); pFooter($err,$setuplang,'jscheckparam');
?> ?>

View File

@ -142,7 +142,7 @@ if (! empty($dolibarr_main_document_root_alt))
} }
define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root)?$dolibarr_main_url_root:'')); // URL relative root define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root)?$dolibarr_main_url_root:'')); // URL relative root
$uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* $uri=preg_replace('/^http(s?):\/\//i','',constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http*
$suburi = strstr ($uri, '/'); // $suburi contains url without domain $suburi = strstr($uri, '/'); // $suburi contains url without domain
if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now ''
define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...)
@ -247,9 +247,10 @@ $bc[true]=' class="bg2"';
/** /**
* \brief Load conf file (file must exists) * Load conf file (file must exists)
* \param dolibarr_main_document_root Root directory of Dolibarr bin files *
* \return int <0 if KO, >0 if OK * @param string $dolibarr_main_document_root Root directory of Dolibarr bin files
* @return int <0 if KO, >0 if OK
*/ */
function conf($dolibarr_main_document_root) function conf($dolibarr_main_document_root)
{ {
@ -308,10 +309,11 @@ function conf($dolibarr_main_document_root)
/** /**
* Show header of install pages * Show header of install pages
* *
* @param $soutitre * @param string $soutitre Sous titre
* @param $next * @param string $next Next
* @param $action Action code ('set' or 'upgrade') * @param string $action Action code ('set' or 'upgrade')
* @param $param * @param string $param Param
* @return void
*/ */
function pHeader($soutitre,$next,$action='set',$param='') function pHeader($soutitre,$next,$action='set',$param='')
{ {
@ -352,9 +354,10 @@ function pHeader($soutitre,$next,$action='set',$param='')
/** /**
* Output footer of install pages * Output footer of install pages
* *
* @param $nonext * @param string $nonext No next
* @param $setuplang * @param string $setuplang Setup lang
* @param $jscheckfunction * @param string $jscheckfunction Add a javascript check function
* @return void
*/ */
function pFooter($nonext=0,$setuplang='',$jscheckfunction='') function pFooter($nonext=0,$setuplang='',$jscheckfunction='')
{ {
@ -402,8 +405,9 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='')
/** /**
* Log function for install pages * Log function for install pages
* *
* @param $message * @param string $message Message
* @param $level * @param int $level Level of log
* @return void
*/ */
function dolibarr_install_syslog($message, $level=LOG_DEBUG) function dolibarr_install_syslog($message, $level=LOG_DEBUG)
{ {

View File

@ -1,68 +0,0 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* 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/>.
*/
/**
* \file htdocs/install/licence.php
* \ingroup install
* \brief Page to show licence (Removed from install process to save time)
*/
include_once("./inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/functions2.lib.php");
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
$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"); }
dolibarr_install_syslog("Licence: Entering licence.php page");
/*
* View
*/
pHeader($langs->trans("License"),"fileconf");
// Test if we can run a first install process
if (! is_writable($conffile))
{
print $langs->trans("ConfFileIsNotWritable",$conffiletoshow);
pFooter(1,$setuplang,'jscheckparam');
exit;
}
//print '<pre style="align: center; font-size: 12px">';
$result=dol_print_file($langs,"html/gpl.html",1);
if (! $result)
{
print '<center>'."\n";
print '<textarea readonly="1" rows="26" cols="80">';
dol_print_file($langs,"html/gpl.txt",1);
print '</textarea>';
print '</center>'."\n";
}
//print '</pre>';
pFooter(0,$setuplang);
?>

View File

@ -343,6 +343,11 @@ pFooter($error,$setuplang);
/** /**
* Reporte liens vers une facture de paiements sur table de jointure (lien n-n paiements factures) * Reporte liens vers une facture de paiements sur table de jointure (lien n-n paiements factures)
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_paiements($db,$langs,$conf) function migrate_paiements($db,$langs,$conf)
{ {
@ -432,6 +437,11 @@ function migrate_paiements($db,$langs,$conf)
* Corrige paiement orphelins (liens paumes suite a bugs) * Corrige paiement orphelins (liens paumes suite a bugs)
* Pour verifier s'il reste des orphelins: * Pour verifier s'il reste des orphelins:
* select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL) * select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL)
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_paiements_orphelins_1($db,$langs,$conf) function migrate_paiements_orphelins_1($db,$langs,$conf)
{ {
@ -554,6 +564,11 @@ function migrate_paiements_orphelins_1($db,$langs,$conf)
* Corrige paiement orphelins (liens paumes suite a bugs) * Corrige paiement orphelins (liens paumes suite a bugs)
* Pour verifier s'il reste des orphelins: * Pour verifier s'il reste des orphelins:
* select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL) * select * from llx_paiement as p left join llx_paiement_facture as pf on pf.fk_paiement=p.rowid WHERE pf.rowid IS NULL AND (p.fk_facture = 0 OR p.fk_facture IS NULL)
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_paiements_orphelins_2($db,$langs,$conf) function migrate_paiements_orphelins_2($db,$langs,$conf)
{ {
@ -1044,6 +1059,11 @@ function migrate_contracts_open($db,$langs,$conf)
/** /**
* Factures fournisseurs * Factures fournisseurs
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_paiementfourn_facturefourn($db,$langs,$conf) function migrate_paiementfourn_facturefourn($db,$langs,$conf)
{ {
@ -3135,6 +3155,13 @@ function migrate_actioncomm_element($db,$langs,$conf)
/** /**
* Migration directory * Migration directory
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @param string $oldname Old name
* @param string $newname New name
* @return void
*/ */
function migrate_directories($db,$langs,$conf,$oldname,$newname) function migrate_directories($db,$langs,$conf,$oldname,$newname)
{ {
@ -3148,8 +3175,13 @@ function migrate_directories($db,$langs,$conf,$oldname,$newname)
} }
/* /**
* Delete depracted files * Delete deprecated files
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_delete_old_files($db,$langs,$conf) function migrate_delete_old_files($db,$langs,$conf)
{ {
@ -3203,8 +3235,13 @@ function migrate_delete_old_files($db,$langs,$conf)
return $result; return $result;
} }
/* /**
* Remove deprecated directories * Remove deprecated directories
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_delete_old_dir($db,$langs,$conf) function migrate_delete_old_dir($db,$langs,$conf)
{ {
@ -3236,10 +3273,15 @@ function migrate_delete_old_dir($db,$langs,$conf)
} }
/* /**
* Disable/Reenable features modules. * Disable/Reenable features modules.
* We must do this when internal menu of module or permissions has changed * We must do this when internal menu of module or permissions has changed
* or when triggers have moved. * or when triggers have moved.
*
* @param DoliDB $db Database handler
* @param Translate $langs Object langs
* @param Conf $conf Object conf
* @return void
*/ */
function migrate_reload_modules($db,$langs,$conf) function migrate_reload_modules($db,$langs,$conf)
{ {
@ -3404,10 +3446,11 @@ function migrate_reload_modules($db,$langs,$conf)
/** /**
* Reload menu if dynamic menus, if modified by version * Reload menu if dynamic menus, if modified by version
* *
* @param $db * @param DoliDB $db Database handler
* @param $langs * @param Translate $langs Object langs
* @param $conf * @param Conf $conf Object conf
* @param $versionto * @param string $versionto Version target
* @return void
*/ */
function migrate_reload_menu($db,$langs,$conf,$versionto) function migrate_reload_menu($db,$langs,$conf,$versionto)
{ {