Skip to content
Snippets Groups Projects
Commit 760bf6bf authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Add options to allow to run step2 install with sub-steps (for debug

purpose).
parent 7c99cfc0
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,11 @@ color: #000000;
border: 1px solid #888888 !important;
}
.blinkwait {
font-weight: bold;
text-decoration:blink !important;
}
.installchoices table tr td {
margin-left: 2px;
margin-right: 2px;
......
......@@ -125,11 +125,12 @@ if ($action == "set")
$requestnb=0;
// To disable some code
$createtables=1;
$createkeys=1;
$createfunctions=1;
$createdata=1;
// To disable some code, so you can call step2 with url like
// http://localhost/dolibarrnew/install/etape2.php?action=set&createtables=0&createkeys=0&createfunctions=0&createdata=llx_20_c_departements
$createtables=isset($_GET['createtables'])?GETPOST('createtables'):1;
$createkeys=isset($_GET['createkeys'])?GETPOST('createkeys'):1;
$createfunctions=isset($_GET['createfunctions'])?GETPOST('createfunction'):1;
$createdata=isset($_GET['createdata'])?GETPOST('createdata'):1;
// To say sql requests are escaped for mysql so we need to unescape them
......@@ -497,8 +498,12 @@ if ($action == "set")
{
if (preg_match('/\.sql$/i',$file) && preg_match('/^llx_/i',$file))
{
$tablefound++;
$tabledata[]=$file;
//print 'x'.$file.'-'.$createdata.'<br>';
if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i',$file))
{
$tablefound++;
$tabledata[]=$file;
}
}
}
closedir($handle);
......@@ -539,7 +544,7 @@ if ($action == "set")
}
fclose($fp);
dolibarr_install_syslog("Found ".$linefound." records, defined ".count($arrayofrequests)." groups.",LOG_DEBUG);
dolibarr_install_syslog("Found ".$linefound." records, defined ".count($arrayofrequests)." group(s).",LOG_DEBUG);
// We loop on each requests
foreach($arrayofrequests as $buffer)
......@@ -585,11 +590,15 @@ if ($action == "set")
}
}
print '</table>';
$db->close();
}
else
{
print 'Parameter action=set not defined';
}
dolibarr_install_syslog("--- install/etape2.php end", LOG_INFO);
pFooter(!$ok,$setuplang);
$db->close();
?>
\ No newline at end of file
......@@ -370,7 +370,7 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='')
print '<div class="nextbutton" id="nextbutton"><input type="submit" value="'.$langs->trans("NextStep").' ->"';
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
print '></div>';
print '<div style="visibility: hidden;" class="pleasewait" id="pleasewait"><br><blink>'.$langs->trans("NextStepMightLastALongTime").'</blink><br><br>'.$langs->trans("PleaseBePatient").'</div>';
print '<div style="visibility: hidden;" class="pleasewait" id="pleasewait"><br>'.$langs->trans("NextStepMightLastALongTime").'<br><br><div class="blinkwait">'.$langs->trans("PleaseBePatient").'</div></div>';
}
if ($setuplang)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment