Skip to content

Commit

Permalink
Merge pull request Evarisk#1106 from evarisk-kilyan/fix_infinite_redi…
Browse files Browse the repository at this point in the history
…rect

Evarisk#1105 [DocumentAction] fix: infinite redirect when archive
  • Loading branch information
nicolas-eoxia authored Oct 14, 2024
2 parents 0c12749 + 1f8fbbb commit 8a1f949
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions class/saturnedashboard.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ public function show_dashboard(?array $moreParams = [])
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
foreach ($dashboardList['labels'] as $key => $dashboardListLabel) {
print '<td class="nowraponall tdoverflowmax200 ' . (($key != 'Ref') ? 'center' : '') . '">' . $langs->transnoentities($dashboardListLabel) . '</td>';
print '<td class="' . ($conf->browser->layout == 'classic' ? 'nowraponall tdoverflowmax200 ' : '') . (($key != 'Ref') ? 'center' : '') . '">' . $langs->transnoentities($dashboardListLabel) . '</td>';
}
print '</tr>';
foreach ($dashboardList['data'] as $dashboardListDatasets) {
print '<tr class="oddeven">';
foreach ($dashboardListDatasets as $key => $dashboardGraphDataset) {
print '<td class="nowraponall tdoverflowmax200 ' . (($key != 'Ref') ? 'center ' : '') . $dashboardGraphDataset['morecss'] . '"' . $dashboardGraphDataset['moreAttr'] . '>' . $dashboardGraphDataset['value'] . '</td>';
print '<td class="' . ($conf->browser->layout == 'classic' ? 'nowraponall tdoverflowmax200 ' : '') . (($key != 'Ref') ? 'center ' : '') . $dashboardGraphDataset['morecss'] . '"' . $dashboardGraphDataset['moreAttr'] . '>' . $dashboardGraphDataset['value'] . '</td>';
}
print '</tr>';
}
Expand Down
2 changes: 1 addition & 1 deletion core/tpl/documents/documents_action.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
$urlToRedirect = preg_replace('/#builddoc$/', '', $urlToRedirect);
$urlToRedirect = preg_replace('/action=builddoc&?/', '', $urlToRedirect); // To avoid infinite loop.
$urlToRedirect = preg_replace('/forcebuilddoc=1&?/', '', $urlToRedirect); // To avoid infinite loop.
if (empty($shouldRedirect)) {
if (!isset($shouldRedirect) || $shouldRedirect) {
header('Location: ' . $urlToRedirect);
exit;
}
Expand Down

0 comments on commit 8a1f949

Please sign in to comment.