Skip to content

Commit

Permalink
Escaped database default values for Contao 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Aug 17, 2015
1 parent 9f8eab7 commit f075f8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dca/tl_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 3 additions & 1 deletion dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit f075f8d

Please sign in to comment.