X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fpage.inc.php;h=64d0bba76362121f6dbc27cdcb8e6b6ba0e891d2;hb=4279d3bc87776ede0e3f3a9789c3836b28f54db6;hp=43d068359157c49ca0d57bf9fe4c4262c4c75367;hpb=59bec5bc5512a4f962ebac7b0346f59cdf56f901;p=platal.git diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index 43d0683..64d0bba 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -180,6 +180,9 @@ abstract class ProfileGeoloc implements ProfileSetting $address = array_merge($address, cut_address(@$address['text'])); $address['checked'] = true; } + } elseif (@$address['changed'] && !@$address['text']) { + $address = empty_address(); + $address['pub'] = 'private'; } $address['precise_lat'] = rtrim($address['precise_lat'], '.0'); $address['precise_lon'] = rtrim($address['precise_lon'], '.0'); @@ -300,7 +303,7 @@ abstract class ProfilePage implements PlWizardPage $page->assign('errors', $this->errors); } - public function process() + public function process(&$global_success) { $global_success = true; $this->fetchData(); @@ -323,9 +326,14 @@ abstract class ProfilePage implements PlWizardPage return Post::has('next_page') ? PlWizard::NEXT_PAGE : PlWizard::CURRENT_PAGE; } Platal::page()->trigError("Certains champs n'ont pas pu être validés, merci de corriger les informations " - . "de ton profil et de revalider ta demande"); + . "de ton profil et de revalider ta demande."); return PlWizard::CURRENT_PAGE; } + + public function success() + { + return 'Ton profil a bien été mis à jour.'; + } } require_once dirname(__FILE__) . '/general.inc.php';