$result = $post_cat->db_update( $set4sql, $edit_id ); if( ! $result ) $error = $edit_id ; } } if( empty( $edit_id ) ) $edit_id = $new_cid ; if( $old_pid != 0 && $pid == 0 ){ // SET DEFAULT USER ACCESS $my_maincid= $category_edit->get_my_maincid( $old_pid ) ; $error = $category_edit->my_user_access_copy( $my_maincid, $edit_id, 1 ) ; } elseif( $old_pid == 0 ){ // GROUP UPDATE $error = $user_access->group_update( $edit_id, $pid ) ; // USER UPDATE $error = $user_access->user_update( $edit_id, $pid ) ; } else { $category_edit->date_save_cat_table( $edit_id ) ; } $category_edit->serialize_insertdb() ; $category_edit->category_tree_check() ; $user_access->my_user_access_check() ; d3download_delete_cache_of_categories( $mydirname ) ; if( ! empty( $_POST['categoryform_post'] ) ) { redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=categorymanager" , 2 , $error ? sprintf( _MD_D3DOWNLOADS_ERROR_MESSEAGE , $error ) : _MD_D3DOWNLOADS_REGSTERED ) ; } else { redirect_header( XOOPS_URL."/modules/$mydirname/admin/index.php?page=categoryedit&cid=$edit_id" , 2 , $error ? sprintf( _MD_D3DOWNLOADS_ERROR_MESSEAGE , $error ) : _MD_D3DOWNLOADS_REGSTERED ) ; } exit(); } } // DELETE SQL