From 3cd815ca837659beb6daae9d5516ea51f3b246df Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 11 Apr 2009 21:54:23 +0200 Subject: [PATCH] Fixes phones edition. --- htdocs/javascript/profile.js | 10 +++++----- modules/profile/page.inc.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/javascript/profile.js b/htdocs/javascript/profile.js index 70159b3..add62f8 100644 --- a/htdocs/javascript/profile.js +++ b/htdocs/javascript/profile.js @@ -335,15 +335,15 @@ function removeTel(id) function addPhoneComment(id) { - $(id + '_comment').show(); - $(id + '_addComment').hide(); + $('#' + id + '_comment').show(); + $('#' + id + '_addComment').hide(); } function removePhoneComment(id, pref) { - $(id + '_comment').hide(); - $(id + '_comment').find("[name='" + pref + "[comment]']").val(''); - $(id + '_addComment').show(); + $('#' + id + '_comment').hide(); + $('#' + id + '_comment').find("[name='" + pref + "[comment]']").val(''); + $('#' + id + '_addComment').show(); } // {{{1 Groups diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index 628a949..8a5014f 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -139,7 +139,7 @@ class ProfilePhones implements ProfileSetting public function value(ProfilePage &$page, $field, $value, &$success) { $success = true; - if (is_null($value) || !is_array($value)) { + if (is_null($value)) { $value = array(); $res = XDB::iterator("SELECT t.display_tel AS tel, t.tel_type AS type, t.pub, t.comment FROM profile_phones AS t -- 2.1.4