From 972fd3c59f152b7f2d61f7aa30afc819f094e4aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Fri, 17 Sep 2010 12:00:43 +0200 Subject: [PATCH] Uses phone class a little bit more. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile.php | 3 ++- modules/profile/jobs.inc.php | 10 +++------- 2 files changed, 5 insertions(+), 8 deletions(-) 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() ); } -- 2.1.4