Index: trunk/kernel/action.php =================================================================== diff -u -N -r4821 -r5254 --- trunk/kernel/action.php (.../action.php) (revision 4821) +++ trunk/kernel/action.php (.../action.php) (revision 5254) @@ -537,7 +537,7 @@ { /* category's paste function populates a sparse array where array[old_id]=new_id */ $PastedCatIds = array(); - $objCatList->PasteFromClipboard($objCatList->CurrentCategoryID(),"Name"); + $objCatList->PasteFromClipboard($objCatList->CurrentCategoryID(), $objCatList->TitleField); } else { @@ -701,22 +701,22 @@ $objEditItems = new clsCatList(); $objEditItems->SourceTable = $objSession->GetEditTable("Category"); - $fields_hash = Array( 'ParentId' => GetVar('ParentId'), - 'Name' => inp_escape(GetVar('cat_name'), (int)GetVar('html_enable')), - 'Description' => inp_escape(GetVar('cat_desc'), (int)GetVar('html_enable')), - 'CreatedOn' => $created_on, - 'EditorsPick' => GetVar('cat_pick'), - 'Status' => (int)GetVar('status'), -// 'HotItem' => (int)GetVar('itemhot'), - 'NewItem' => (int)GetVar('itemnew'), -// 'PopItem' => (int)GetVar('itempop'), - 'Priority' => GetVar('Priority'), - 'MetaKeywords' => GetVar('meta_keywords'), - 'MetaDescription' => GetVar('meta_desc'), - 'AutomaticFilename' => GetVar('auto_filename'), - 'Filename' => GetVar('filename'), - 'CategoryTemplate' => GetVar('category_template'), - 'ItemTemplate' => GetVar('item_template'), + $fields_hash = Array( 'ParentId' => GetVar('ParentId'), + $objCatList->TitleField => inp_escape(GetVar('cat_name'), (int)GetVar('html_enable')), + $objCatList->DescriptionField => inp_escape(GetVar('cat_desc'), (int)GetVar('html_enable')), + 'CreatedOn' => $created_on, + 'EditorsPick' => GetVar('cat_pick'), + 'Status' => (int)GetVar('status'), +// 'HotItem' => (int)GetVar('itemhot'), + 'NewItem' => (int)GetVar('itemnew'), +// 'PopItem' => (int)GetVar('itempop'), + 'Priority' => GetVar('Priority'), + 'MetaKeywords' => GetVar('meta_keywords'), + 'MetaDescription' => GetVar('meta_desc'), + 'AutomaticFilename' => GetVar('auto_filename'), + 'Filename' => GetVar('filename'), + 'CategoryTemplate' => GetVar('category_template'), + 'ItemTemplate' => GetVar('item_template'), ); $objSession->SetVariable('PermCache_UpdateRequired', 1); @@ -736,10 +736,10 @@ $original_cats = new clsCatList(); $original_cat = $original_cats->GetItemByField('CategoryId', GetVar('CategoryId')); - $match_fields = Array( 'Name' => 'cat_name', - 'Filename' => 'filename', - 'CategoryTemplate' => 'category_template', - 'ItemTemplate' => 'item_template'); + $match_fields = Array( $objCatList->TitleField => 'cat_name', + 'Filename' => 'filename', + 'CategoryTemplate' => 'category_template', + 'ItemTemplate' => 'item_template'); foreach ($match_fields as $db_field => $submit_field) { if ($original_cat->Get($db_field) != stripslashes( GetVar($submit_field) )) { @@ -754,21 +754,21 @@ } // check if name of cat isn't changed: end - $fields_hash = Array( 'Name' => inp_escape(GetVar('cat_name'), (int)GetVar('html_enable')), - 'Description' => inp_escape(GetVar('cat_desc'), (int)GetVar('html_enable')), - 'CreatedOn' => DateTimestamp(GetVar('cat_date'), GetDateFormat(0, true)), - 'EditorsPick' => GetVar('cat_pick'), - 'Status' => (int)GetVar('status'), -// 'HotItem' => (int)GetVar('itemhot'), - 'NewItem' => (int)GetVar('itemnew'), -// 'PopItem' => (int)GetVar('itempop'), - 'Priority' => GetVar('Priority'), - 'MetaKeywords' => GetVar('meta_keywords'), - 'MetaDescription' => GetVar('meta_desc'), - 'AutomaticFilename' => GetVar('auto_filename'), - 'Filename' => GetVar('filename'), - 'CategoryTemplate' => GetVar('category_template'), - 'ItemTemplate' => GetVar('item_template'), + $fields_hash = Array( $objCatList->TitleField => inp_escape(GetVar('cat_name'), (int)GetVar('html_enable')), + $objCatList->DescriptionField => inp_escape(GetVar('cat_desc'), (int)GetVar('html_enable')), + 'CreatedOn' => DateTimestamp(GetVar('cat_date'), GetDateFormat(0, true)), + 'EditorsPick' => GetVar('cat_pick'), + 'Status' => (int)GetVar('status'), +// 'HotItem' => (int)GetVar('itemhot'), + 'NewItem' => (int)GetVar('itemnew'), +// 'PopItem' => (int)GetVar('itempop'), + 'Priority' => GetVar('Priority'), + 'MetaKeywords' => GetVar('meta_keywords'), + 'MetaDescription' => GetVar('meta_desc'), + 'AutomaticFilename' => GetVar('auto_filename'), + 'Filename' => GetVar('filename'), + 'CategoryTemplate' => GetVar('category_template'), + 'ItemTemplate' => GetVar('item_template'), ); $cat =& $objEditItems->Edit_Category(GetVar('CategoryId'), $fields_hash);