From 0dae2f20783e81558e5164ac1945ed000e0e08be Mon Sep 17 00:00:00 2001 From: marko Date: Thu, 26 Jul 2018 14:37:30 +0200 Subject: [PATCH] - die Ausslagerung der promoImg der news scheint zu funktionieren modified: admin/newsAdmin.php modified: phpLib/cwsvJudo/newsLib.php --- .../markdownExperiment/admin/newsAdmin.php | 76 ++++++++++++------- .../phpLib/cwsvJudo/newsLib.php | 20 +++-- 2 files changed, 59 insertions(+), 37 deletions(-) diff --git a/homepage/redesign2018/markdownExperiment/admin/newsAdmin.php b/homepage/redesign2018/markdownExperiment/admin/newsAdmin.php index 61adb0b..d0bf2cf 100644 --- a/homepage/redesign2018/markdownExperiment/admin/newsAdmin.php +++ b/homepage/redesign2018/markdownExperiment/admin/newsAdmin.php @@ -1,5 +1,5 @@ setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); @@ -60,10 +63,8 @@ if( !empty($_POST['action']) ){ $stmt->bindParam(':datum', $newsArticle['datum']); $stmt->bindParam(':betreff', iconv("UTF-8", "ISO-8859-1", $newsArticle['betreff'])); $stmt->bindParam(':nachricht', iconv("UTF-8", "ISO-8859-1", $Parsedown->text( $newsArticle['text'] ))); -// $stmt->bindParam(':nachricht', $Parsedown->text( htmlspecialchars( $newsArticle['text'] ) )); -// $stmt->bindParam(':nachricht', iconv("UTF-8", "ISO-8859-1", $Parsedown->text($newsArticle['text']))); $stmt->bindParam(':autor', $newsArticle['autor']); - $stmt->bindParam(':promoImg', $newsArticle['promoImg']['url']); + $stmt->bindParam(':promoImg', json_encode( $newsArticle['promoImg'] ) ); // insert a row $stmt->execute(); @@ -115,7 +116,8 @@ if( !empty($_POST['action']) ){ $newsArticle['datum'], 'betreff' => $newsArticle['betreff'], - 'promoImg' => $newsArticle['promoImg']['url'], +// 'promoImg' => $newsArticle['promoImg']['url'], + 'promoImg' => $newsArticle['promoImg'], 'nachricht' => Parsedown::instance()->text($newsArticle['text']), 'autor' => $newsArticle['autor'] )));?> @@ -132,10 +134,22 @@ if( !empty($_POST['action']) ){ name="nachrichtenBetreff" > + +