Module: appdb Branch: master Commit: 7021b123e6c8723fe45fd18e4b1fea0ce9eb2e0b URL: http://source.winehq.org/git/appdb.git/?a=commit;h=7021b123e6c8723fe45fd18e4...
Author: Rosanne DiMesio dimesio@earthlink.net Date: Mon Aug 28 08:12:41 2017 -0500
Add fixInvalidTestSubmitTime to admin control center
Signed-off-by: Rosanne DiMesio dimesio@earthlink.net Signed-off-by: Jeremy Newman jnewman@codeweavers.com
---
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();