[AppDB] Add fixInvalidTestSubmitTime to admin control center
Rosanne DiMesio
dimesio at earthlink.net
Mon Aug 28 08:12:41 CDT 2017
Signed-off-by: Rosanne DiMesio <dimesio at earthlink.net>
---
admin.php | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/admin.php b/admin.php
index 5f89a4b..11e3aba 100644
--- a/admin.php
+++ b/admin.php
@@ -221,6 +221,14 @@ function fixNoteLinks()
}
+function fixInvalidTestSubmitTime()
+{
+ $sQuery = "UPDATE testResults SET submitTime = testedDate WHERE submitTime = '0000-00-00 00:00:00'";
+ $hResult = query_parameters($sQuery);
+
+ echo "Updated ".query_affected_rows()." test reports with invalid submit times.<br>";
+}
+
function deleteOrphanComments()
{
$sQuery = "DELETE FROM appComments WHERE NOT EXISTS( SELECT appVersion.versionId FROM appVersion";
@@ -312,6 +320,8 @@ function showChoices()
echo '<div class="list-group">';
echo '<a href="admin.php?sAction=fixNoteLinks" class="list-group-item"><h4>Fix/Show note links</h4></a>';
+
+ echo '<a href="admin.php?sAction=fixInvalidTestSubmitTime" class="list-group-item"><h4>Fix Invalid Test Submission Times</h4></a>';
echo '<a href="admin.php?sAction=updateAppMaintainerStates" class="list-group-item"><h4>Update application maintainer states</h4></a>';
@@ -354,6 +364,10 @@ switch(getInput('sAction', $aClean))
case 'fixNoteLinks':
fixNoteLinks();
break;
+
+ case 'fixInvalidTestSubmitTime';
+ fixInvalidTestSubmitTime();
+ break;
case 'deleteOrphanComments':
deleteOrphanComments();
--
2.12.3
More information about the wine-patches
mailing list