From: Stéphane Jacob Date: Sat, 11 Apr 2009 19:54:23 +0000 (+0200) Subject: Fixes phones edition. X-Git-Tag: xorg/1.0.0~332^2~313^2~18 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3cd815ca837659beb6daae9d5516ea51f3b246df;p=platal.git Fixes phones edition. --- 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