Make alias column unique.

This commit is contained in:
David Molineus
2015-01-09 17:40:50 +01:00
parent 150e3706ed
commit 023711980a
7 changed files with 24 additions and 18 deletions

View File

@@ -12,7 +12,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
)
)
),
@@ -152,7 +154,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'exclude' => true,
'inputType' => 'text',
'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'type' => array

View File

@@ -9,7 +9,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'alias' => 'unique',
)
)
),
@@ -143,10 +144,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'pid' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'title' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'],
@@ -160,7 +157,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'],
'exclude' => true,
'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'type' => array

View File

@@ -11,7 +11,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
)
)
),
@@ -186,7 +188,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'exclude' => true,
'inputType' => 'text',
'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'type' => array

View File

@@ -10,7 +10,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'alias' => 'unique',
)
)
),
@@ -132,7 +133,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'exclude' => true,
'inputType' => 'text',
'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'center' => array
@@ -346,7 +347,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'],
'exclude' => true,
'inputType' => 'textarea',
'default' => true,
'eval' => array('tl_class' => 'clr lng', 'allowHtml'=>true, 'style' => 'min-height: 40px;'),
'sql' => "char(1) NOT NULL default ''"
),

View File

@@ -13,7 +13,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
)
),
),
@@ -150,7 +152,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'exclude' => true,
'inputType' => 'text',
'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'coordinates' => array

View File

@@ -9,7 +9,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'alias' => 'unique',
)
)
),

View File

@@ -12,7 +12,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
(
'keys' => array
(
'id' => 'primary'
'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
)
)
),
@@ -176,7 +178,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'exclude' => true,
'inputType' => 'text',
'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''"
),
'type' => array