From f075f8dd22f240886e42632ff19d243bf1532c94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Mon, 17 Aug 2015 11:55:52 +0200 Subject: [PATCH] Escaped database default values for Contao 4 --- dca/tl_content.php | 4 +++- dca/tl_module.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dca/tl_content.php b/dca/tl_content.php index c3171db..802045c 100644 --- a/dca/tl_content.php +++ b/dca/tl_content.php @@ -393,7 +393,9 @@ 'helpwizard' => true, 'tl_class' => 'w50', ), - 'sql' => "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\"50\";i:1;s:2:\"50\";i:2;s:4:\"crop\";}'", + 'sql' => version_compare(VERSION, '4', '<') + ? "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\"50\";i:1;s:2:\"50\";i:2;s:4:\"crop\";}'" + : "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\\\"50\\\";i:1;s:2:\\\"50\\\";i:2;s:4:\\\"crop\\\";}'", ); $GLOBALS['TL_DCA']['tl_content']['fields']['rsts_thumbs_slideMaxCount'] = array( 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_slideMaxCount'], diff --git a/dca/tl_module.php b/dca/tl_module.php index 35e7142..7ae65f3 100644 --- a/dca/tl_module.php +++ b/dca/tl_module.php @@ -390,7 +390,9 @@ 'helpwizard' => true, 'tl_class' => 'w50', ), - 'sql' => "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\"50\";i:1;s:2:\"50\";i:2;s:4:\"crop\";}'", + 'sql' => version_compare(VERSION, '4', '<') + ? "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\"50\";i:1;s:2:\"50\";i:2;s:4:\"crop\";}'" + : "varchar(64) NOT NULL default 'a:3:{i:0;s:2:\\\"50\\\";i:1;s:2:\\\"50\\\";i:2;s:4:\\\"crop\\\";}'", ); $GLOBALS['TL_DCA']['tl_module']['fields']['rsts_thumbs_slideMaxCount'] = array( 'label' => &$GLOBALS['TL_LANG']['tl_module']['rsts_slideMaxCount'],