appdb/admin adminAppQueue.php
WineHQ
wineowner at wine.codeweavers.com
Wed Apr 26 10:12:55 CDT 2006
ChangeSet ID: 24436
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2006/04/26 10:12:55
Modified files:
admin : adminAppQueue.php
Log message:
Tony Lambregts <tony.lambregts at gmail.com>
Allow moving test results of a queued version to an approved version
Patch: http://cvs.winehq.org/patch.py?id=24436
Old revision New revision Changes Path
1.52 1.53 +63 -0 appdb/admin/adminAppQueue.php
Index: appdb/admin/adminAppQueue.php
diff -u -p appdb/admin/adminAppQueue.php:1.52 appdb/admin/adminAppQueue.php:1.53
--- appdb/admin/adminAppQueue.php:1.52 26 Apr 2006 15:12:55 -0000
+++ appdb/admin/adminAppQueue.php 26 Apr 2006 15:12:55 -0000
@@ -71,6 +71,49 @@ 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
+ $bgcolor = ($c % 2 == 0) ? "color0" : "color1";
+
+ //display row
+ echo "<tr class=$bgcolor>\n";
+ echo " <td>".html_ahref($oVersion->sName,"adminAppQueue.php?sub=movetest&apptype=version&versionId=".$icurrentVersionId."&versionIdMergeTo=".$oVersion->iVersionId)."</td>\n";
+
+ echo " <td>".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>".sizeof($oVersion->aCommentsIds)."</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())
{
@@ -172,6 +215,22 @@ if ($_REQUEST['sub'])
/* redirect back to the main page */
redirect(apidb_fullurl("admin/adminAppQueue.php"));
}
+ else if ($_REQUEST['sub'] == 'movetest')
+ {
+ if(is_numeric($_REQUEST['versionIdMergeTo']))
+ {
+ // move this Test submission under the existing version //
+ $oTest->iVersionId = $_REQUEST['versionIdMergeTo'];
+ $oTest->update();
+
+ // delete the Version entry
+ $oVersion = new Version($_REQUEST['versionId']);
+ $oVersion->delete();
+ }
+
+ // redirect back to the main page
+ redirect(apidb_fullurl("admin/adminAppQueue.php"));
+ }
else if ($_REQUEST['sub'] == 'Delete')
{
@@ -229,6 +288,10 @@ if ($_REQUEST['sub'])
display_approved_versions($oAppForVersion->aVersionsIds);
echo html_frame_end(" ");
+ echo html_frame_start("Move test to version","90%","",0);
+ display_move_test_to_versions_table($oAppForVersion->aVersionsIds,$oVersion->iVersionId);
+ echo html_frame_end(" ");
+
//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";
More information about the wine-cvs
mailing list