mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-10 11:31:26 +01:00
css install
This commit is contained in:
@@ -160,9 +160,10 @@ function versiondolibarrarray()
|
|||||||
* @param int $linelengthlimit Limit for length of each line (Use 0 if unknown, may be faster if defined)
|
* @param int $linelengthlimit Limit for length of each line (Use 0 if unknown, may be faster if defined)
|
||||||
* @param int $nocommentremoval Do no try to remove comments (in such a case, we consider that each line is a request, so use also $linelengthlimit=0)
|
* @param int $nocommentremoval Do no try to remove comments (in such a case, we consider that each line is a request, so use also $linelengthlimit=0)
|
||||||
* @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value
|
* @param int $offsetforchartofaccount Offset to use to load chart of account table to update sql on the fly to add offset to rowid and account_parent value
|
||||||
|
* @param int $colspan 2=Add a colspan=2 on td
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0)
|
function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handler = '', $okerror = 'default', $linelengthlimit = 32768, $nocommentremoval = 0, $offsetforchartofaccount = 0, $colspan = 0)
|
||||||
{
|
{
|
||||||
global $db, $conf, $langs, $user;
|
global $db, $conf, $langs, $user;
|
||||||
|
|
||||||
@@ -282,13 +283,9 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>';
|
||||||
print '<div class="error">'.$langs->trans("Failed to get max rowid for ".$table)."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
@@ -337,7 +334,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
|
|
||||||
// Add log of request
|
// Add log of request
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr class="trforrunsql"><td class="tdtop opacitymedium">'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
|
print '<tr class="trforrunsql"><td class="tdtop opacitymedium"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
|
||||||
}
|
}
|
||||||
dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
|
dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
|
||||||
$sqlmodified = 0;
|
$sqlmodified = 0;
|
||||||
@@ -371,13 +368,9 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
$cursor = $reg[1];
|
$cursor = $reg[1];
|
||||||
if (empty($listofinsertedrowid[$cursor])) {
|
if (empty($listofinsertedrowid[$cursor])) {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>';
|
||||||
print '<div class="error">'.$langs->trans("FileIsNotCorrect")."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>';
|
|
||||||
}
|
}
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
@@ -437,22 +430,14 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
|
|||||||
// Is it an error we accept
|
// Is it an error we accept
|
||||||
if (!in_array($errno, $okerrors)) {
|
if (!in_array($errno, $okerrors)) {
|
||||||
if (!$silent) {
|
if (!$silent) {
|
||||||
print '<tr><td class="tdtop" colspan="2">';
|
print '<tr><td class="tdtop"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>';
|
||||||
}
|
print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div>";
|
||||||
if (!$silent) {
|
print '</td></tr>'."\n";
|
||||||
print '<div class="error">'.$langs->trans("Error")." ".$db->errno().": ".$newsql."<br>".$db->error()."</div></td>";
|
|
||||||
}
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>'."\n";
|
|
||||||
}
|
}
|
||||||
dol_syslog('Admin.lib::run_sql Request '.($i + 1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
|
dol_syslog('Admin.lib::run_sql Request '.($i + 1)." Error ".$db->errno()." ".$newsql."<br>".$db->error(), LOG_ERR);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$silent) {
|
|
||||||
print '</tr>'."\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,9 +59,11 @@ table.main-inside {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
/* border-bottom: 1px solid #ccc; */
|
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
table.main-inside-borderbottom {
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
table.main {
|
table.main {
|
||||||
padding-left: 6px;
|
padding-left: 6px;
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ if ($action == "set") {
|
|||||||
|
|
||||||
$morehtml = '';
|
$morehtml = '';
|
||||||
|
|
||||||
pHeader($langs->trans("SetupEnd"), "step5");
|
pHeader($langs->trans("SetupEnd"), "step5", 'set', '', '', 'main-inside main-inside-borderbottom');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Test if we can run a first install process
|
// Test if we can run a first install process
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ if (!$versionfrom && !$versionto) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.'&versionto='.$versionto);
|
pHeader('', "upgrade2", GETPOST('action', 'aZ09'), 'versionfrom='.$versionfrom.'&versionto='.$versionto, '', 'main-inside main-inside-borderbottom');
|
||||||
|
|
||||||
$actiondone = 0;
|
$actiondone = 0;
|
||||||
|
|
||||||
@@ -348,9 +348,10 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n";
|
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").'</td><td class="right">'.$file.'</td></tr>'."\n";
|
||||||
|
|
||||||
// Run sql script
|
// Run sql script
|
||||||
$ok = run_sql($dir.$file, 0, '', 1);
|
$ok = run_sql($dir.$file, 0, '', 1, '', 'default', 32768, 0, 0, 2);
|
||||||
$listoffileprocessed[$dir.$file] = $dir.$file;
|
$listoffileprocessed[$dir.$file] = $dir.$file;
|
||||||
|
|
||||||
|
|
||||||
// Scan if there is migration scripts that depends of Dolibarr version
|
// Scan if there is migration scripts that depends of Dolibarr version
|
||||||
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql")
|
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql")
|
||||||
$modulesfile = array();
|
$modulesfile = array();
|
||||||
@@ -369,12 +370,14 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (count($modulesfile)) {
|
||||||
|
print '<tr><td colspan="2"><hr style="border-color: #ccc; border-top-style: none;"></td></tr>';
|
||||||
|
|
||||||
foreach ($modulesfile as $modulefilelong => $modulefileshort) {
|
foreach ($modulesfile as $modulefilelong => $modulefileshort) {
|
||||||
if (in_array($modulefilelong, $listoffileprocessed)) {
|
if (in_array($modulefilelong, $listoffileprocessed)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="2"><hr></td></tr>';
|
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
|
print '<tr><td class="nowrap">'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td class="right">'.$modulefileshort.'</td></tr>'."\n";
|
||||||
|
|
||||||
// Run sql script
|
// Run sql script
|
||||||
@@ -384,6 +387,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ if ((!$versionfrom || preg_match('/version/', $versionfrom)) && (!$versionto ||
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
pHeader('', 'step5', GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'upgrade', 'versionfrom='.$versionfrom.'&versionto='.$versionto);
|
pHeader('', 'step5', GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'upgrade', 'versionfrom='.$versionfrom.'&versionto='.$versionto, '', 'main-inside main-inside-borderbottom');
|
||||||
|
|
||||||
|
|
||||||
if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) {
|
if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ09'))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user