Index: branches/5.2.x/units/listings/listings_tag_processor.php =================================================================== diff -u -N -r14254 -r14873 --- branches/5.2.x/units/listings/listings_tag_processor.php (.../listings_tag_processor.php) (revision 14254) +++ branches/5.2.x/units/listings/listings_tag_processor.php (.../listings_tag_processor.php) (revision 14873) @@ -1,6 +1,6 @@ Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); - $listing_type =& $this->Application->recallObject( 'lst', 'lst', $params ); + return $this->_expirationField($params, 'DateFormat'); + } - $dur_type_mapping = Array( 1 => 1, - 2 => 60, - 3 => 3600, - 4 => 3600*24, - 5 => 3600*24*7, - 6 => 3600*24*365/12, - 7 => 3600*24*365 - ); - $duration = $listing_type->GetDBField('Duration'); - $duration_type = $listing_type->GetDBField('DurationType'); - $expiration_interval = $duration * $dur_type_mapping[$duration_type]; - $expiration_date = adodb_mktime() + $expiration_interval; - - $lang =& $this->Application->recallObject('lang.current'); - $format = $lang->GetDBField('DateFormat'); - $expiration_date = adodb_date($format, $expiration_date); - - return $expiration_date; + protected function ExpirationTime($params) + { + return $this->_expirationField($params, 'TimeFormat'); } - function ExpirationTime($params) + protected function _expirationField($params, $format_field) { - $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); + $object =& $this->getObject($params); + /* @var $object kDBItem */ + $listing_type =& $this->Application->recallObject( 'lst', 'lst', $params ); + /* @var $listing_type kDBItem */ - $dur_type_mapping = Array( 1 => 1, - 2 => 60, - 3 => 3600, - 4 => 3600*24, - 5 => 3600*24*7, - 6 => 3600*24*365/12, - 7 => 3600*24*365 - ); + $dur_type_mapping = Array ( + 1 => 1, 2 => 60, 3 => 3600, 4 => 3600 * 24, + 5 => 3600 * 24 * 7, 6 => 3600 * 24 * 365 / 12, 7 => 3600 * 24 * 365 + ); + $duration = $listing_type->GetDBField('Duration'); $duration_type = $listing_type->GetDBField('DurationType'); $expiration_interval = $duration * $dur_type_mapping[$duration_type]; $expiration_date = adodb_mktime() + $expiration_interval; $lang =& $this->Application->recallObject('lang.current'); - $format = $lang->GetDBField('TimeFormat'); - $expiration_date = adodb_date($format, $expiration_date); + /* @var $lang LanguagesItem */ - return $expiration_date; + return adodb_date($lang->GetDBField($format_field), $expiration_date); } } \ No newline at end of file Index: branches/5.2.x/install/upgrades.php =================================================================== diff -u -N -r14583 -r14873 --- branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 14583) +++ branches/5.2.x/install/upgrades.php (.../upgrades.php) (revision 14873) @@ -1,6 +1,6 @@ Conn->GetOne($sql); - - $ml_formatter =& $this->Application->recallObject('kMultiLanguage'); - /* @var $ml_formatter kMultiLanguage */ - - $field = $ml_formatter->LangFieldName('cust_' . $custom_field_id, true); - - $sql = 'UPDATE ' . TABLE_PREFIX . 'CategoryCustomData - SET ' . $field . ' = "' . $to_template . '" - WHERE ' . $field . ' = "' . $from_template . '"'; - $this->Conn->Query($sql); - } - - /** * Update to 5.0.1 * * @param string $mode when called mode {before, after) Index: branches/5.2.x/units/links/links_config.php =================================================================== diff -u -N -r14724 -r14873 --- branches/5.2.x/units/links/links_config.php (.../links_config.php) (revision 14724) +++ branches/5.2.x/units/links/links_config.php (.../links_config.php) (revision 14873) @@ -1,6 +1,6 @@ Array ('type' => 'string', 'default' => ''), 'CategoryFilename' => Array ('type' => 'string', 'default' => ''), 'PrimaryCat' => Array ('type' => 'int', 'default' => 0), + 'IsHot' => Array ('type' => 'int', 'default' => 0), + 'IsNew' => Array ('type' => 'int', 'default' => 0), + 'IsPop' => Array ('type' => 'int', 'default' => 0), 'CachedNavbar' => Array ('type' => 'string', 'default' => ''), 'ParentPath' => Array ('type' => 'string', 'default' => ''),