From 318a0345bb661faa1841ed219750f8bb09e2ea77 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Mon, 27 Feb 2012 14:59:16 +0100 Subject: [PATCH] CC-3174 : showbuilder make sure recorded files only display year in the table. --- airtime_mvc/application/models/StoredFile.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index b55848a21..557db98ff 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -588,8 +588,9 @@ class Application_Model_StoredFile { $fileSelect[] = $key; } else if ($key === "year") { + $plSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key; - $fileSelect[] = $key; + $fileSelect[] = "EXTRACT(YEAR FROM to_date(year, 'YYYY-MM-DD'))::varchar AS ".$key;; } //need to cast certain data as ints for the union to search on. else if (in_array($key, array("track_number", "bit_rate", "sample_rate"))){