From: Sven Schöling
Date: Wed, 20 Dec 2017 13:15:20 +0000 (+0100)
Subject: Presenter: Neue Struktur im DBUpgrade
X-Git-Tag: release-3.5.4~555
X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8858a05b23df2769f6e03c5b0fd7647840799fff;p=kivitendo-erp.git
Presenter: Neue Struktur im DBUpgrade
---
diff --git a/SL/DBUpgrade2/Base.pm b/SL/DBUpgrade2/Base.pm
index 5d0d26c9b..cd698c5e5 100644
--- a/SL/DBUpgrade2/Base.pm
+++ b/SL/DBUpgrade2/Base.pm
@@ -12,6 +12,7 @@ use File::Copy ();
use File::Path ();
use List::MoreUtils qw(uniq);
use SL::DBUtils qw(selectfirst_hashref_query);
+use SL::Presenter::EscapedText qw(escape);
use version;
use Rose::Object::MakeMethods::Generic (
@@ -152,7 +153,7 @@ sub convert_column_to_html {
foreach my $row (selectall_hashref_query($::form, $self->dbh, qq|SELECT id, $column FROM $table WHERE $column IS NOT NULL|)) {
next if !$row->{$column} || (($row->{$column} =~ m{^<[a-z]+>}) && ($row->{$column} =~ m{[a-z]+>$}));
- my $new_content = "" . $::request->presenter->escape($row->{$column});
+ my $new_content = "" . escape($row->{$column});
$new_content =~ s{\r}{}g;
$new_content =~ s{\n\n+}{
}g;
$new_content =~ s{\n}{
}g;
diff --git a/sql/Pg-upgrade2/oe_ar_ap_delivery_orders_edit_notes_as_html.pl b/sql/Pg-upgrade2/oe_ar_ap_delivery_orders_edit_notes_as_html.pl
index 2be82f172..a5575f6d2 100644
--- a/sql/Pg-upgrade2/oe_ar_ap_delivery_orders_edit_notes_as_html.pl
+++ b/sql/Pg-upgrade2/oe_ar_ap_delivery_orders_edit_notes_as_html.pl
@@ -7,6 +7,7 @@ use strict;
use utf8;
use SL::DBUtils;
+use SL::Presenter::EscapedText qw(escape);
use parent qw(SL::DBUpgrade2::Base);
@@ -18,7 +19,7 @@ sub convert_column {
foreach my $row (selectall_hashref_query($::form, $self->dbh, qq|SELECT id, $column FROM $table WHERE $column IS NOT NULL|)) {
next if !$row->{$column} || (($row->{$column} =~ m{^<[a-z]+>}) && ($row->{$column} =~ m{[a-z]+>$}));
- my $new_content = "" . $::request->presenter->escape($row->{$column});
+ my $new_content = "" . escape($row->{$column});
$new_content =~ s{\r}{}g;
$new_content =~ s{\n\n+}{
}g;
$new_content =~ s{\n}{
}g;