Added parameter validation to report handlers.
[timetracker.git] / dbinstall.php
index bf8c958..6cf5a80 100755 (executable)
@@ -709,8 +709,12 @@ if ($_POST) {
     setChange("ALTER TABLE `tt_log` ADD `paid` tinyint(4) NULL default '0' AFTER `billable`");
   }
 
-  if ($_POST["convert11400to11500"]) {
+  if ($_POST["convert11400to11700"]) {
     setChange("ALTER TABLE `tt_teams` DROP `address`");
+    setChange("ALTER TABLE `tt_fav_reports` ADD `report_spec` text default NULL AFTER `user_id`");
+    setChange("ALTER TABLE `tt_fav_reports` ADD `paid_status` tinyint(4) default NULL AFTER `invoice`");
+    setChange("ALTER TABLE `tt_fav_reports` ADD `show_paid` tinyint(4) NOT NULL DEFAULT '0' AFTER `show_invoice`");
+    setChange("ALTER TABLE `tt_expense_items` ADD `paid` tinyint(4) NULL default '0' AFTER `invoice_id`");
   }
 
   if ($_POST["cleanup"]) {
@@ -755,7 +759,7 @@ if ($_POST) {
 <h2>DB Install</h2>
 <table width="80%" border="1" cellpadding="10" cellspacing="0">
   <tr>
-    <td width="80%"><b>Create database structure (v1.15.0)</b>
+    <td width="80%"><b>Create database structure (v1.17.0)</b>
     <br>(applies only to new installations, do not execute when updating)</br></td><td><input type="submit" name="crstructure" value="Create"></td>
   </tr>
 </table>
@@ -791,8 +795,8 @@ if ($_POST) {
     <td><input type="submit" name="convert1600to11400" value="Update"><br></td>
   </tr>
   <tr valign="top">
-    <td>Update database structure (v1.14 to v1.15)</td>
-    <td><input type="submit" name="convert11400to11500" value="Update"><br></td>
+    <td>Update database structure (v1.14 to v1.17)</td>
+    <td><input type="submit" name="convert11400to11700" value="Update"><br></td>
   </tr>
 </table>