summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-03-03 16:12:05 +0100
committerAdrian Lang <mail@adrianlang.de>2009-03-09 08:06:31 +0100
commitfbe794e44d235d2f66ef418796f87947631afb6a (patch)
tree0ce90398638bdb938ebab6b3b400a3aaece0cc90 /lib
parent6ab9d6b14016cf97fe1a31d89591e1a0e919c8a7 (diff)
Improve handling of null values in profile parameters.
This commit fixes two issues: - Allowing remote users to clear profile parameters via OMB. - Improved handling of profile parameters which evaluate to false ('0' for example)
Diffstat (limited to 'lib')
-rw-r--r--lib/profilelist.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/profilelist.php b/lib/profilelist.php
index c2040fbc2..75053b7a4 100644
--- a/lib/profilelist.php
+++ b/lib/profilelist.php
@@ -102,13 +102,13 @@ class ProfileList extends Widget
'alt' =>
($this->profile->fullname) ? $this->profile->fullname :
$this->profile->nickname));
- $hasFN = ($this->profile->fullname) ? 'nickname' : 'fn nickname';
+ $hasFN = ($this->profile->fullname !== '') ? 'nickname' : 'fn nickname';
$this->out->elementStart('span', $hasFN);
$this->out->raw($this->highlight($this->profile->nickname));
$this->out->elementEnd('span');
$this->out->elementEnd('a');
- if ($this->profile->fullname) {
+ if ($this->profile->fullname !== '') {
$this->out->elementStart('dl', 'entity_fn');
$this->out->element('dt', null, 'Full name');
$this->out->elementStart('dd');
@@ -118,7 +118,7 @@ class ProfileList extends Widget
$this->out->elementEnd('dd');
$this->out->elementEnd('dl');
}
- if ($this->profile->location) {
+ if ($this->profile->location !== '') {
$this->out->elementStart('dl', 'entity_location');
$this->out->element('dt', null, _('Location'));
$this->out->elementStart('dd', 'label');
@@ -126,7 +126,7 @@ class ProfileList extends Widget
$this->out->elementEnd('dd');
$this->out->elementEnd('dl');
}
- if ($this->profile->homepage) {
+ if ($this->profile->homepage !== '') {
$this->out->elementStart('dl', 'entity_url');
$this->out->element('dt', null, _('URL'));
$this->out->elementStart('dd');
@@ -137,7 +137,7 @@ class ProfileList extends Widget
$this->out->elementEnd('dd');
$this->out->elementEnd('dl');
}
- if ($this->profile->bio) {
+ if ($this->profile->bio !== '') {
$this->out->elementStart('dl', 'entity_note');
$this->out->element('dt', null, _('Note'));
$this->out->elementStart('dd', 'note');