Index: trunk/kernel/frontaction.php =================================================================== diff -u -r4120 -r4126 --- trunk/kernel/frontaction.php (.../frontaction.php) (revision 4120) +++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 4126) @@ -746,14 +746,26 @@ } if($MissingCount==0) { - $CreatedOn = adodb_date("U"); - $_POST=inp_striptags($_POST); - $name = $_POST["name"]; - $desc = $_POST["description"]; - $metadesc = $_POST["meta_description"]; - $keywords = $_POST["meta_keywords"]; - $parent = $objCatList->CurrentCategoryID(); - $cat =& $objCatList->Add($parent, $name, $desc, $CreatedOn, 0, $perm, 2, 2, 2, 0, $keywords,$metadesc); + $_POST = inp_striptags($_POST); + $fields_hash = Array( 'ParentId' => $objCatList->CurrentCategoryID(), + 'Name' => $_POST['name'], + 'Description' => $_POST['description'], + 'CreatedOn' => adodb_date('U'), + 'EditorsPick' => 0, + 'Status' => $perm, + 'HotItem' => 2, + 'NewItem' => 2, + 'PopItem' => 2, + 'Priority' => 0, + 'MetaKeywords' => $_POST['meta_keywords'], + 'MetaDescription' => $_POST['meta_description'], + 'AutomaticFilename' => 1, + 'Filename' => '', + 'CategoryTemplate' => '', + 'ItemTemplate' => '', + ); + + $cat =& $objCatList->Add_NEW($fields_hash); saveCustomFields('c', $cat->Get('ResourceId'), $cat->type); $cat->UpdateCachedPath();