appdb/ admin/adminAppQueue.php include/version ...

WineHQ wineowner at wine.codeweavers.com
Fri Apr 20 20:20:43 CDT 2007


ChangeSet ID:	31062
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/04/20 20:20:43

Modified files:
	admin          : adminAppQueue.php 
	include        : version_queue.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	Display move test results table when processing a version

Patch: http://cvs.winehq.org/patch.py?id=31062

Old revision  New revision  Changes     Path
 1.75          1.76          +2 -61      appdb/admin/adminAppQueue.php
 1.3           1.4           +53 -0      appdb/include/version_queue.php

Index: appdb/admin/adminAppQueue.php
diff -u -p appdb/admin/adminAppQueue.php:1.75 appdb/admin/adminAppQueue.php:1.76
--- appdb/admin/adminAppQueue.php:1.75	21 Apr 2007  1:20:43 -0000
+++ appdb/admin/adminAppQueue.php	21 Apr 2007  1:20:43 -0000
@@ -64,49 +64,6 @@ function outputSearchTableForDuplicateFl
     }
 }
 
-function display_move_test_to_versions_table($aVersionsIds,$icurrentVersionId)
-{
-    if ($aVersionsIds)
-    {
-        echo html_frame_start("","98%","",0);
-        echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
-
-        echo "<tr class=color4>\n";
-        echo "    <td width=\"80\">Version</td>\n";
-        echo "    <td>Description</td>\n";
-        echo "    <td width=\"80\">Rating</td>\n";
-        echo "    <td width=\"80\">Wine version</td>\n";
-        echo "    <td width=\"40\">Comments</td>\n";
-        echo "</tr>\n\n";
-      
-        $c = 0;
-        foreach($aVersionsIds as $iVersionId)
-        {
-            $oVersion = new Version($iVersionId);
-            if ($oVersion->sQueued == 'false')
-            {
-                // set row color
-                $sBgColor = ($c % 2 == 0) ? "color0" : "color1";
-
-                //display row
-                echo "<tr class=$sBgColor>\n";
-                echo "    <td>".html_ahref($oVersion->sName,"adminAppQueue.php?sSub=movetest&sAppType=version&iVersionId=".$icurrentVersionId."&iVersionIdMergeTo=".$oVersion->iVersionId)."</td>\n";
-
-                echo "    <td>".util_trim_description($oVersion->sDescription)."</td>\n";
-                echo "    <td align=center>".$oVersion->sTestedRating."</td>\n";
-                echo "    <td align=center>".$oVersion->sTestedRelease."</td>\n";
-                echo "    <td align=center>".Comment::get_comment_count_for_versionid($oVersion->iVersionId)."</td>\n";
-                echo "</tr>\n\n";
-
-                $c++;   
-            }
-        }
-        echo "</table>\n";
-        echo html_frame_end("Click the Version Name to view the details of that Version");
-    }
-}
-
-
 //deny access if not logged in or not a super maintainer of any applications
 if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isSuperMaintainer())
     util_show_error_page_and_exit("Insufficient privileges.");
@@ -294,25 +251,9 @@ if ($aClean['sSub'])
                 "bIsRejected=$sIsRejected&sTitle=".$aClean['sAppType']."%20Queue");
 
         if (!$oApp) //app version
-        { 
-            echo html_frame_start("Potential duplicate versions in the database","90%","",0);
-            $oAppForVersion = new Application($oVersion->iAppId);
-            Version::display_approved($oAppForVersion->aVersionsIds);
-            echo html_frame_end("&nbsp;");
-
-            echo html_frame_start("Move test to version","90%","",0);
-            display_move_test_to_versions_table($oAppForVersion->aVersionsIds,$oVersion->iVersionId);
-            echo html_frame_end("&nbsp;");
-
-            //help
-            echo "<div align=center><table width='90%' border=0 cellpadding=3 cellspacing=0><tr><td>\n\n";
-            echo "<p>This is the full view of the application version waiting to be approved. \n";
-            echo "If you approve this application version an email will be sent to the author of the submission.<p>\n";
+        {
+            // Version handling moved to objectManager
 
-            echo "<b>App Version</b> This type of application will be nested under the selected application parent.\n";
-            echo "<p>Click delete to remove the selected item from the queue an email will automatically be sent to the\n";
-            echo "submitter to let him know the item was deleted.</p>\n\n";        
-            echo "</td></tr></table></div>\n\n";    
         } else // application
         {
             echo html_frame_start("Potential duplicate applications in the database", "90%", "", 0);
Index: appdb/include/version_queue.php
diff -u -p appdb/include/version_queue.php:1.3 appdb/include/version_queue.php:1.4
--- appdb/include/version_queue.php:1.3	21 Apr 2007  1:20:43 -0000
+++ appdb/include/version_queue.php	21 Apr 2007  1:20:43 -0000
@@ -71,6 +71,7 @@ class version_queue
 
     function outputEditor()
     {
+        $this->displayMoveTestTable();
         $this->oVersion->outputEditor();
 
         /* Allow the user to apply as maintainer if this is a new version.
@@ -154,6 +155,58 @@ class version_queue
     {
         return TRUE;
     }
+
+    function displayMoveTestTable()
+    {
+        $oApp = new application($this->oVersion->iAppId);
+
+        echo html_frame_start("Move test to version","90%","",0);
+        echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" ".
+                "cellspacing=\"1\">\n\n";
+
+        echo html_tr(array(
+                array("Version", 'width="80"'),
+                "Description",
+                array("Rating", 'width="80"'),
+                array("Wine version", 'width="80"'),
+                array("Comments", 'width="40"'),
+                array("Move test results", 'width="80"')
+                          ),
+                "color4");
+
+        $i = 0;
+        foreach($oApp->aVersionsIds as $iVersionId)
+        {
+            $oVersion = new Version($iVersionId);
+            if ($oVersion->sQueued == 'false')
+            {
+                //display row
+                echo html_tr(array(
+                        $oVersion->objectMakeLink(),
+                        util_trim_description($oVersion->sDescription),
+                        array($oVersion->sTestedRating, 'align="center"'),
+                        array($oVersion->sTestedRelease, 'align="center"'),
+                        array(Comment::get_comment_count_for_versionid(
+                            $oVersion->iVersionId), 'align="center"'),
+                        html_ahref("Move here",
+                          "admin/adminAppQueue.php?sSub=movetest&sAppType=version&".
+                          "iVersionId="
+                          .$this->oVersion->iVersionId."&iVersionIdMergeTo=".
+                          $oVersion->iVersionId)
+                                  ),
+                            ($i % 2) ? "color0" : "color1");
+
+                $i++;
+            }
+        }
+        echo "</table>\n";
+        echo html_frame_end("&nbsp;");
+    }
+
+    function objectDisplayQueueProcessingHelp()
+    {
+        version::objectDisplayQueueProcessingHelp();
+    }
 }
 
 ?>



More information about the wine-cvs mailing list