Continued fixing #42

This commit is contained in:
Rooty 2020-12-25 06:06:52 +01:00
parent d2f0644ea4
commit 39dc9722f1
7 changed files with 238 additions and 247 deletions

View File

@ -1,3 +1,9 @@
#Titres des pages
actionInstallTitlePage = "Téléchargement et Mises à jour de la plateforme et des outils"
listInstallTitlePage = "Installation et Désinstallation des paquets"
beforeInstallTitlePage = "Vérification des dépendances et des opérations à effectuer"
bkpManageInstallTitlePage = "Gestion des sauvegardes de bases de données et des sources"
# Formulaire de configuration
TxtFtp = "Ftp de récupération des installations/upgrades : "
TxtLogin = "Identifiant du ftp : "
@ -107,6 +113,7 @@ BtnFinUninstall = "Suivant"
TxtFinUninstall = "L'ensemble des fichiers et répertoires relatifs à l'élément sélectionné a été supprimé, veuillez passer à l'étape suivante pour finaliser la désinstallation."
TxtUninstall = "Avant de désinstaller ce composant assurez-vous de bien avoir effectué une sauvegarde avant de continuer."
TxtFinInstall = "Fin du processus d'installation de votre paquet, veuillez passer à l'étape suivante pour obtenir un récapitulatif."
TxtBackupTitle = "Sauvegarde du système"
TxtBackup = "Désirez vous faire une sauvegarde de votre système ? Cette sauvegarde permettra de restaurer vos données et/ou vos anciens scripts (cette option peut prendre un espace disque important)."
SuccessCopy="Copie réussie"
TxtStatutErase="Etat de la suppression"

View File

@ -1,50 +1,45 @@
<div class="tabe">
<ul>
<ul class="nav container-fluid nav-tabs w-75 border-bottom-0">
<mx:bloc id="TabeB">
<li mXattribut="class:TabeView">
<a mXattribut="href:UrlTabeView" mXattribut="class:ClassTabeView">
<a mXattribut="class:ClassTabeView" mXattribut="href:UrlTabeView">
<i class="mr-1 fa fa-lg fa-<mx:text id="pictoTabe"/>"></i>
<mx:text id="TabeNameView"/>
</a>
</li>
</mx:bloc id="TabeB">
</ul>
<div class="tab-content container-fluid px-2 py-2 border w-75">
<div class="card w-100 text-center">
<div class="card-header">
<h3><mx:text id="TabeBTabeNameView"/> (<mx:text id="TxtBeforeInstallTitle"/>)</h3>
</div>
<div class="box">
<div class="header"><h2><mx:text id="TabeBTabeNameView"/> (<mx:text id="TxtBeforeInstallTitle"/>)</h2>
<div class="card-title mx-auto w-75">
<p><mx:text id="TxtBeforeInstallText"/></p>
<p><mx:text id="Installeur"/></p>
</div>
<fieldset class="fieldsetinstall">
<legend><mx:text id="TxtLegendSuiviInstall"/></legend>
<div class="colorEtape"><strong><mx:text id="TxtEtape1"/></strong><mx:text id="TxtEtape1Install"/></div>
<div><strong><mx:text id="TxtEtape2"/></strong><mx:text id="TxtEtape2Install"/></div>
<div><strong><mx:text id="TxtEtape3"/></strong><mx:text id="TxtEtape3Install"/></div>
</fieldset>
<fieldset class="fieldset">
<legend><mx:text id="TxtFileCopyTitle"/></legend>
<div class="legendcolor">
<div><strong><mx:text id="TxtLegend"/></strong></div>
<div class="lnColor3">&nbsp;</div><div><mx:text id="TxtFileToInstall"/></div>
<div class="lnColor1">&nbsp;</div><div><mx:text id="TxtFileNotInstalled"/></div>
<div class="lnColor2">&nbsp;</div><div><mx:text id="TxtFileNotRight"/></div>
<div class="linkview">&nbsp;</div><div><mx:text id="BtnView"/></div>
<div class="card-header">
<h3><mx:text id="TxtFileCopyTitle"/></h3>
</div>
<table class="table">
<div class="card-body">
<table class="table table-sm table-responsive-sm table-bordered table-striped table-hover" id="tabListScripts" mXattribut="summary:TxtListScripts">
<thead class="thead-default">
<tr>
<th><mx:text id="TxtFileSrc"/></th>
<th><mx:text id="TxtFileDest"/></th>
<th><mx:text id="TxtVersionSrc"/></th>
<th><mx:text id="TxtVersionDest"/></th>
</tr>
</thead>
<tbody>
<mx:bloc id="BLOCFIC">
<tr mXattribut="class:lineStyle">
<td mXattribut="class:class"><mx:text id="ficSrc"/></td>
<tr>
<td><mx:text id="ficSrc"/></td>
<td><mx:text id="ficDest"/></td>
<td><mx:text id="versionSrc"/></td>
<td><mx:text id="versionDest"/></td>
</tr>
</mx:bloc id="BLOCFIC">
<mx:bloc id="BLOCBD">
<tr>
<td><a href="#" onclick="javascript:visible('detail');"><img src="data/template/default/media/picto/view.gif" alt="picto" /></a></td>
<td colspan="3"><mx:text id="TxtBd"/> <mx:text id="typeBD"/> <mx:text id="NoDatabase"/></td>
@ -58,50 +53,29 @@
</table>
</td>
</tr>
<mx:bloc id="HIDDEN">
<tr>
<form name="next" mXattribut="action:urlAction" method="post">
<th colspan="2" class="thsmall"><mx:text id="TxtBackup"/></th>
<th class="action"><div class="boxcheck"><input type="checkbox" value="1" name="backup" id="backup"/></div></th>
<th class="action"><input type="submit" mXattribut="value:BtnIntall" class="ok"/></th>
</form>
</tr>
</mx:bloc id="HIDDEN">
<tr>
<td colspan="4"><b><mx:text id="status"/></b></td>
</tr>
</mx:bloc id="BLOCBD">
</tbody>
</table>
</fieldset>
</div>
<script language="Javascript" type="text/javascript">
<!--
function visible(element)
{
// cas ns6
if (document.getElementById)
{
if (document.getElementById(element).style.display=='none')
{
document.getElementById(element).style.display='';
}
else
{
document.getElementById(element).style.display='none';
}
}
// cas ie 5.5
else if (document.all)
{
if (document.all[element].style.display=='none')
{
document.all[element].style.display='';
}
else
{
document.all[element].style.display='none';
}
}
}
//-->
</script>
<mx:bloc id="HIDDEN">
<form id="fmnext" role="form" class="form text-center px-0" method="post" mXattribut="action:urlAction">
<div class="card-header">
<h3><mx:text id="TxtBackupTitle"/></h3>
</div>
<div class="card-body">
<div class="row border-0 bg-white text-center mb-2">
<span><mx:text id="TxtBackup"/></span><span><input type="checkbox" value="1" name="backup" id="backup"/></span>
</div>
</div>
<div class="card-footer border-0 bg-white text-center">
<input type="submit" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" id="install" name="BtnIntall" MxAttribut="value:BtnIntall"/>
</div>
</form>
</mx:bloc id="HIDDEN">
<div class="card-body">
<div class="row mb-2">
<b><mx:text id="status"/></b>
</div>
</div>
</div>
</div>

View File

@ -1,98 +1,76 @@
<div class="tabe">
<ul>
<ul class="nav container-fluid nav-tabs w-75 border-bottom-0">
<mx:bloc id="TabeB">
<li mXattribut="class:TabeView">
<a mXattribut="href:UrlTabeView" mXattribut="class:ClassTabeView">
<a mXattribut="class:ClassTabeView" mXattribut="href:UrlTabeView">
<i class="mr-1 fa fa-lg fa-<mx:text id="pictoTabe"/>"></i>
<mx:text id="TabeNameView"/>
</a>
</li>
</mx:bloc id="TabeB">
</ul>
<div class="tab-content container-fluid px-2 py-2 border w-75">
<div class="card w-100 text-center">
<div class="card-header">
<h3><mx:text id="TabeBTabeNameView"/> (<mx:text id="TxtInstallTitle"/>)</h3>
</div>
<div class="box">
<div class="header"><h2><mx:text id="TabeBTabeNameView"/> (<mx:text id="TxtInstallTitle"/>)</h2>
<div class="card-title mx-auto w-75">
<p><mx:text id="TxtInstallText"/></p>
</div>
<fieldset class="fieldsetinstall">
<legend><mx:text id="TxtLegendSuiviInstall"/></legend>
<div><strong><mx:text id="TxtEtape1"/></strong><mx:text id="TxtEtape1Install"/></div>
<div class="colorEtape"><strong><mx:text id="TxtEtape2"/></strong><mx:text id="TxtEtape2Install"/></div>
<div><strong><mx:text id="TxtEtape3"/></strong><mx:text id="TxtEtape3Install"/></div>
</fieldset>
<fieldset class="fieldset">
<legend><mx:text id="TxtFileCopyTitle"/></legend>
<div class="legendcolor">
<div><strong><mx:text id="TxtLegend"/></strong></div>
<div class="lnColor3">&nbsp;</div><div><mx:text id="TxtFileHaveBeenToInstall"/></div>
<div class="lnColor1">&nbsp;</div><div><mx:text id="TxtFileNotInstalled"/></div>
<div class="card-header">
<h3><mx:text id="TxtFileCopyTitle"/></h3>
</div>
<table class="table">
<div class="card-body">
<table class="table table-sm table-responsive-sm table-bordered table-striped table-hover" id="tabListFiles" mXattribut="summary:TxtListScripts">
<thead class="thead-default">
<tr>
<th><mx:text id="TxtFileSrc"/></th>
<th><mx:text id="TxtFileDest"/></th>
<th><mx:text id="TxtStatutCopie"/></th>
</tr>
</thead>
<tbody>
<mx:bloc id="BLOCFIC">
<tr mXattribut="class:lineStyle">
<td mXattribut="class:class"><mx:text id="ficSrc"/></td>
<tr>
<td><mx:text id="ficSrc"/></td>
<td><mx:text id="ficDest"/></a></td>
<td><mx:text id="statutfic"/></a></td>
</tr>
</mx:bloc id="BLOCFIC">
</tbody>
</table>
<table class="table">
<mx:bloc id="TABLEBD">
<table class="table table-sm table-responsive-sm table-bordered table-striped table-hover" id="tabListBDScripts" mXattribut="summary:TxtListScripts">
<thead class="thead-default">
<tr>
<th><mx:text id="TxtBD"/></th>
<th><mx:text id="TxtStatutCopie"/></th>
</tr>
</thead>
<tbody>
<mx:bloc id="BLOCBD">
<tr mXattribut="class:lineStyle">
<td mXattribut="class:class"><mx:text id="nomficDB"/></td>
<tr>
<td><mx:text id="nomficDB"/></td>
<td><mx:text id="statutDB"/></td>
</tr>
</mx:bloc id="BLOCBD">
</tbody>
</table>
</mx:bloc id="TABLEBD">
</div>
<mx:bloc id="HIDDEN">
<form name="next" mXattribut="action:urlAction" method="post">
<tr>
<th class="thsmall"><mx:text id="TxtFinInstall"/></th>
<th class="action"><input type="submit" mXattribut="value:BtnFinIntall" class="next"/></th>
</tr>
<form id="fmnext" role="form" class="form text-center px-0" method="post" mXattribut="action:urlAction">
<!--<div class="card-header">
<h3><mx:text id="TxtFinInstallTitle"/></h3>
</div>-->
<div class="card-body">
<div class="row border-0 bg-white text-center mb-2">
<span><mx:text id="TxtFinInstall"/></span>
</div>
</div>
<div class="card-footer border-0 bg-white text-center">
<input type="submit" class="btn btn-outline-secondary btn-lg btn-sm" aria-pressed="true" id="install" name="BtnFinIntall" MxAttribut="value:BtnFinIntall"/>
</div>
</form>
</mx:bloc id="HIDDEN">
</table>
</fieldset>
</div>
<script language="Javascript">
<!--
function visible(element)
{
// cas ns6
if (document.getElementById)
{
if (document.getElementById(element).style.display=='none')
{
document.getElementById(element).style.display='';
}
else
{
document.getElementById(element).style.display='none';
}
}
// cas ie 5.5
else if (document.all)
{
if (document.all[element].style.display=='none')
{
document.all[element].style.display='';
}
else
{
document.all[element].style.display='none';
}
}
}
//-->
</script>
</div>

View File

@ -33,14 +33,14 @@
<tr>
<td><mx:text id="name"/></td>
<td><mx:text id="version"/></td>
<td>
<a mXattribut="href:urlDetail"><img src="data/template/default/media/picto/view.gif" border="0"/></a>
<td class="float-right">
<span><a mXattribut="href:urlDetail"><span class="fa fa-lg fa-eye"></span></a></span>
<mx:bloc id="INSTALL">
<a mXattribut="href:urlInstall"><img src="data/template/default/media/picto/add.gif" border="0"/></a>
<a mXattribut="href:urlDeleteSrc"><img src="data/template/default/media/picto/delete.gif" border="0"/></a>
<span><a mXattribut="href:urlInstall"><span class="fa fa-lg fa-plus"></span></a></span>
<span><a mXattribut="href:urlDeleteSrc"><span class="fa fa-lg fa-trash"></span></a></span>
</mx:bloc id="INSTALL">
<mx:bloc id="UNINSTALL">
<a mXattribut="href:urlUnInstall"><img src="data/template/default/media/picto/delete.gif" border="0"/></a>
<span><a mXattribut="href:urlUnInstall"><span class="fa fa-lg fa-minus"></span></a></span>
</mx:bloc id="UNINSTALL">
</td>
</tr>
@ -70,7 +70,7 @@
<tr>
<td><mx:text id="name"/></td>
<td><mx:text id="version"/></td>
<td>
<td class="float-right">
<a mXattribut="href:urlDetail"><img src="data/template/default/media/picto/view.gif" border="0"/></a>
<mx:bloc id="INSTALL">
<a mXattribut="href:urlInstall"><img src="data/template/default/media/picto/add.gif" border="0"/></a>
@ -107,7 +107,7 @@
<tr>
<td><mx:text id="name"/></td>
<td><mx:text id="version"/></td>
<td>
<td class="float-right">
<a mXattribut="href:urlDetail"><img src="data/template/default/media/picto/view.gif" border="0"/></a>
<mx:bloc id="INSTALL">
<a mXattribut="href:urlInstall"><img src="data/template/default/media/picto/add.gif" border="0"/></a>
@ -144,7 +144,7 @@
<tr>
<td><mx:text id="name"/></td>
<td><mx:text id="version"/></td>
<td>
<td class="float-right">
<a mXattribut="href:urlDetail"><img src="data/template/default/media/picto/view.gif" border="0"/></a>
<mx:bloc id="INSTALL">
<a mXattribut="href:urlInstall"><img src="data/template/default/media/picto/add.gif" border="0"/></a>
@ -181,7 +181,7 @@
<tr>
<td><mx:text id="name"/></td>
<td><mx:text id="version"/></td>
<td>
<td class="float-right">
<a mXattribut="href:urlDetail"><img src="data/template/default/media/picto/view.gif" border="0"/>
<mx:bloc id="INSTALL">
<a mXattribut="href:urlInstall"><img src="data/template/default/media/picto/add.gif" border="0"/></a>

View File

@ -101,6 +101,26 @@ var $dbUninstallFile= "uninstall";
*/
function __beforeInstall($url)
{
/* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupèration des codes par defaut */
mxPageTitle("beforeInstallTitlePage");
$arrayCallCss = array();
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";
mxCallCss($arrayCallCss);
$arrayCallJs = array();
$arrayCallJs[] = "data/javascript/jquery.dataTables/1.10.22/jquery.dataTables.min.js";
$arrayCallJs[] = "data/javascript/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.js";
mxCallJs($arrayCallJs);
$arrayRawJs[] = "\$(document).ready(function(){\$('#tabListScripts').dataTable({\"bPaginate\": true,\"bFilter\": false,\"bInfo\": true,\"sPaginationType\": \"full_numbers\",\"bAutoWidth\": false,\"bLengthChange\": false,\"aaSorting\": [[ 1, \"asc\" ]],\"iDisplayLength\": 10,\"oLanguage\": {\"sUrl\": \"data/message/".$currentCode."/datatables.txt\"}});});";
$arrayRawJs[] = "function visible(element){if(document.getElementById){if(document.getElementById(element).style.display=='none'){document.getElementById(element).style.display='';}else{document.getElementById(element).style.display='none';}}else if(document.all){if(document.all[element].style.display=='none'){document.all[element].style.display='';}else{document.all[element].style.display='none';}}}";
mxRawJs($arrayRawJs);
includePackage ("backup.php");
$backup =new backup();
$tabficini =array();
@ -160,18 +180,19 @@ var $dbUninstallFile= "uninstall";
if ($checkBd==1)
{
//Affichage du fichier sql dans une div
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("ficBD",$sourcepath."install.".DATA_SOURCE_SQL_TYPE.".sql");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("typeBD", DATA_SOURCE_SQL_TYPE);
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.ficBD",$sourcepath."install.".DATA_SOURCE_SQL_TYPE.".sql");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.typeBD", DATA_SOURCE_SQL_TYPE);
//Lecture du fichier et affichage du contenu
$fichier=new File($sourcepath."install.".DATA_SOURCE_SQL_TYPE.".sql");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("scriptBD",str_replace("\n", "<br/>", $fichier->readAll()));
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.scriptBD",str_replace("\n", "<br/>", $fichier->readAll()));
$fichier->close();
}else if($checkBd==2){
// L'installation à besoin d'une BD... mais n'a pas le type courant -> erreur
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("NoDatabase", getMessage("WrongTypeBd"));
}
else if ($checkBd==0){
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("NoDatabase", getMessage("NoBd"));
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("BLOCBD", "delete");
// $GLOBALS["SYSTEM_TEMPLATE"]-> MxText("NoDatabase", getMessage("NoBd"));
}
$msg="";
@ -258,6 +279,27 @@ var $dbUninstallFile= "uninstall";
*/
function __install($installName, $doBackup, $url)
{
/* gestion du lib en fonction de la langue courante */
$currentCode=$GLOBALS["SYSTEM_USER_SESSION"]->langue->getCode();
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupèration des codes par defaut */
mxPageTitle("beforeInstallTitlePage");
$arrayCallCss = array();
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";
mxCallCss($arrayCallCss);
$arrayCallJs = array();
$arrayCallJs[] = "data/javascript/jquery.dataTables/1.10.22/jquery.dataTables.min.js";
$arrayCallJs[] = "data/javascript/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.js";
mxCallJs($arrayCallJs);
$arrayRawJs[] = "\$(document).ready(function(){\$('#tabListFiles').dataTable({\"bPaginate\": false,\"bFilter\": false,\"bInfo\": false,\"bAutoWidth\": false,\"bLengthChange\": false,\"aaSorting\": [[ 1, \"asc\" ]],\"oLanguage\": {\"sUrl\": \"data/message/".$currentCode."/datatables.txt\"}});});";
$arrayRawJs[] = "\$(document).ready(function(){\$('#tabListBDScripts').dataTable({\"bPaginate\": false,\"bFilter\": false,\"bInfo\": false,\"bAutoWidth\": false,\"bLengthChange\": false,\"aaSorting\": [[ 1, \"asc\" ]],\"oLanguage\": {\"sUrl\": \"data/message/".$currentCode."/datatables.txt\"}});});";
$arrayRawJs[] = "function visible(element){if(document.getElementById){if(document.getElementById(element).style.display=='none'){document.getElementById(element).style.display='';}else{document.getElementById(element).style.display='none';}}else if(document.all){if(document.all[element].style.display=='none'){document.all[element].style.display='';}else{document.all[element].style.display='none';}}}";
mxRawJs($arrayRawJs);
//Récupération du contenu du fichier ini.
includePackage ("backup.php");
$backup = new backup();
@ -354,20 +396,22 @@ var $dbUninstallFile= "uninstall";
//Création BD
if (file_exists($sourcepath.$this->dbInstallFile.".". DATA_SOURCE_SQL_TYPE .".sql"))
{
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.nomficDB",$this->dbInstallFile.".". DATA_SOURCE_SQL_TYPE .".sql" );
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("TABLEBD.BLOCBD.nomficDB",$this->dbInstallFile.".". DATA_SOURCE_SQL_TYPE .".sql" );
//Execution du script de création de la bd
if ($backup->restorebackUpDB($sourcepath,$this->dbInstallFile.".". DATA_SOURCE_SQL_TYPE .".sql"))
{
$GLOBALS["SYSTEM_TEMPLATE"]-> MxAttribut("BLOCBD.class", "lnColor3");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.statutDB", getMessage("SuccessBD"));
$GLOBALS["SYSTEM_TEMPLATE"]-> MxAttribut("TABLEBD.BLOCBD.class", "lnColor3");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("TABLEBD.BLOCBD.statutDB", getMessage("SuccessBD"));
}
else
{
$GLOBALS["SYSTEM_TEMPLATE"]-> MxAttribut("BLOCBD.class", "lnColor1");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("BLOCBD.statutDB", getMessage("ErrorBD"));
$GLOBALS["SYSTEM_TEMPLATE"]-> MxAttribut("TABLEBD.BLOCBD.class", "lnColor1");
$GLOBALS["SYSTEM_TEMPLATE"]-> MxText("TABLEBD.BLOCBD.statutDB", getMessage("ErrorBD"));
return "ErrorCreateDB";
}
} else {
$GLOBALS["SYSTEM_TEMPLATE"]->MxBloc("TABLEBD", "delete");
}
return "";
}

View File

@ -43,7 +43,7 @@ Class InstallFactory
*/
function getInstallDriver($pkgName, $rootDir){
$path=$rootDir;
$tmp=split("-", $pkgName);
$tmp=mb_split("-", $pkgName);
if ( (is_dir($path)) && (file_exists($path."/installdriver".$tmp[1].".php")) ){
# on utilise le driver de l'install
include_once($path."/installdriver".$tmp[1].".php");

View File

@ -84,7 +84,7 @@ Class InstallManager extends CoordinationObj
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupèration des codes par defaut */
mxPageTitle("actionAdminTitlePage");
mxPageTitle("actionInstallTitlePage");
$arrayCallCss = array();
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";
@ -139,8 +139,6 @@ Class InstallManager extends CoordinationObj
{
//Listing du rep distant
$tabdir=$connection->getContentDir(".");
// var_dump($tabdir);
// exit(0);
//Teste de l'existence des packages et telechargement si on les possede pas deja
for ($i=0;$i<count($tabdir);$i++)
@ -148,8 +146,6 @@ Class InstallManager extends CoordinationObj
//On recupere le nom du package distant et on vérifie si on les possede ou pas
if (($tabdir[$i][1]=="Directory"))
{
// var_dump($tabdir[$i][2]);
// exit(0);
//Si pas installer affichage de la liste des packages
$tabPackage[]=$tabdir[$i][2];
$tabSize[$tabdir[$i][2]]=$connection->getSize($tabdir[$i][0]."/".$tabdir[$i][2].".tar");
@ -187,10 +183,6 @@ Class InstallManager extends CoordinationObj
}
}
// var_dump($tabDownLoadCp);
// var_dump($tabPackage);
// exit(0);
//Teste de l'existence des packages et telechargement si on les possede pas deja
$nb=count($tabPackage);
for ($i=0;$i<$nb;$i++)
@ -210,9 +202,6 @@ Class InstallManager extends CoordinationObj
$GLOBALS["SYSTEM_TEMPLATE"]->MxAttribut("urlUpload", formatUrl($this->getId(), "InstallManager", "uploadInstall"));
$tabDel=array();
// var_dump($tabPackage);
// exit(0);
// if( is_array($tabPackage) && count($tabPackage) > 0 )
// {
foreach($tabPackage as $key=>$val)
@ -346,7 +335,7 @@ Class InstallManager extends CoordinationObj
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupèration des codes par defaut */
mxPageTitle("actionAdminTitlePage");
mxPageTitle("listInstallTitlePage");
$arrayCallCss = array();
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";
@ -489,12 +478,8 @@ Class InstallManager extends CoordinationObj
* @access public
* @return chaine code message
*/
function uploadInstall(){
// var_dump($_FILES);
// var_dump($_POST);
// exit(0);
function uploadInstall()
{
includePackage("upload.php");
includePackage("backup.php");
@ -597,19 +582,22 @@ Class InstallManager extends CoordinationObj
}
# Décompression du package
includePackage("archive.php");
includePackage("backup.php");
$backup=new backup();
$chmod=$backup->checkConfigForPerms();
$archive = new tar_file("../packagesrc/".$detailId.".tar");
$archive->set_options(array("basedir" => ($GLOBALS["CONF_DATA_PATH"]."data/upload/install/package/"), "overwrite" => 1) );
$archive->extract_files($chmod);
if (count($archive->error)!=0){
// includePackage("archive.php");
// includePackage("backup.php");
// $backup=new backup();
// $chmod=$backup->checkConfigForPerms();
try {
$archive = new PharData($GLOBALS["CONF_DATA_PATH"]."data/upload/install/packagesrc/".$detailId.".tar");
$archive->extractTo($GLOBALS["CONF_DATA_PATH"]."data/upload/install/package/".$detailId, null, true);
} catch (Exception $e) {
# Décompression non valide
systemRedirect(formatUrl($this->getId(),"InstallManager", "listInstall", "wrongArgument"));
die();
return "";
}
#TODO : Check and define scripts permissions
// $archive->extract_files($chmod);
# Construction du manager...
includeDep("installmanager/installfactory.php");
includeDep("installmanager/installdriver.php");
@ -816,7 +804,7 @@ Class InstallManager extends CoordinationObj
$defaultCode=$GLOBALS["SYSTEM_DEFAULT_LANGUAGE_CODE"];
/* fin récupèration des codes par defaut */
mxPageTitle("actionAdminTitlePage");
mxPageTitle("bkpManageInstallTitlePage");
$arrayCallCss = array();
$arrayCallCss[] = "data/css/dataTables.bootstrap4/1.10.22/dataTables.bootstrap4.min.css";