Index: branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php =================================================================== diff -u -r7461 -r7472 --- branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7461) +++ branches/unlabeled/unlabeled-1.68.4/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 7472) @@ -382,7 +382,7 @@ $block_params['first_col'] = $column_number == 1 ? 1 : 0; $block_params['last_col'] = $column_number == $columns ? 1 : 0; - + $block_params['column_number'] = $column_number; $o.= $this->Application->ParseBlock($block_params, 1); array_push($displayed, $list->GetDBField($id_field)); @@ -1315,7 +1315,12 @@ { $new_value = $this->getInfo( $objects[ $prefix_data['prefix_special'] ], 'titlefield' ); if(!$new_value && getArrayValue($title_info['new_titlefield'],$prefix_data['prefix_special']) ) $new_value = $this->Application->Phrase($title_info['new_titlefield'][ $prefix_data['prefix_special'] ]); - $title = str_replace('#'.$prefix_data['prefix_special'].'_titlefield#', $new_value, $title); + // old format had single quotes in the format + $title = str_replace('\'#'.$prefix_data['prefix_special'].'_titlefield#\'', "'$new_value'", $title); + // new format has no quotes and $new_value should be empty when creating items + if ($new_value) { + $title = str_replace('#'.$prefix_data['prefix_special'].'_titlefield#', "'$new_value'", $title); + } } } } @@ -1333,7 +1338,13 @@ $var_info = explode('_',$replacement_var,2); $object =& $objects[ $var_info[0] ]; $new_value = $this->getInfo($object,$var_info[1]); - $title = str_replace('#'.$replacement_var.'#', $new_value, $title); + $title = str_replace('\'#'.$replacement_var.'#\'', "'$new_value'", $title); + if ($new_value) { + $title = str_replace('#'.$replacement_var.'#', "'$new_value'", $title); + } + else { + $title = str_replace('#'.$replacement_var.'#', $new_value, $title); + } } } @@ -1784,6 +1795,9 @@ $theme_path = $this->Application->BaseURL().substr($this->Application->GetFrontThemePath(), 1); + $bgcolor = $this->Application->GetVar('bgcolor'); + if (!$bgcolor) $bgcolor = '#ffffff'; + include_once(FULL_PATH.'/core/cmseditor/fckeditor.php'); $oFCKeditor = new FCKeditor($name); $oFCKeditor->BasePath = BASE_PATH.'/core/cmseditor/'; @@ -1802,6 +1816,7 @@ // 'Debug' => 1, 'Admin' => 1, 'K4' => 1, + 'newBgColor' => $bgcolor, ); return $oFCKeditor->CreateHtml(); }