gforge-commits
[Top][All Lists]
Advanced

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

[Gforge-commits] gforge/www/tracker/reporting index.php,1.10,1.11


From: tperdue
Subject: [Gforge-commits] gforge/www/tracker/reporting index.php,1.10,1.11
Date: Thu, 05 Aug 2004 15:49:01 -0500

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

Modified Files:
        index.php 
Log Message:
reporting tweaks

Index: index.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/reporting/index.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- index.php   28 Jul 2004 17:31:50 -0000      1.10
+++ index.php   5 Aug 2004 20:48:59 -0000       1.11
@@ -1,9 +1,28 @@
 <?php
 /**
- *     GForge Reporting System
- *  Copyright 2003 GForge LLC
+ * Reporting System
  *
- *  THIS SOFTWARE IS PROPRIETARY
+ * Copyright 2004 (c) GForge LLC
+ *
+ * @version   $Id$
+ * @author Tim Perdue address@hidden
+ * @date 2003-03-16
+ *
+ * This file is part of GForge.
+ *
+ * GForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 require_once('pre.php');
 require_once('common/reporting/report_utils.php');
@@ -38,18 +57,20 @@
 //     Get list of trackers this person can see
 //
 if ($perm->isArtifactAdmin()) {
-       $alevel=' >= 0';
+       $alevel='';
 } else {
-       $alevel=' > 1';
+       $alevel=' ap.user_id='. user_getid() ." AND ap.perm_level > 1 AND ";
 }
 
-$sql="SELECT agl.group_artifact_id,agl.name
-       FROM artifact_group_list agl,artifact_perm ap
-       WHERE agl.group_artifact_id=ap.group_artifact_id
-       AND ap.user_id='". user_getid() ."'
-       AND ap.perm_level $alevel
-       AND agl.group_id='$group_id'";
+$sql="SELECT DISTINCT agl.group_artifact_id,agl.name
+       FROM artifact_group_list agl 
+       LEFT JOIN artifact_perm ap
+       ON (ap.group_artifact_id=agl.group_artifact_id)
+       WHERE
+       $alevel
+       agl.group_id='$group_id'";
 $restracker=db_query($sql);
+echo db_error();
 
 //
 //     Build list of reports





reply via email to

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