Skip to content

Commit

Permalink
$link in prepareTableValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
andrrr committed Feb 2, 2012
1 parent 82ca5cc commit 5e3bcfb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fields/field.price.php
Expand Up @@ -137,8 +137,16 @@ public function appendFormattedElement(&$wrapper, $data, $encode=false) {

public function prepareTableValue($data, XMLElement $link = null) {
if (empty($data)) return;

setlocale(LC_MONETARY, $this->get('locale'));
return money_format($this->get('format'), General::sanitize($data['value']));
$value = money_format($this->get('format'), General::sanitize($data['value']));

if ($link) {
$link->setValue($value);
return $link->generate();
}

return $value;
}

/*-------------------------------------------------------------------------
Expand Down

0 comments on commit 5e3bcfb

Please sign in to comment.