[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/www/admin admin_table.php,1.5,1.6
From: |
tom |
Subject: |
[Gforge-commits] gforge/www/admin admin_table.php,1.5,1.6 |
Date: |
Wed, 04 Feb 2004 12:53:51 -0600 |
Update of /cvsroot/gforge/gforge/www/admin
In directory db.perdue.net:/tmp/cvs-serv18308/www/admin
Modified Files:
admin_table.php
Log Message:
Fixed bug [ #654 ] Unable to remove processor
Index: admin_table.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/admin/admin_table.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- admin_table.php 3 Feb 2003 01:13:50 -0000 1.5
+++ admin_table.php 4 Feb 2004 18:53:49 -0000 1.6
@@ -80,6 +80,14 @@
*/
function admin_table_confirmdelete($table, $unit, $primary_key, $id) {
global $PHP_SELF;
+
+ if ($unit == "processor") {
+ $result = db_numrows(db_query("SELECT processor_id FROM
frs_file WHERE processor_id = $id"));
+ if ($result > 0) {
+ echo "You can't delete the processor
".db_result(db_query("select name from frs_processor where processor_id =
$id"),0,0)." since it's currently referenced in a file release.<p>";
+ return;
+ }
+ }
$result = db_query("SELECT * FROM $table WHERE $primary_key=$id");
@@ -112,7 +120,8 @@
* @param $id - the id of the record to act on
*/
function admin_table_delete($table, $unit, $primary_key, $id) {
- if (db_query("DELETE FROM $table WHERE $primary_key=$id")) {
+ $sql = "DELETE FROM $table WHERE $primary_key=$id";
+ if (db_query($sql)) {
echo ucfirst($unit).' successfully deleted.';
} else {
echo db_error();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/www/admin admin_table.php,1.5,1.6,
tom <=