if (!empty($icon_path)) { $icon = $icon_path; } if (!empty($_POST['special_auth'])) { $array_auth_all = Authorizations::build_auth_array_from_form(DOWNLOAD_READ_CAT_AUTH_BIT, DOWNLOAD_WRITE_CAT_AUTH_BIT, DOWNLOAD_CONTRIBUTION_CAT_AUTH_BIT); $new_auth = addslashes(serialize($array_auth_all)); } else { $new_auth = ''; } if (empty($name)) { redirect(url(HOST . SCRIPT . '?error=e_required_fields_empty#errorh'), '', '&'); } if ($id_cat > 0) { $error_string = $download_categories->Update_category($id_cat, $id_parent, $name, $description, $icon, $new_auth, $visible); } else { $error_string = $download_categories->add($id_parent, $name, $description, $icon, $new_auth, $visible); } import('content/syndication/feed'); Feed::clear_cache('download'); } $Cache->Generate_module_file('download'); redirect(url(HOST . SCRIPT . '?error=' . $error_string . '#errorh'), '', '&'); } elseif (retrieve(GET, 'recount', false)) { $download_categories->Recount_sub_files(); import('content/syndication/feed'); Feed::clear_cache('download'); redirect(url(HOST . SCRIPT . '?error=e_recount_success', '', '&')); } elseif ($new_cat xor $id_edit > 0) { $Template->set_filenames(array('admin_download_cat_edition' => 'download/admin_download_cat_edition.tpl')); import('io/filesystem/folder'); $img_str = '<option value="">--</option>';