Error management
This commit is contained in:
parent
bb7c03906e
commit
dbefb93e0f
@ -353,7 +353,8 @@ if ($action == 'edit') // Edit
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Hide wiki link on login page
|
// Hide wiki link on login page
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td>';
|
$pictohelp='<span class="fa fa-question-circle"></span>';
|
||||||
|
print '<tr><td class="titlefield">'.$langs->trans("DisableLinkToHelp",$pictohelp).'</td><td>';
|
||||||
print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0,1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
print '<td width="20"> </td>';
|
||||||
@ -441,7 +442,7 @@ else // Show
|
|||||||
{
|
{
|
||||||
// Language
|
// Language
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Language").'</td><td></td><td> </td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Language").'</td><td> </td><td> </td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultLanguage").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||||
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
|
$s=picto_from_langcode($conf->global->MAIN_LANG_DEFAULT);
|
||||||
@ -467,48 +468,35 @@ else // Show
|
|||||||
|
|
||||||
// Other
|
// Other
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameters").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
/*
|
|
||||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
|
||||||
print yn($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)."</td>";
|
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Disable javascript/ajax
|
// Disable javascript/ajax
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableJavascript").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// First day for weeks
|
// First day for weeks
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||||
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
|
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// DefaultWorkingDays
|
// DefaultWorkingDays
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||||
print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5';
|
print isset($conf->global->MAIN_DEFAULT_WORKING_DAYS)?$conf->global->MAIN_DEFAULT_WORKING_DAYS:'1-5';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// DefaultWorkingHours
|
// DefaultWorkingHours
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||||
print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18';
|
print isset($conf->global->MAIN_DEFAULT_WORKING_HOURS)?$conf->global->MAIN_DEFAULT_WORKING_HOURS:'9-18';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Firstname / Name position
|
// Firstname / Name position
|
||||||
@ -516,17 +504,15 @@ else // Show
|
|||||||
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans("Firstname").' '.$langs->trans("Lastname"); }
|
if (empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)) { print $langs->trans("Firstname").' '.$langs->trans("Lastname"); }
|
||||||
else { print $langs->trans("Lastname").' '.$langs->trans("Firstname"); }
|
else { print $langs->trans("Lastname").' '.$langs->trans("Firstname"); }
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Hide unauthorized button
|
// Hide unauthorized button
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("ButtonHideUnauthorized").'</td><td colspan="2">';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||||
print yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0),1);
|
print yn((isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Show logo
|
// Show logo
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
print '<tr class="oddeven"><td>'.$langs->trans("EnableShowLogo").'</td><td>' . yn($conf->global->MAIN_SHOW_LOGO) . '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Hide version link
|
// Hide version link
|
||||||
@ -534,23 +520,22 @@ else // Show
|
|||||||
print '<tr><td class="titlefield">'.$langs->trans("HideVersionLink").'</td><td>';
|
print '<tr><td class="titlefield">'.$langs->trans("HideVersionLink").'</td><td>';
|
||||||
print yn($conf->global->MAIN_HIDE_VERSION);
|
print yn($conf->global->MAIN_HIDE_VERSION);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Show bugtrack link
|
// Show bugtrack link
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||||
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
print yn($conf->global->MAIN_BUGTRACK_ENABLELINK)."</td>";
|
||||||
print '<td width="20"> </td>';
|
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Link to wiki help
|
// Link to wiki help
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelp",img_picto('',DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/helpdoc.png','',1)).'</td><td colspan="2">';
|
$pictohelp='<span class="fa fa-question-circle"></span>';
|
||||||
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelp",$pictohelp).'</td><td>';
|
||||||
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
print yn((isset($conf->global->MAIN_HELP_DISABLELINK)?$conf->global->MAIN_HELP_DISABLELINK:0),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Message of the day
|
// Message of the day
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("MessageOfDay").'</td><td colspan="2">';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("MessageOfDay").'</td><td>';
|
||||||
if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
if (isset($conf->global->MAIN_MOTD)) print dol_htmlcleanlastbr($conf->global->MAIN_MOTD);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
@ -561,21 +546,21 @@ else // Show
|
|||||||
|
|
||||||
// Login page
|
// Login page
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("LoginPage").'</td><td></td><td> </td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("LoginPage").'</td><td></td></tr>';
|
||||||
|
|
||||||
// Message login
|
// Message login
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("MessageLogin").'</td><td colspan="2">';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("MessageLogin").'</td><td>';
|
||||||
if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
if (isset($conf->global->MAIN_HOME)) print dol_htmlcleanlastbr($conf->global->MAIN_HOME);
|
||||||
else print ' ';
|
else print ' ';
|
||||||
print '</td></tr>'."\n";
|
print '</td></tr>'."\n";
|
||||||
|
|
||||||
// Link to help center
|
// Link to help center
|
||||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelpCenter").'</td><td colspan="2">';
|
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||||
print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
|
print yn((isset($conf->global->MAIN_HELPCENTER_DISABLELINK)?$conf->global->MAIN_HELPCENTER_DISABLELINK:0),1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Background login
|
// Background login
|
||||||
print '<tr class="oddeven"><td>'.$langs->trans("BackgroundImageLogin").'</td><td colspan="2">';
|
print '<tr class="oddeven"><td>'.$langs->trans("BackgroundImageLogin").'</td><td>';
|
||||||
print '<div class="centpercent inline-block">';
|
print '<div class="centpercent inline-block">';
|
||||||
print $conf->global->MAIN_LOGIN_BACKGROUND;
|
print $conf->global->MAIN_LOGIN_BACKGROUND;
|
||||||
if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND))
|
if ($conf->global->MAIN_LOGIN_BACKGROUND && is_file($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND))
|
||||||
|
|||||||
@ -1164,7 +1164,7 @@ div.fiche {
|
|||||||
|
|
||||||
|
|
||||||
div.fiche {
|
div.fiche {
|
||||||
margin-<?php print $left; ?>: <?php print (GETPOST('optioncss','aZ09') == 'print'?6:(empty($conf->dol_optimize_smallscreen)?'23':'6')); ?>px;
|
margin-<?php print $left; ?>: <?php print (GETPOST('optioncss','aZ09') == 'print'?6:(empty($conf->dol_optimize_smallscreen)?'25':'6')); ?>px;
|
||||||
margin-<?php print $right; ?>: <?php print (GETPOST('optioncss','aZ09') == 'print'?6:(empty($conf->dol_optimize_smallscreen)?'25':'6')); ?>px;
|
margin-<?php print $right; ?>: <?php print (GETPOST('optioncss','aZ09') == 'print'?6:(empty($conf->dol_optimize_smallscreen)?'25':'6')); ?>px;
|
||||||
<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'."\n"; ?>
|
<?php if (! empty($conf->dol_hide_leftmenu) && ! empty($conf->dol_hide_topmenu)) print 'margin-top: 4px;'."\n"; ?>
|
||||||
<?php if (! empty($conf->dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?>
|
<?php if (! empty($conf->dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?>
|
||||||
|
|||||||
@ -788,6 +788,11 @@ class Website extends CommonObject
|
|||||||
|
|
||||||
$filesql = $conf->website->dir_temp.'/'.$website->ref.'/export/pages.sql';
|
$filesql = $conf->website->dir_temp.'/'.$website->ref.'/export/pages.sql';
|
||||||
$fp = fopen($filesql,"w");
|
$fp = fopen($filesql,"w");
|
||||||
|
if (empty($fp))
|
||||||
|
{
|
||||||
|
setEventMessage("Failed to create file ".$filesql, null, 'errors');
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
$objectpages = new WebsitePage($this->db);
|
$objectpages = new WebsitePage($this->db);
|
||||||
$listofpages = $objectpages->fetchAll($website->id);
|
$listofpages = $objectpages->fetchAll($website->id);
|
||||||
|
|||||||
@ -1169,6 +1169,8 @@ if (GETPOST('exportsite'))
|
|||||||
{
|
{
|
||||||
$fileofzip = $object->exportWebSite();
|
$fileofzip = $object->exportWebSite();
|
||||||
|
|
||||||
|
if ($fileofzip)
|
||||||
|
{
|
||||||
$file_name = basename($fileofzip);
|
$file_name = basename($fileofzip);
|
||||||
|
|
||||||
header("Content-Type: application/zip");
|
header("Content-Type: application/zip");
|
||||||
@ -1178,6 +1180,7 @@ if (GETPOST('exportsite'))
|
|||||||
readfile($fileofzip);
|
readfile($fileofzip);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user