X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fprofile%2Fgeneral.inc.php;h=d09df85b704015ba4fd7ac32fd063ad3b270f05f;hb=59bec5bc5512a4f962ebac7b0346f59cdf56f901;hp=7af0a536bf09b0867cff819822c99754d2896657;hpb=7bff4cb031e50e345d346d2a333b5ac7a9d434fd;p=platal.git diff --git a/modules/profile/general.inc.php b/modules/profile/general.inc.php index 7af0a53..d09df85 100644 --- a/modules/profile/general.inc.php +++ b/modules/profile/general.inc.php @@ -1,6 +1,6 @@ prepareField($value); $newLen = strlen($new); $success = $this->matchWord($old, $new, $newLen) - || $this->matchWord($ini, $new, $newLen); + || $this->matchWord($ini, $new, $newLen) + || ($field == 'nom' && $new == 'DE ' . $old); if (!$success) { - global $page; - $page->trig("Le $field que tu as choisi ($value) est trop loin de ton $field initial ($init)" - . (($init == $current)? "" : " et de ton prénom précédent ($current)")); + Platal::page()->trigError("Le $field que tu as choisi ($value) est trop loin de ton $field initial ($init)" + . (($init == $current)? "" : " et de ton prénom précédent ($current)")); } return $success ? $value : $current; } @@ -116,6 +116,8 @@ class ProfileGeneral extends ProfilePage $this->settings['appli1'] = $this->settings['appli2'] = new ProfileAppli(); + $this->watched= array('nom' => true, 'freetext' => true, 'mobile' => true, 'web' => true, + 'appli1' => true, 'appli2' => true, 'nationalite' => true, 'nick' => true); } protected function _fetchData() @@ -194,7 +196,7 @@ class ProfileGeneral extends ProfilePage } } - public function _prepare(PlatalPage &$page, $id) + public function _prepare(PlPage &$page, $id) { require_once "applis.func.inc.php"; }