Index: branches/5.1.x/core/units/helpers/col_picker_helper.php =================================================================== diff -u -N -r13142 -r13545 --- branches/5.1.x/core/units/helpers/col_picker_helper.php (.../col_picker_helper.php) (revision 13142) +++ branches/5.1.x/core/units/helpers/col_picker_helper.php (.../col_picker_helper.php) (revision 13545) @@ -1,6 +1,6 @@ Application->RecallVar($prefix.'_current_view'); - $val = $this->Application->RecallPersistentVar($prefix.'_columns_.'.$view_name, ALLOW_DEFAULT_SETTINGS); + $val = $this->Application->RecallPersistentVar($this->_getVarName($prefix, 'get'), ALLOW_DEFAULT_SETTINGS); if (!$val) { $cols = $this->RebuildColumns($prefix); @@ -140,10 +139,30 @@ function StoreCols($prefix, $cols) { - $view_name = $this->Application->RecallVar($prefix.'_current_view'); - $this->Application->StorePersistentVar($prefix.'_columns_.'.$view_name, serialize($cols)); + $this->Application->StorePersistentVar($this->_getVarName($prefix, 'set'), serialize($cols)); } + /** + * Gets variable name in persistent session to store column positions in + * + * @param string $prefix + * @param string $mode + * @return string + */ + function _getVarName($prefix, $mode = 'get') + { + $view_name = $this->Application->RecallVar($prefix . '_current_view'); + + $ret = $prefix . '[' . $this->GridName . ']columns_.' . $view_name; + if ($mode == 'get') { + if ($this->Application->RecallPersistentVar($ret) === false) { + $ret = $prefix . '_columns_.' . $view_name; + } + } + + return $ret; + } + function GetColumns($prefix) { $splited = $this->Application->processPrefix($prefix); @@ -250,6 +269,11 @@ function GetWidth($field) { + if (in_array($field, $this->formatterRenamed)) { + // remove language prefix from field, because formatter renamed column + $field = preg_replace('/^l[\d]+_/', '', $field); + } + return isset($this->PickerData['widths'][$field]) ? $this->PickerData['widths'][$field] : false; } } \ No newline at end of file