Index: branches/5.0.x/in-link/units/listings/listings_tag_processor.php =================================================================== diff -u -N --- branches/5.0.x/in-link/units/listings/listings_tag_processor.php (revision 12746) +++ branches/5.0.x/in-link/units/listings/listings_tag_processor.php (revision 0) @@ -1,104 +0,0 @@ -Application->recallObject($this->getPrefixSpecial(), $this->Prefix, $params); - - return $this->Application->HREF($params['edit_template'],'', Array( - 'm_opener' => 'd', - 'lst_mode' => 't', - 'lst_event' => 'OnEdit', - 'lst_id' => $object->GetDBField('ListingTypeId'), - 'pass' => 'all,lst' - ), 'index.php'); - } - - function LinkEditLink($params) - { - $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); - - $sql = 'SELECT '.$this->Application->getUnitOption('l', 'IDField').' - FROM '.$this->Application->getUnitOption('l', 'TableName').' - WHERE ResourceId = '.$object->GetDBField('ItemResourceId'); - - return $this->Application->HREF($params['edit_template'],'', Array( - 'm_opener' => 'd', - 'l_mode' => 't', - 'l_event' => 'OnEdit', - 'l_id' => $this->Conn->GetOne($sql), - 'pass' => 'all,l' - )); - } - - function ExpirationDate($params) - { - $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); - $listing_type =& $this->Application->recallObject( 'lst', 'lst', $params ); - - $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; - } - - function ExpirationTime($params) - { - $object =& $this->Application->recallObject( $this->getPrefixSpecial(), $this->Prefix, $params ); - $listing_type =& $this->Application->recallObject( 'lst', 'lst', $params ); - - $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); - - return $expiration_date; - } -} \ No newline at end of file