Add options to allow to run step2 install with sub-steps (for debug
purpose).
This commit is contained in:
parent
7c99cfc06c
commit
760bf6bfbc
@ -86,6 +86,11 @@ color: #000000;
|
|||||||
border: 1px solid #888888 !important;
|
border: 1px solid #888888 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.blinkwait {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration:blink !important;
|
||||||
|
}
|
||||||
|
|
||||||
.installchoices table tr td {
|
.installchoices table tr td {
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
|
|||||||
@ -125,11 +125,12 @@ if ($action == "set")
|
|||||||
|
|
||||||
$requestnb=0;
|
$requestnb=0;
|
||||||
|
|
||||||
// To disable some code
|
// To disable some code, so you can call step2 with url like
|
||||||
$createtables=1;
|
// http://localhost/dolibarrnew/install/etape2.php?action=set&createtables=0&createkeys=0&createfunctions=0&createdata=llx_20_c_departements
|
||||||
$createkeys=1;
|
$createtables=isset($_GET['createtables'])?GETPOST('createtables'):1;
|
||||||
$createfunctions=1;
|
$createkeys=isset($_GET['createkeys'])?GETPOST('createkeys'):1;
|
||||||
$createdata=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
|
// To say sql requests are escaped for mysql so we need to unescape them
|
||||||
@ -496,11 +497,15 @@ if ($action == "set")
|
|||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (preg_match('/\.sql$/i',$file) && preg_match('/^llx_/i',$file))
|
if (preg_match('/\.sql$/i',$file) && preg_match('/^llx_/i',$file))
|
||||||
|
{
|
||||||
|
//print 'x'.$file.'-'.$createdata.'<br>';
|
||||||
|
if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i',$file))
|
||||||
{
|
{
|
||||||
$tablefound++;
|
$tablefound++;
|
||||||
$tabledata[]=$file;
|
$tabledata[]=$file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -539,7 +544,7 @@ if ($action == "set")
|
|||||||
}
|
}
|
||||||
fclose($fp);
|
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
|
// We loop on each requests
|
||||||
foreach($arrayofrequests as $buffer)
|
foreach($arrayofrequests as $buffer)
|
||||||
@ -585,11 +590,15 @@ if ($action == "set")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
}
|
||||||
$db->close();
|
else
|
||||||
|
{
|
||||||
|
print 'Parameter action=set not defined';
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_install_syslog("--- install/etape2.php end", LOG_INFO);
|
dolibarr_install_syslog("--- install/etape2.php end", LOG_INFO);
|
||||||
|
|
||||||
pFooter(!$ok,$setuplang);
|
pFooter(!$ok,$setuplang);
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
@ -370,7 +370,7 @@ function pFooter($nonext=0,$setuplang='',$jscheckfunction='')
|
|||||||
print '<div class="nextbutton" id="nextbutton"><input type="submit" value="'.$langs->trans("NextStep").' ->"';
|
print '<div class="nextbutton" id="nextbutton"><input type="submit" value="'.$langs->trans("NextStep").' ->"';
|
||||||
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
|
if ($jscheckfunction) print ' onClick="return '.$jscheckfunction.'();"';
|
||||||
print '></div>';
|
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)
|
if ($setuplang)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user