Commit dd40626a authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add reminder to remove the image file (if there is a path defined).

parent 9bfe0066
# Copyright (c) 2000-2002 University of Utah and the Flux Group.
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
......@@ -119,28 +119,38 @@ DBQueryFatal("lock tables images write, os_info write, osidtoimageid write");
# If this is an EZ imageid, then delete the corresponding OSID too.
$query_result =
DBQueryFatal("select ezid from images ".
"where imageid='$imageid' and ezid=1");
DBQueryFatal("select ezid,path from images where imageid='$imageid'");
$row = mysql_fetch_row($query_result);
$ezid = $row[0];
$path = $row[1];
# Delete the record(s).
DBQueryFatal("DELETE FROM images WHERE imageid='$imageid'");
DBQueryFatal("DELETE FROM osidtoimageid where imageid='$imageid'");
if (mysql_num_rows($query_result)) {
if ($ezid) {
DBQueryFatal("DELETE FROM os_info WHERE osid='$imageid'");
DBQueryFatal("unlock tables");
echo "<p>
Image '$imageid' in project $pid has been deleted!
echo "<br>
Image '$imageid' in project $pid has been deleted!\n";
if ($path) {
echo "<br>
<font color=red>Please remember to delete $path!</font>\n";
echo "</h3>\n";
echo "<br>
<a href='showimageid_list.php3'>Back to Image Descriptor list</a>\n";
<a href='showimageid_list.php3'>Back to Image Descriptor list</a>
# Standard Testbed Footer
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment