[AppDB] link bugs patch 6 of 6

Tony Lambregts tony.lambregts at gmail.com
Sat Jul 9 23:18:17 CDT 2005


This is the sixth (and last of this series) of the patches that gives better 
integration of bugzilla with the AppDB. They are submitted in the order that 
they should be applied. If you want to test them out you should download the
tarball for bugzilla from ftp://ftp.winehq.org/pub/wine/ (Thanks Jeremy...)

Change Log: Modify appview so that users can view and attach a bug to version.

Files changed: appview.php





-------------- next part --------------
Index: appview.php
===================================================================
RCS file: /home/wine/appdb/appview.php,v
retrieving revision 1.69
diff -u -r1.69 appview.php
--- appview.php	20 May 2005 02:45:55 -0000	1.69
+++ appview.php	10 Jul 2005 02:24:47 -0000
@@ -13,6 +13,7 @@
 require(BASE."include/vote.php");
 require(BASE."include/category.php");
 require(BASE."include/maintainer.php");
+require(BASE."include/mail.php");
 
 
 $oApp = new Application($_REQUEST['appId']);
@@ -125,7 +126,43 @@
     exit;
 }
 
+if ($_REQUEST['sub'])
+{
+    if(($_REQUEST['sub'] == 'delete' ) && ($_REQUEST['buglinkId']))
+    {
+        if(($_SESSION['current']->hasPriv("admin") ||
+            $_SESSION['current']->isMaintainer($oVersion->iVersionId) ||
+            $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)))
+        {
+            $oBuglink = new bug($_REQUEST['buglinkId']);
+            $oBuglink->delete();
+            redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId']));
+            exit;
+        }
+ 
+    }
+    if(($_REQUEST['sub'] == 'unqueue' ) && ($_REQUEST['buglinkId']))
+    {
+        if(($_SESSION['current']->hasPriv("admin") ||
+            $_SESSION['current']->isMaintainer($oVersion->iVersionId) ||
+            $_SESSION['current']->isSuperMaintainer($oVersion->iAppId)))
+        {
+            $oBuglink = new bug($_REQUEST['buglinkId']);
+            $oBuglink->unqueue();
+            redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId']));
+            exit;
+        }
+ 
+    }
+    if(($_REQUEST['sub'] == 'Submit a new bug link.' ) && ($_REQUEST['buglinkId']))
+    {
+        $oBuglink = new bug();
+        $oBuglink->create($_REQUEST['versionId'],$_REQUEST['buglinkId']);
+        redirect(apidb_fullurl("appview.php?versionId=".$_REQUEST['versionId']));
+        exit;
+    }
 
+}
 
 /**
  * We want to see an application family (=no version).
@@ -429,6 +466,8 @@
     echo "</table>\n";
 
     echo html_frame_end();
+
+    view_version_bugs($oVersion->iVersionId, $oVersion->aBuglinkIds);    
 
     $rNotes = query_appdb("SELECT * FROM appNotes WHERE versionId = ".$oVersion->iVersionId);
     


More information about the wine-patches mailing list