diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 79034699294ca8ef371b99c1458db42f2a7a2a6a..773ae5f4443639e1f4e25c0bcd83f6c2a11412cb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -21,6 +21,7 @@ CHANGELOG for Views 2 for Drupal 6 o #529164: Fatal typo in profile list field. o #537870 by dww: Fixed a bug in the [uplodate_fid-size] token where format_size() was called on it twice. o #510910 by mfb: Fixed bug where multiple fields sharing a column in a table was broken so only the final field would display. + o #546586 by dww: Fixed bugs that prevented '0' being a valid rewrite text or empty text for a view field. Also fixes a logic bug regarding the handling of the 'Count the number 0 as empty' setting. Other changes: o Implement a post_render hook (for themes too) and cache method. diff --git a/handlers/views_handler_field.inc b/handlers/views_handler_field.inc index 3993b939fd661af2c7440b9b279bebf03d4164ad..d1cbe4fa4b92a60a7bd9e7188184643b514e4df9 100644 --- a/handlers/views_handler_field.inc +++ b/handlers/views_handler_field.inc @@ -472,8 +472,8 @@ class views_handler_field extends views_handler { $this->last_render = $value; } - if (empty($this->last_render) && !empty($this->options['empty'])) { - if ($this->last_render !== 0 || empty($this->options['empty_zero'])) { + if (empty($this->last_render)) { + if ($this->last_render !== 0 || !empty($this->options['empty_zero'])) { $this->last_render = $this->options['empty']; } } @@ -493,7 +493,7 @@ class views_handler_field extends views_handler { return ''; } - if (!empty($alter['alter_text']) && !empty($alter['text'])) { + if ($alter['alter_text'] !== '' && $alter['text'] !== '') { $tokens = $this->get_render_tokens($alter); $value = $this->render_altered($alter, $tokens); }