projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Always redirect to the canonic URL before discovery can occur
[platal.git]
/
modules
/
profile
/
general.inc.php
diff --git
a/modules/profile/general.inc.php
b/modules/profile/general.inc.php
index
7af0a53
..
8227f36
100644
(file)
--- a/
modules/profile/general.inc.php
+++ b/
modules/profile/general.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
7
Polytechnique.org *
+ * Copyright (C) 2003-200
8
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-49,11
+49,11
@@
class ProfileNom implements ProfileSetting
$new = $this->prepareField($value);
$newLen = strlen($new);
$success = $this->matchWord($old, $new, $newLen)
$new = $this->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) {
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;
}
}
return $success ? $value : $current;
}
@@
-116,6
+116,8
@@
class ProfileGeneral extends ProfilePage
$this->settings['appli1']
= $this->settings['appli2']
= new ProfileAppli();
$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()
}
protected function _fetchData()
@@
-194,7
+196,7
@@
class ProfileGeneral extends ProfilePage
}
}
}
}
- public function _prepare(Pl
atal
Page &$page, $id)
+ public function _prepare(PlPage &$page, $id)
{
require_once "applis.func.inc.php";
}
{
require_once "applis.func.inc.php";
}