From: Nik Okuntseff Date: Thu, 22 Mar 2018 19:52:28 +0000 (+0000) Subject: Switched from timestamp to created column in a query. X-Git-Tag: timetracker_1.19-1~975 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e80e19c6b609af8e06403a337a5cd46200ab4fc6;p=timetracker.git Switched from timestamp to created column in a query. --- diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 6dede8b2..27f31bb3 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -693,12 +693,12 @@ class ttTeamHelper { $result = array(); $mdb2 = getConnection(); - $sql = "select id, name, lang, timestamp from tt_teams where status = 1 order by id desc"; + $sql = "select id, name, created, lang from tt_teams where status = 1 order by id desc"; $res = $mdb2->query($sql); $result = array(); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { - $val['date'] = substr($val['timestamp'], 0, 10); // Strip the time. + $val['date'] = substr($val['created'], 0, 10); // Strip the time. $result[] = $val; } return $result; @@ -914,9 +914,9 @@ class ttTeamHelper { $inactive_teams = array(); $mdb2 = getConnection(); - // Get all team ids for teams created or modified more than 6 months ago. + // Get all team ids for teams created or modified more than 8 months ago. // $ts = date('Y-m-d', strtotime('-1 year')); - $ts = date('Y-m-d', strtotime('-6 month')); + $ts = date('Y-m-d', strtotime('-8 month')); $sql = "select id from tt_teams where timestamp < '$ts' order by id"; $res = $mdb2->query($sql); diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 9427fe9d..27a3ad38 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.65.4134 | Copyright © Anuko | +  Anuko Time Tracker 1.17.65.4135 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index 7fb35e83..9f6972c9 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -851,6 +851,7 @@ if ($_POST) { setChange("ALTER TABLE `tt_teams` ADD `modified_ip` varchar(45) default NULL AFTER `modified`"); setChange("ALTER TABLE `tt_teams` ADD `modified_by` int(11) default NULL AFTER `modified_ip`"); setChange("UPDATE `tt_site_config` SET param_value = '1.17.65', modified = now() where param_name = 'version_db' and param_value = '1.17.64'"); + setChange("update `tt_teams` t inner join `tt_site_config` sc on (sc.param_name = 'version_db' and sc.param_value = '1.17.65') set t.created = t.timestamp where t.created is null"); } if ($_POST["cleanup"]) {