Enhancement of DoliWamp
This commit is contained in:
parent
ef17f83bfb
commit
9105a53d43
@ -65,6 +65,7 @@ Source: "build\exe\doliwamp\startdoliwamp.bat"; DestDir: "{app}\"; Flags: ignore
|
|||||||
Source: "build\exe\doliwamp\removefiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\removefiles.bat"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\rundoliwamp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\rundoliwamp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\rundolihelp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\rundolihelp.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
|
Source: "build\exe\doliwamp\rundoliadmin.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\install_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\install_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\uninstall_services.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
Source: "build\exe\doliwamp\mysqlinitpassword.bat.install"; DestDir: "{app}\"; Flags: ignoreversion;
|
||||||
@ -105,6 +106,7 @@ Name: "{group}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir:
|
|||||||
Name: "{group}\Tools\Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
|
Name: "{group}\Tools\Help center"; Filename: "{app}\rundolihelp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\dolihelp.ico
|
||||||
Name: "{group}\Tools\Start DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampon.ico
|
Name: "{group}\Tools\Start DoliWamp server"; Filename: "{app}\startdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampon.ico
|
||||||
Name: "{group}\Tools\Stop DoliWamp server"; Filename: "{app}\stopdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampoff.ico
|
Name: "{group}\Tools\Stop DoliWamp server"; Filename: "{app}\stopdoliwamp.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliwampoff.ico
|
||||||
|
Name: "{group}\Tools\Admin DoliWamp server"; Filename: "{app}\rundoliadmin.bat"; WorkingDir: "{app}"; IconFilename: {app}\www\dolibarr\doc\images\doliadmin.ico
|
||||||
Name: "{group}\Tools\Uninstall DoliWamp"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: {app}\uninstall_services.bat
|
Name: "{group}\Tools\Uninstall DoliWamp"; Filename: "{app}\unins000.exe"; WorkingDir: "{app}"; IconFilename: {app}\uninstall_services.bat
|
||||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Dolibarr"; WorkingDir: "{app}"; Filename: "{app}\rundoliwamp.bat"; Tasks: quicklaunchicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\Dolibarr"; WorkingDir: "{app}"; Filename: "{app}\rundoliwamp.bat"; Tasks: quicklaunchicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
||||||
Name: "{userdesktop}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
Name: "{userdesktop}\Dolibarr ERP-CRM"; Filename: "{app}\rundoliwamp.bat"; WorkingDir: "{app}"; Tasks: desktopicon; IconFilename: {app}\www\dolibarr\doc\images\dolibarr.ico
|
||||||
@ -303,7 +305,7 @@ begin
|
|||||||
|
|
||||||
|
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
// rundoliwamp.bat and rundolihelp.bat
|
// rundoliwamp.bat, rundolihelp.bat and rundoliadmin.bat
|
||||||
//----------------------------------------------
|
//----------------------------------------------
|
||||||
|
|
||||||
destFile := pathWithSlashes+'/rundoliwamp.bat';
|
destFile := pathWithSlashes+'/rundoliwamp.bat';
|
||||||
@ -312,7 +314,11 @@ begin
|
|||||||
destFileH := pathWithSlashes+'/rundolihelp.bat';
|
destFileH := pathWithSlashes+'/rundolihelp.bat';
|
||||||
srcFileH := pathWithSlashes+'/rundolihelp.bat.install';
|
srcFileH := pathWithSlashes+'/rundolihelp.bat.install';
|
||||||
|
|
||||||
if (not FileExists (destFile) or not FileExists (destFileH)) and (FileExists(srcFile) and FileExists(srcFileH)) then
|
destFileA := pathWithSlashes+'/rundoliadmin.bat';
|
||||||
|
srcFileA := pathWithSlashes+'/rundoliadmin.bat.install';
|
||||||
|
|
||||||
|
if (not FileExists (destFile) or not FileExists (destFileH) or not FileExists (destFileA))
|
||||||
|
and (FileExists(srcFile) and FileExists(srcFileH) and FileExists(srcFileA)) then
|
||||||
begin
|
begin
|
||||||
//navigateur
|
//navigateur
|
||||||
browser := 'explorer.exe';
|
browser := 'explorer.exe';
|
||||||
@ -337,6 +343,11 @@ begin
|
|||||||
StringChange (srcContents, 'WAMPBROWSER', browser);
|
StringChange (srcContents, 'WAMPBROWSER', browser);
|
||||||
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
|
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
|
||||||
SaveStringToFile(destFileH,srcContents, False);
|
SaveStringToFile(destFileH,srcContents, False);
|
||||||
|
|
||||||
|
LoadStringFromFile (srcFileA, srcContents);
|
||||||
|
StringChange (srcContents, 'WAMPBROWSER', browser);
|
||||||
|
StringChange (srcContents, 'WAMPAPACHEPORT', myporta);
|
||||||
|
SaveStringToFile(destFileA,srcContents, False);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,10 +18,10 @@ $appDir = '../apps/';
|
|||||||
|
|
||||||
|
|
||||||
// we set version of applications
|
// we set version of applications
|
||||||
$phpVersion = '5.2.5';
|
$phpVersion = 'WAMPPHPVERSION';
|
||||||
$apacheVersion = '2.2.6';
|
$apacheVersion = 'WAMPAPACHEVERSION';
|
||||||
$mysqlVersion = '5.0.45';
|
$mysqlVersion = 'WAMPMYSQLVERSION';
|
||||||
|
$apachePort = 'WAMPAPACHEPORT';
|
||||||
|
|
||||||
|
|
||||||
// directories to ignore in project list
|
// directories to ignore in project list
|
||||||
@ -32,8 +32,10 @@ $projectsListIgnore = array ('.','..');
|
|||||||
$langues = array(
|
$langues = array(
|
||||||
'en' => array(
|
'en' => array(
|
||||||
'langue' => 'English',
|
'langue' => 'English',
|
||||||
'autreLangue' => 'Version Française',
|
'autreLangue1' => 'Español',
|
||||||
'autreLangueLien' => 'fr',
|
'autreLangueLien1' => 'es',
|
||||||
|
'autreLangue2' => 'Français',
|
||||||
|
'autreLangueLien2' => 'fr',
|
||||||
'titreHtml' => 'DoliWamp Homepage',
|
'titreHtml' => 'DoliWamp Homepage',
|
||||||
'titreConf' => 'Server Configuration',
|
'titreConf' => 'Server Configuration',
|
||||||
'versa' => 'Apache Version :',
|
'versa' => 'Apache Version :',
|
||||||
@ -46,14 +48,19 @@ $langues = array(
|
|||||||
'txtProjet' => 'Your Softwares',
|
'txtProjet' => 'Your Softwares',
|
||||||
'txtNoProjet' => 'No other softwares. To create a new one, just create a directory in \'www\'.',
|
'txtNoProjet' => 'No other softwares. To create a new one, just create a directory in \'www\'.',
|
||||||
'txtApp' => 'Applications',
|
'txtApp' => 'Applications',
|
||||||
|
'FromLocalNetwork' => 'URL for local access',
|
||||||
|
'FromInternet' => 'URL for Internet',
|
||||||
|
'NotAvailable' => 'Not available',
|
||||||
'faq' => 'http://www.en.wampserver.com/faq.php',
|
'faq' => 'http://www.en.wampserver.com/faq.php',
|
||||||
'ipserver' => 'Name/IP Server:',
|
'ipserver' => 'Name/IP Server:',
|
||||||
'askhelp' => 'Request a help support'
|
'askhelp' => 'Dolibarr Help center'
|
||||||
),
|
),
|
||||||
'fr' => array(
|
'fr' => array(
|
||||||
'langue' => 'Français',
|
'langue' => 'Français',
|
||||||
'autreLangue' => 'Versión Español',
|
'autreLangue1' => 'Español',
|
||||||
'autreLangueLien' => 'es',
|
'autreLangueLien1' => 'es',
|
||||||
|
'autreLangue2' => 'English',
|
||||||
|
'autreLangueLien2' => 'en',
|
||||||
'titreHtml' => 'Accueil DoliWamp',
|
'titreHtml' => 'Accueil DoliWamp',
|
||||||
'titreConf' => 'Configuration Serveur',
|
'titreConf' => 'Configuration Serveur',
|
||||||
'versa' => 'Version de Apache:',
|
'versa' => 'Version de Apache:',
|
||||||
@ -66,14 +73,19 @@ $langues = array(
|
|||||||
'txtProjet' => 'Autres applications (sans alias)',
|
'txtProjet' => 'Autres applications (sans alias)',
|
||||||
'txtNoProjet' => 'Pas d\'autre application. Pour en ajouter une nouvelle, créez simplement un répertoire dans \'www\'.',
|
'txtNoProjet' => 'Pas d\'autre application. Pour en ajouter une nouvelle, créez simplement un répertoire dans \'www\'.',
|
||||||
'txtApp' => 'Applications',
|
'txtApp' => 'Applications',
|
||||||
|
'FromLocalNetwork' => 'URL accès local',
|
||||||
|
'FromInternet' => 'URL accès par Internet',
|
||||||
|
'NotAvailable' => 'Non disponible',
|
||||||
'faq' => 'http://www.wampserver.com/faq.php',
|
'faq' => 'http://www.wampserver.com/faq.php',
|
||||||
'ipserver' => 'Name/IP Serveur:',
|
'ipserver' => 'Name/IP Serveur:',
|
||||||
'askhelp' => 'Demander une aide au support'
|
'askhelp' => 'Centre d\'assistance Dolibarr'
|
||||||
),
|
),
|
||||||
'es' => array(
|
'es' => array(
|
||||||
'langue' => 'Español',
|
'langue' => 'Español',
|
||||||
'autreLangue' => 'English Version',
|
'autreLangue1' => 'English',
|
||||||
'autreLangueLien' => 'en',
|
'autreLangueLien1' => 'en',
|
||||||
|
'autreLangue2' => 'Français',
|
||||||
|
'autreLangueLien2' => 'fr',
|
||||||
'titreHtml' => 'Inicio DoliWamp',
|
'titreHtml' => 'Inicio DoliWamp',
|
||||||
'titreConf' => 'Configuración Servidor',
|
'titreConf' => 'Configuración Servidor',
|
||||||
'versa' => 'Versión de Apache:',
|
'versa' => 'Versión de Apache:',
|
||||||
@ -86,6 +98,9 @@ $langues = array(
|
|||||||
'txtProjet' => 'Otras aplicaciones (sin alias)',
|
'txtProjet' => 'Otras aplicaciones (sin alias)',
|
||||||
'txtNoProjet' => 'Ninguna otra aplicación. Para añadir una nueva, simplemente cree una carpeta en \'www\'.',
|
'txtNoProjet' => 'Ninguna otra aplicación. Para añadir una nueva, simplemente cree una carpeta en \'www\'.',
|
||||||
'txtApp' => 'Aplicaciones',
|
'txtApp' => 'Aplicaciones',
|
||||||
|
'FromLocalNetwork' => 'URL for local access',
|
||||||
|
'FromInternet' => 'URL for Internet',
|
||||||
|
'NotAvailable' => 'Not available',
|
||||||
'faq' => 'http://www.wampserver.com/faq.php',
|
'faq' => 'http://www.wampserver.com/faq.php',
|
||||||
'ipserver' => 'Nombre/IP Servidor',
|
'ipserver' => 'Nombre/IP Servidor',
|
||||||
'askhelp' => 'Pedir ayuda o soporte'
|
'askhelp' => 'Pedir ayuda o soporte'
|
||||||
@ -331,19 +346,22 @@ if (is_dir($aliasDir))
|
|||||||
if (is_file($aliasDir.$file) && ereg('.conf',$file))
|
if (is_file($aliasDir.$file) && ereg('.conf',$file))
|
||||||
{
|
{
|
||||||
$msg = '';
|
$msg = '';
|
||||||
|
|
||||||
|
$aliasContents.='<tr><td><ul class="aliases">';
|
||||||
|
|
||||||
$aliasContents .= '<li><a href="'.ereg_replace('.conf','',$file).'/">';
|
$aliasContents .= '<li><a href="'.ereg_replace('.conf','',$file).'/">';
|
||||||
$file = ereg_replace('.conf','',$file);
|
$file = ereg_replace('.conf','',$file);
|
||||||
if (eregi('dolibarr',$file)) $aliasContents .= $file.'</a> (URL: http://<i>ipofyourserver</i>:81/'.$file.'/)';
|
if (eregi('dolibarr',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>http://<i>ipofyourserver</i>'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td></tr>';
|
||||||
elseif (eregi('phpmyadmin',$file)) $aliasContents .= $file.'</a> (URL: http://<i>ipofyourserver</i>:81/'.$file.'/)';
|
elseif (eregi('phpmyadmin',$file)) $aliasContents .= $file.'</a></li></ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||||
else $aliasContents .= $file.'</a>';
|
else $aliasContents .= $file.'</a></li></ul></td> <td> </td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||||
$aliasContents.='</li>';
|
|
||||||
$aliasarray[]=$file;
|
$aliasarray[]=$file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
if (!isset($aliasContents))
|
if (!isset($aliasContents))
|
||||||
$aliasContents = $langues[$langue]['txtNoAlias'];
|
$aliasContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoAlias'].'</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
// Read projects in www dir
|
// Read projects in www dir
|
||||||
@ -359,14 +377,18 @@ foreach($listoffiles as $file)
|
|||||||
{
|
{
|
||||||
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
|
if (is_dir($file) && !in_array($file,$projectsListIgnore) && !in_array($file,$aliasarray))
|
||||||
{
|
{
|
||||||
|
$projectContents .= '<tr><td><ul class="projects">';
|
||||||
|
|
||||||
$projectContents .= '<li><a href="'.$file.'/">';
|
$projectContents .= '<li><a href="'.$file.'/">';
|
||||||
$projectContents .= $file.'</a> (URL: http://<i>ipofyourserver</i>:81/'.$file.'/)';
|
$projectContents .= $file.'</a>';
|
||||||
$projectContents .= '</li>';
|
$projectContents .= '</li>';
|
||||||
|
|
||||||
|
$projectContents .= '</ul></td><td>http://localhost'.($apachePort != 80?':'.$apachePort:'').'/'.$file.'/)'.'</td><td>'.$langues[$langue]['NotAvailable'].'</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($projectContents))
|
if (!isset($projectContents))
|
||||||
$projectContents = $langues[$langue]['txtNoProjet'];
|
$projectContents = '<tr><td colspan="3">'.$langues[$langue]['txtNoProjet'].'</td></tr>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -380,7 +402,7 @@ $pageContents = <<< EOPAGE
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||||
|
|
||||||
<html lang="en" xml:lang="en">
|
<html lang="$langue" xml:lang="$langue">
|
||||||
<head>
|
<head>
|
||||||
<title>{$langues[$langue]['titreHtml']}</title>
|
<title>{$langues[$langue]['titreHtml']}</title>
|
||||||
<meta http-equiv="Content-Type" content="txt/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="txt/html; charset=utf-8" />
|
||||||
@ -501,7 +523,8 @@ a:hover {
|
|||||||
<td align="right">
|
<td align="right">
|
||||||
<ul class="utility">
|
<ul class="utility">
|
||||||
<li>${wampserverVersion}</li>
|
<li>${wampserverVersion}</li>
|
||||||
<li><a href="?lang={$langues[$langue]['autreLangueLien']}">{$langues[$langue]['autreLangue']}</a></li>
|
<li><a href="?lang={$langues[$langue]['autreLangueLien1']}">{$langues[$langue]['autreLangue1']}</a>
|
||||||
|
- <a href="?lang={$langues[$langue]['autreLangueLien2']}">{$langues[$langue]['autreLangue2']}</a></li>
|
||||||
<br><br>
|
<br><br>
|
||||||
<li>Provided by <a href="http://www.nltechno.com" targer="_blank">NLTechno</a></li>
|
<li>Provided by <a href="http://www.nltechno.com" targer="_blank">NLTechno</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -527,17 +550,23 @@ a:hover {
|
|||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h2>{$langues[$langue]['txtApp']}</h2>
|
<h2>{$langues[$langue]['txtApp']}</h2>
|
||||||
<ul class="aliases">
|
<table width="100%" style="padding: 0px 0px 0px 0px;">
|
||||||
|
<tr valign="middle"><td>
|
||||||
|
{$langues[$langue]['txtApp']}
|
||||||
|
</td><td valign="middle">
|
||||||
|
{$langues[$langue]['FromLocalNetwork']}
|
||||||
|
</td><td valign="middle">
|
||||||
|
{$langues[$langue]['FromInternet']}
|
||||||
|
</td></tr>
|
||||||
${aliasContents}
|
${aliasContents}
|
||||||
<ul class="projects">
|
${projectContents}
|
||||||
$projectContents
|
</table>
|
||||||
</ul>
|
|
||||||
|
|
||||||
<h2>{$langues[$langue]['titrePage']}</h2>
|
<h2>{$langues[$langue]['titrePage']}</h2>
|
||||||
<ul class="tools">
|
<ul class="tools">
|
||||||
<li><a href="index.php?phpinfo=1">Phpinfo</a></li>
|
<li><a href="index.php?phpinfo=1">Phpinfo</a></li>
|
||||||
<li><a href="server-status">Server-status</a></li>
|
<li><a href="server-status">Server-status</a></li>
|
||||||
<li><a href="/dolibarr/support/onlinesupport.php">{$langues[$langue]['askhelp']}</a></li>
|
<li><a href="/dolibarr/support/index.php">{$langues[$langue]['askhelp']}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
build/exe/doliwamp/rundoliadmin.bat.install
Normal file
6
build/exe/doliwamp/rundoliadmin.bat.install
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
@echo off
|
||||||
|
REM Launch Dolibarr Admin center
|
||||||
|
REM ----------------------------
|
||||||
|
|
||||||
|
REM Go to admin center page
|
||||||
|
start "WAMPBROWSER" http://localhost:WAMPAPACHEPORT/
|
||||||
BIN
doc/images/doliadmin.ico
Normal file
BIN
doc/images/doliadmin.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 318 B |
@ -33,6 +33,11 @@ include_once("./inc.php");
|
|||||||
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
$setuplang=isset($_POST["selectlang"])?$_POST["selectlang"]:(isset($_GET["selectlang"])?$_GET["selectlang"]:'auto');
|
||||||
$langs->setDefaultLang($setuplang);
|
$langs->setDefaultLang($setuplang);
|
||||||
|
|
||||||
|
// TODO Send value from migrate choice
|
||||||
|
$targetversion=DOL_VERSION;
|
||||||
|
if (isset($_REQUEST["targetversion"])) $targetversion=$_REQUEST["targetversion"];
|
||||||
|
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("install");
|
$langs->load("install");
|
||||||
|
|
||||||
@ -162,9 +167,10 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_INSTALL const to '.DOL_VERSION, LOG_DEBUG);
|
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_INSTALL const to '.$targetversion, LOG_DEBUG);
|
||||||
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL'");
|
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_INSTALL'");
|
||||||
$db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_INSTALL','".DOL_VERSION."','chaine',0,'Dolibarr version when install',0)");
|
$db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_INSTALL','".$targetversion."','chaine',0,'Dolibarr version when install',0)");
|
||||||
|
$conf->global->MAIN_VERSION_LAST_INSTALL=$targetversion;
|
||||||
|
|
||||||
dolibarr_install_syslog('install/etape5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG);
|
dolibarr_install_syslog('install/etape5.php Remove MAIN_NOT_INSTALLED const', LOG_DEBUG);
|
||||||
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
|
$db->query("DELETE FROM llx_const WHERE name='MAIN_NOT_INSTALLED'");
|
||||||
@ -177,13 +183,17 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
print $langs->trans("Error")."<br>";
|
print $langs->trans("Error")."<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If upgrade
|
// If upgrade
|
||||||
if ($_POST["action"] == "upgrade")
|
elseif ($_POST["action"] == "upgrade")
|
||||||
{
|
{
|
||||||
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_UPGRADE const to value '.DOL_VERSION, LOG_DEBUG);
|
dolibarr_install_syslog('install/etape5.php set MAIN_VERSION_LAST_UPGRADE const to value '.$targetversion, LOG_DEBUG);
|
||||||
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_UPGRADE'");
|
$db->query("DELETE FROM llx_const WHERE name='MAIN_VERSION_LAST_UPGRADE'");
|
||||||
$db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_UPGRADE','".DOL_VERSION."','chaine',0,'Dolibarr version for last upgrade',0)");
|
$db->query("INSERT INTO llx_const(name,value,type,visible,note,entity) values('MAIN_VERSION_LAST_UPGRADE','".$targetversion."','chaine',0,'Dolibarr version for last upgrade',0)");
|
||||||
|
$conf->global->MAIN_VERSION_LAST_UPGRADE=$targetversion;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error('','install/etape5.php Unknown choice of action');
|
||||||
}
|
}
|
||||||
|
|
||||||
// May fail if parameter already defined
|
// May fail if parameter already defined
|
||||||
@ -197,10 +207,14 @@ if ($_POST["action"] == "set" || $_POST["action"] == "upgrade")
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
|
|
||||||
|
// Create lock file
|
||||||
|
|
||||||
// If first install
|
// If first install
|
||||||
if ($_POST["action"] == "set")
|
if ($_POST["action"] == "set")
|
||||||
{
|
{
|
||||||
// Fin install
|
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION))
|
||||||
|
{
|
||||||
|
// Install is finished
|
||||||
print $langs->trans("SystemIsInstalled")."<br>";
|
print $langs->trans("SystemIsInstalled")."<br>";
|
||||||
if (empty($force_install_lockinstall))
|
if (empty($force_install_lockinstall))
|
||||||
{
|
{
|
||||||
@ -208,7 +222,7 @@ if ($_POST["action"] == "set")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Open the file and erase the contents if any
|
// Install is finished, we create the lock file
|
||||||
$fp = fopen("../../install.lock", "w");
|
$fp = fopen("../../install.lock", "w");
|
||||||
fwrite($fp, "This is a lock file to prevent use of install pages");
|
fwrite($fp, "This is a lock file to prevent use of install pages");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
@ -217,12 +231,30 @@ if ($_POST["action"] == "set")
|
|||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
print $langs->trans("YouNeedToPersonalizeSetup")."<br><br>";
|
print $langs->trans("YouNeedToPersonalizeSetup")."<br><br>";
|
||||||
}
|
|
||||||
|
|
||||||
// If upgrade
|
print '<center><a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
||||||
if ($_POST["action"] == "upgrade")
|
print $langs->trans("GoToSetupArea");
|
||||||
|
print '</a></center>';
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Fin install
|
// If here MAIN_VERSION_LAST_UPGRADE is not empty
|
||||||
|
print $langs->trans("VersionLastUpgrade").': <b><font class="ok">'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</font></b><br>';
|
||||||
|
print $langs->trans("VersionProgram").': <b><font class="ok">'.DOL_VERSION.'</font></b>';
|
||||||
|
|
||||||
|
print "<br>";
|
||||||
|
|
||||||
|
print '<center><a href="'.$dolibarr_main_url_root .'/install/index.php">';
|
||||||
|
print $langs->trans("GoToUpgradePage");
|
||||||
|
print '</a></center>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// If upgrade
|
||||||
|
elseif ($_POST["action"] == "upgrade")
|
||||||
|
{
|
||||||
|
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE) || ($conf->global->MAIN_VERSION_LAST_UPGRADE == DOL_VERSION))
|
||||||
|
{
|
||||||
|
// Upgrade is finished
|
||||||
print $langs->trans("SystemIsUpgraded")."<br>";
|
print $langs->trans("SystemIsUpgraded")."<br>";
|
||||||
if (empty($force_install_lockinstall))
|
if (empty($force_install_lockinstall))
|
||||||
{
|
{
|
||||||
@ -230,35 +262,43 @@ if ($_POST["action"] == "upgrade")
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Open the file and erase the contents if any
|
// Upgrade is finished, we create the lock file
|
||||||
$fp = fopen("../../install.lock", "w");
|
$fp = fopen("../../install.lock", "w");
|
||||||
fwrite($fp, "This is a lock file to prevent use of install pages");
|
fwrite($fp, "This is a lock file to prevent use of install pages");
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ($_POST["action"] == "upgrade")
|
|
||||||
{
|
|
||||||
print '<center><a href="'.$dolibarr_main_url_root .'/index.php?mainmenu=home'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
print '<center><a href="'.$dolibarr_main_url_root .'/index.php?mainmenu=home'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
||||||
print $langs->trans("GoToDolibarr");
|
print $langs->trans("GoToDolibarr");
|
||||||
print '</a></center>';
|
print '</a></center>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<center><a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
// If here MAIN_VERSION_LAST_UPGRADE is not empty
|
||||||
print $langs->trans("GoToSetupArea");
|
print $langs->trans("VersionLastUpgrade").': <b><font class="ok">'.$conf->global->MAIN_VERSION_LAST_UPGRADE.'</font></b><br>';
|
||||||
|
print $langs->trans("VersionProgram").': <b><font class="ok">'.DOL_VERSION.'</font></b>';
|
||||||
|
|
||||||
|
print "<br>";
|
||||||
|
|
||||||
|
print '<center><a href="'.$dolibarr_main_url_root .'/install/index.php">';
|
||||||
|
print $langs->trans("GoToUpgradePage");
|
||||||
print '</a></center>';
|
print '</a></center>';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error('','install/etape5.php Unknown choice of action');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Clear cache files
|
// Clear cache files
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
|
|
||||||
dolibarr_install_syslog("Dolibarr install/setup finished", LOG_INFO);
|
dolibarr_install_syslog("install/etape5.php Dolibarr setup finished", LOG_INFO);
|
||||||
|
|
||||||
pFooter(1,$setuplang);
|
pFooter(1,$setuplang);
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user