projects
/
platal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdd977d
)
Improves getXorgId.
author
Stéphane Jacob
<sj@m4x.org>
Mon, 22 Feb 2010 23:04:13 +0000
(
00:04
+0100)
committer
Stéphane Jacob
<sj@m4x.org>
Thu, 25 Feb 2010 22:06:00 +0000
(23:06 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/profile.php
patch
|
blob
|
blame
|
history
diff --git
a/classes/profile.php
b/classes/profile.php
index
63da84c
..
8ebf639
100644
(file)
--- a/
classes/profile.php
+++ b/
classes/profile.php
@@
-642,6
+642,10
@@
class Profile
public static function getXorgId($schoolId)
{
+ if (!preg_match('/^[0-9]{6}$/', $xorgId)) {
+ return null;
+ }
+
$year = intval(substr($schoolId, 0, 3));
$rank = intval(substr($schoolId, 3, 3));