Author: pwang
Date: 2012-07-31 13:36:50 -0700 (Tue, 31 Jul 2012)
New Revision: 30050

Modified:
   new_cytoscape_website/bugreport/bugreportadmin.php
   new_cytoscape_website/bugreport/bugreportdelete.php
Log:
if delete, mark its status

Modified: new_cytoscape_website/bugreport/bugreportadmin.php
===================================================================
--- new_cytoscape_website/bugreport/bugreportadmin.php  2012-07-31 17:23:30 UTC 
(rev 30049)
+++ new_cytoscape_website/bugreport/bugreportadmin.php  2012-07-31 20:36:50 UTC 
(rev 30050)
@@ -27,7 +27,7 @@
 
 <?php 
        // Check if the reporter already existed in table 'reporter'
-       $dbQuery = "SELECT * FROM bugs,reporter where bugs.reporter_id = 
reporter.reporter_auto_id order by bug_auto_id";
+       $dbQuery = "SELECT * FROM bugs,reporter where bugs.reporter_id = 
reporter.reporter_auto_id and status = 'new' order by bug_auto_id";
        // Run the query
        if (!($result = @ mysql_query($dbQuery, $connection)))
                showerror();

Modified: new_cytoscape_website/bugreport/bugreportdelete.php
===================================================================
--- new_cytoscape_website/bugreport/bugreportdelete.php 2012-07-31 17:23:30 UTC 
(rev 30049)
+++ new_cytoscape_website/bugreport/bugreportdelete.php 2012-07-31 20:36:50 UTC 
(rev 30050)
@@ -28,7 +28,8 @@
        }
 
        // User confirmed to delete this bug report
-       deleteReportFromDB($bugid);
+       //deleteReportFromDB($bugid);
+       markReportStatusAsDeleted($bugid);
 
        showPageHeader("Delete a bug report");
        
@@ -41,7 +42,17 @@
 
 ///////////////////// End of page ////////////////////////////////////
 
+function markReportStatusAsDeleted($bugid){
 
+       $connection = getDBConnection("edit");
+
+       $query = "Update bugs SET status = 'deleted' WHERE bug_auto_id =$bugid";
+       // Run the query
+       if (!($result = @ mysql_query($query, $connection)))
+               showerror();
+}
+
+
 function deleteReportFromDB($bugid){
                
        $connection = getDBConnection("edit");

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to