summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Wright2009-08-12 00:07:47 (GMT)
committer Derek Wright2009-08-12 00:07:47 (GMT)
commit4eca29ce50d3d2585cbef704d344ba56be0cc4df (patch)
tree2a6f8db4a9b14f9fc22bd311330d0a54a1e50086
parent3ccc1da106a5cdea4336a817ece9cac24a2a8059 (diff)
#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.
-rw-r--r--CHANGELOG.txt1
-rw-r--r--handlers/views_handler_field.inc6
2 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 7903469..773ae5f 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 3993b93..d1cbe4f 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);
}