Page MenuHomeIn-Portal Phabricator

D155.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 6:38 AM

D155.diff

Index: branches/5.2.x/core/units/helpers/multilanguage_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/multilanguage_helper.php
+++ branches/5.2.x/core/units/helpers/multilanguage_helper.php
@@ -396,7 +396,12 @@
// create index for primary language column + for all others (if multiple languages installed)
list($field_name, $field_params) = explode(' ', $field_expression, 2);
- $index_type = isset($this->curFields[$ml_field]['index_type']) ? $this->curFields[$prev_field]['index_type'] : 'string';
+ if ( isset($this->curFields[$ml_field]['index_type']) ) {
+ $index_type = $this->curFields[$ml_field]['index_type'];
+ }
+ else {
+ $index_type = 'string';
+ }
$ret .= $index_type == 'string' ? 'ADD INDEX (`'.$field_name.'` (5) ), ' : 'ADD INDEX (`'.$field_name.'`), ';
$this->curIndexCount++;

Event Timeline