formatting

This commit is contained in:
Rudi Grinberg 2012-09-19 17:39:30 -04:00
parent cde8c60afc
commit 7bb1eadf03
1 changed files with 9 additions and 7 deletions

View File

@ -104,13 +104,15 @@ class Application_Model_StoredFile
$dbMd = array(); $dbMd = array();
if (isset($p_md["MDATA_KEY_YEAR"])) { if (isset($p_md["MDATA_KEY_YEAR"])) {
// We need to make sure to clean this value before inserting into database. // We need to make sure to clean this value before
// If value is outside of range [-2^31, 2^31-1] then postgresl will throw error // inserting into database. If value is outside of range
// when trying to retrieve this value. We could make sure number is within these bounds, // [-2^31, 2^31-1] then postgresl will throw error when
// but simplest is to do substring to 4 digits (both values are garbage, but at least our // trying to retrieve this value. We could make sure
// new garbage value won't cause errors). If the value is 2012-01-01, then substring to // number is within these bounds, but simplest is to do
// first 4 digits is an OK result. // substring to 4 digits (both values are garbage, but
// CC-3771 // at least our new garbage value won't cause errors).
// If the value is 2012-01-01, then substring to first 4
// digits is an OK result. CC-3771
$year = $p_md["MDATA_KEY_YEAR"]; $year = $p_md["MDATA_KEY_YEAR"];