From: Stéphane Jacob Date: Fri, 17 Sep 2010 10:00:43 +0000 (+0200) Subject: Uses phone class a little bit more. X-Git-Tag: xorg/1.0.1~180 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=972fd3c59f152b7f2d61f7aa30afc819f094e4aa;p=platal.git Uses phone class a little bit more. Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile.php b/modules/profile.php index fb62e72..34f431d 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -396,7 +396,8 @@ class ProfileModule extends PLModule $page->assign('prefid', $prefid); $page->assign('prefname', $prefname); $page->assign('telid', $telid); - $page->assign('tel', array()); + $phone = new Phone(); + $page->assign('tel', $phone->toFormArray()); } function handler_ajax_edu(&$page, $eduid, $class) diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 50510df..453d21f 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -45,6 +45,7 @@ class ProfileSettingJob implements ProfileSetting public function emptyJob() { $address = new Address(); + $phone = new Phone(); return array( 'id' => '0', 'jobid' => '', @@ -56,13 +57,8 @@ class ProfileSettingJob implements ProfileSetting 'w_email' => '', 'w_email_pub' => 'private', 'w_email_new' => '', - 'w_phone' => array(0 => array( - 'type' => 'fixed', - 'tel' => '', - 'pub' => 'private', - 'comment' => '', - ), - 'terms' => array()), + 'w_phone' => array(0 => $phone->toFormArray()), + 'terms' => array() ); }