Index: branches/RC/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r9616 -r9639 --- branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9616) +++ branches/RC/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 9639) @@ -648,7 +648,7 @@ if($first_chars) { $needs_cut = strlen($value) > $first_chars; - $value = substr($value,0,$first_chars); + $value = extension_loaded('mbstring') ? mb_substr($value,0,$first_chars) : substr($value,0,$first_chars); if($needs_cut) $value .= ' ...'; } if( getArrayValue($params,'nl2br' ) ) $value = nl2br($value); @@ -815,6 +815,9 @@ else { // single selection radio or checkboxes + if (!isset($options['options']) || !is_array($options['options'])) { + trigger_error("Options not defined for {$object->Prefix} field $field", E_USER_WARNING); + } foreach ($options['options'] as $key => $val) { $block_params['key'] = $key; @@ -836,7 +839,7 @@ $object->SetDBField($field, $this->SearchField($params)); $view_name = $this->Application->RecallVar($this->getPrefixSpecial().'_current_view'); - $custom_filter = $this->Application->RecallPersistentVar($this->getPrefixSpecial().'_custom_filter.'.$view_name); + $custom_filter = $this->Application->RecallPersistentVar($this->getPrefixSpecial().'_custom_filter.'.$view_name, ALLOW_DEFAULT_SETTINGS); $ret = $this->PredefinedOptions($params); $object->SetDBField($field, $saved_value); @@ -1632,7 +1635,7 @@ $field = $this->SelectParam($params, 'field,name'); $view_name = $this->Application->RecallVar($this->getPrefixSpecial().'_current_view'); - $custom_filter = $this->Application->RecallPersistentVar($this->getPrefixSpecial().'_custom_filter.'.$view_name); + $custom_filter = $this->Application->RecallPersistentVar($this->getPrefixSpecial().'_custom_filter.'.$view_name, ALLOW_DEFAULT_SETTINGS); $custom_filter = $custom_filter ? unserialize($custom_filter) : Array(); if (isset($custom_filter[ $params['grid'] ][$field])) { @@ -1953,6 +1956,13 @@ return $this->Prefix == $this->Application->GetTopmostPrefix($this->Prefix); } + function PermSection($params) + { + $section = $this->SelectParam($params, 'section,name'); + $perm_sections = $this->Application->getUnitOption($this->Prefix, 'PermSection'); + return isset($perm_sections[$section]) ? $perm_sections[$section] : ''; + } + function PerPageSelected($params) { $list =& $this->GetList($params);