File tree 1 file changed +16
-2
lines changed
system/modules/core/drivers
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -2192,8 +2192,22 @@ public function editAll($intId=null, $ajaxId=null)
2192
2192
array_unshift ($ this ->strPalette , 'pid ' );
2193
2193
}
2194
2194
2195
- $ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ]['pid ' ] = array ('label ' =>&$ GLOBALS ['TL_LANG ' ]['MSC ' ]['pid ' ], 'inputType ' =>'text ' , 'eval ' =>array ('rgxp ' =>'natural ' ));
2196
- $ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ]['sorting ' ] = array ('label ' =>&$ GLOBALS ['TL_LANG ' ]['MSC ' ]['sorting ' ], 'inputType ' =>'text ' , 'eval ' =>array ('rgxp ' =>'natural ' ));
2195
+ // Ensure a minimum configuration
2196
+ foreach (array ('pid ' , 'sorting ' ) as $ f )
2197
+ {
2198
+ if (!isset ($ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['label ' ]))
2199
+ {
2200
+ $ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['label ' ] = &$ GLOBALS ['TL_LANG ' ]['MSC ' ][$ f ];
2201
+ }
2202
+ if (!isset ($ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['inputType ' ]))
2203
+ {
2204
+ $ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['inputType ' ] = 'text ' ;
2205
+ }
2206
+ if (!isset ($ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['eval ' ]))
2207
+ {
2208
+ $ GLOBALS ['TL_DCA ' ][$ this ->strTable ]['fields ' ][$ f ]['eval ' ] = array ('rgxp ' => 'natural ' );
2209
+ }
2210
+ }
2197
2211
}
2198
2212
2199
2213
// Begin current row
You can’t perform that action at this time.
0 commit comments