$perms_error = true; } } if (!$perms_error) { header("Location:error.php?ec=12"); exit; } // Check to make sure the file is available $status = $filedata->getStatus($fileId); if ($status != 0) { header('Location:error.php?ec=2'); exit; } // update category $filedata->setCategory($_REQUEST['category']); $filedata->setDescription($_REQUEST['description']); $filedata->setComment($_REQUEST['comment']); if (isset($_REQUEST['file_owner'])) { $filedata->setOwner($_REQUEST['file_owner']); } if (isset($_REQUEST['file_department'])) { $filedata->setDepartment($_REQUEST['file_department']); } // Update the file with the new values $filedata->updateData(); udf_edit_file_update(); // clean out old permissions $del_user_perms_query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}user_perms WHERE fid = :file_id"; $del_user_perms_stmt = $pdo->prepare($del_user_perms_query); $del_user_perms_stmt->bindParam(':file_id', $fileId); $del_user_perms_stmt->execute();
$perms_error = true; } } if (!$perms_error) { header("Location:error.php?ec=12"); exit; } // Check to make sure the file is available $status = $filedata->getStatus($fileId); if ($status != 0) { header('Location:error.php?ec=2'); exit; } // update category $filedata->setCategory(mysql_real_escape_string($_REQUEST['category'])); $filedata->setDescription(mysql_real_escape_string($_REQUEST['description'])); $filedata->setComment(mysql_real_escape_string($_REQUEST['comment'])); if (isset($_REQUEST['file_owner'])) { $filedata->setOwner(mysql_real_escape_string($_REQUEST['file_owner'])); } if (isset($_REQUEST['file_department'])) { $filedata->setDepartment(mysql_real_escape_string($_REQUEST['file_department'])); } // Update the file with the new values $filedata->updateData(); udf_edit_file_update(); // clean out old permissions $query = "DELETE FROM {$GLOBALS['CONFIG']['db_prefix']}user_perms WHERE fid = '{$fileId}'"; $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: {$query}. " . mysql_error()); $result_array = array(); // init;