Skip to content
Snippets Groups Projects
Commit 4defbff7 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms Committed by Elmar Ludwig
Browse files

fix sql error when diffing mvv entities and adjust cache location, fixes #999

Closes #999
parent e0c29a9d
No related branches found
No related tags found
No related merge requests found
......@@ -1117,6 +1117,9 @@ class Module_ModuleController extends MVVController
$type_old = 2;
}
$diff_config = new Caxy\HtmlDiff\HtmlDiffConfig();
$diff_config->setPurifierCacheLocation($GLOBALS['TMP_PATH']);
PageLayout::setTitle(_('Vergleichsansicht'));
PageLayout::addStylesheet('print.css');
$factory = $this->get_template_factory();
......@@ -1127,7 +1130,8 @@ class Module_ModuleController extends MVVController
'old_module' => $old_module,
'type_new' => $type_new,
'type_old' => $type_old,
'plugin' => $this->plugin
'plugin' => $this->plugin,
'diff_config' => $diff_config,
]);
$this->render_text($template->render());
......
......@@ -127,7 +127,7 @@ class Shared_LogEventController extends MVVController
LEFT JOIN `log_actions` ON `log_events`.`action_id` = `log_actions`.`action_id`
WHERE `info` = ?
" . $search_action . "
ORDER BY `mkdate` DESC");
ORDER BY `log_events`.`mkdate` DESC");
$statement->execute([$mvv_field]);
$res = $statement->fetchOne();
if ($res) {
......
......@@ -66,7 +66,7 @@
<?php
$old = $this->render_partial('shared/modul/_modul', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_modul', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
?>
......@@ -77,19 +77,19 @@
<?php
$old = $this->render_partial('shared/modul/_modullvs', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_modullvs', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
$old = $this->render_partial('shared/modul/_pruefungen', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_pruefungen', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
$old = $this->render_partial('shared/modul/_regularien', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_regularien', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
?>
......@@ -119,7 +119,7 @@
<?
$old = $this->render_partial('shared/modul/_modullv', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_modullv', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
?>
......@@ -148,7 +148,7 @@
<?php
$old = $this->render_partial('shared/modul/_modul_ohne_lv', ['modul' => $old_module]);
$new = $this->render_partial('shared/modul/_modul_ohne_lv', ['modul' => $new_module]);
$diff = new Caxy\HtmlDiff\HtmlDiff($old, $new);
$diff = Caxy\HtmlDiff\HtmlDiff::create($old, $new, $diff_config);
$diff->build();
echo $diff->getDifference();
?>
......
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