Index: branches/5.2.x/units/addresses/addresses_tag_processor.php =================================================================== diff -u -N -r14258 -r14957 --- branches/5.2.x/units/addresses/addresses_tag_processor.php (.../addresses_tag_processor.php) (revision 14258) +++ branches/5.2.x/units/addresses/addresses_tag_processor.php (.../addresses_tag_processor.php) (revision 14957) @@ -1,6 +1,6 @@ PrintList2($params); - if (!$ret){ - $block_params = array('name' => $params['empty_myaddresses_render_as']); + if ( !$ret ) { + $block_params = array ('name' => $params['empty_myaddresses_render_as']); $ret = $this->Application->ParseBlock($block_params); } @@ -29,26 +30,29 @@ * Print location using only filled in fields * * @param Array $params - * @access public + * @return string + * @access protected */ - function PrintLocation($params) + protected function PrintLocation($params) { - $object =& $this->Application->recallObject($this->getPrefixSpecial(),$this->Prefix, $params); + $object =& $this->getObject($params); + /* @var $object kDBItem */ - $fields = Array('City','State','Zip','Country'); - $ret = ''; - foreach($fields as $field) - { + $fields = Array ('City', 'State', 'Zip', 'Country'); + + foreach ($fields as $field) { $value = $object->GetField($field); - if ($field == 'Country' && $value) { + if ( $field == 'Country' && $value ) { $ret .= '
'; } - if ($value) { - $ret .= $value.', '; + + if ( $value ) { + $ret .= $value . ', '; } } - return rtrim($ret,', '); + + return rtrim($ret, ', '); } function EditLink($params) @@ -73,17 +77,19 @@ function IsProfileAddress($params) { $object =& $this->getObject($params); + /* @var $object kDBItem */ + return $object->GetDBField('IsProfileAddress'); } function BuildListSpecial($params) { - if ($this->Special != '') { + if ( $this->Special != '' ) { return $this->Special; } $list_unique_key = $this->getUniqueListKey($params); - if ($list_unique_key == '') { + if ( $list_unique_key == '' ) { return parent::BuildListSpecial($params); }