aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2012-04-01 21:53:55 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2012-04-01 21:53:55 +0000
commit6c46783c344d72bf6f96e071b9c5cb0c3836d0c5 (patch)
tree6f4d7230cf7f44c775bc29e4906ea568bb1df2c2 /h-source/Application/Include
parenta2c4e647b694b1d1aa0cd9bca1c23549f7b6ce09 (diff)
improved comm_year allowed values
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r--h-source/Application/Include/hardware.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/h-source/Application/Include/hardware.php b/h-source/Application/Include/hardware.php
index 0071ab6..bc25ff7 100644
--- a/h-source/Application/Include/hardware.php
+++ b/h-source/Application/Include/hardware.php
@@ -160,7 +160,18 @@ class Hardware
return null;
}
- public static $commYear = 'not-specified,2012,2011,2010,2009,2008,2007,2006,2005,2004,2003,2002,2001,2000,1999,1998,1997,1996,1995,1994,1993,1992';
+ //get the list of the allowed years of commercialization
+ public static function getCommYears()
+ {
+ $currentYear = (int)date("Y");
+ $allowed = 'not-specified';
+
+ for ($i=$currentYear;$i>1991;$i--)
+ {
+ $allowed .= ",$i";
+ }
+ return $allowed;
+ }
public static $trackSelect = 'not-specified,no,yes';