gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/common/tracker ArtifactType.class, 1.30, 1.31


From: tperdue
Subject: [Gforge-commits] gforge/common/tracker ArtifactType.class, 1.30, 1.31
Date: Tue, 23 Nov 2004 10:09:54 -0600

Update of /cvsroot/gforge/gforge/common/tracker
In directory db.perdue.net:/home/tperdue/share/dev.gforge.org/common/tracker

Modified Files:
        ArtifactType.class 
Log Message:
Fixing two tracker bugs

Index: ArtifactType.class
===================================================================
RCS file: /cvsroot/gforge/gforge/common/tracker/ArtifactType.class,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ArtifactType.class  3 Nov 2004 00:16:23 -0000       1.30
+++ ArtifactType.class  23 Nov 2004 16:09:52 -0000      1.31
@@ -550,24 +550,21 @@
                        WHERE EXISTS (SELECT artifact_id FROM artifact 
                        WHERE group_artifact_id='".$this->getID()."'
                        AND 
artifact.artifact_id=artifact_extra_field_data.artifact_id)");
+//echo '0.1'.db_error();
                db_query("DELETE FROM artifact_extra_field_elements
                        WHERE EXISTS (SELECT extra_field_id FROM 
artifact_extra_field_list 
                        WHERE group_artifact_id='".$this->getID()."'
                        AND artifact_extra_field_list.extra_field_id = 
artifact_extra_field_elements.extra_field_id)");
+//echo '0.2'.db_error();
                db_query ("DELETE FROM artifact_extra_field_list
                        WHERE group_artifact_id='".$this->getID()."'");
+//echo '0.3'.db_error();
                db_query("DELETE FROM artifact_canned_responses 
                        WHERE group_artifact_id='".$this->getID()."'");
 //echo '1'.db_error();
-               db_query("DELETE FROM artifact_category
-                       WHERE group_artifact_id='".$this->getID()."'");
-//echo '2'.db_error();
                db_query("DELETE FROM artifact_perm
                        WHERE group_artifact_id='".$this->getID()."'");
 //echo '3'.db_error();
-               db_query("DELETE FROM artifact_group
-                       WHERE group_artifact_id='".$this->getID()."'");
-//echo '4'.db_error();
                db_query("DELETE FROM artifact_counts_agg
                        WHERE group_artifact_id='".$this->getID()."'");
 //echo '5'.db_error();
@@ -594,6 +591,12 @@
                db_query("DELETE FROM artifact
                        WHERE group_artifact_id='".$this->getID()."'");
 //echo '10'.db_error();
+               db_query("DELETE FROM artifact_category
+                       WHERE group_artifact_id='".$this->getID()."'");
+//echo '2'.db_error();
+               db_query("DELETE FROM artifact_group
+                       WHERE group_artifact_id='".$this->getID()."'");
+//echo '4'.db_error();
                db_query("DELETE FROM artifact_group_list
                        WHERE group_artifact_id='".$this->getID()."'");
 //echo '11'.db_error();
@@ -903,7 +906,7 @@
                                //
                                //      You must have an entry in artifact_perm 
if this tracker is not public
                                //
-                               if ($this->getCurrentUserPerm() >= 1) {
+                               if ($this->userIsAdmin() || 
$this->getCurrentUserPerm() >= 1) {
                                        return true;
                                } else {
                                        return false;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]