projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Port survey.
[platal.git]
/
include
/
validations
/
entreprises.inc.php
diff --git
a/include/validations/entreprises.inc.php
b/include/validations/entreprises.inc.php
index
a16bc7d
..
635173d
100644
(file)
--- a/
include/validations/entreprises.inc.php
+++ b/
include/validations/entreprises.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
8
Polytechnique.org *
+ * Copyright (C) 2003-200
9
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 *
@@
-45,7
+45,7
@@
class EntrReq extends Validate
public function __construct(User &$_user, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_stamp = 0)
{
public function __construct(User &$_user, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_stamp = 0)
{
- parent::__construct($_user,
tru
e, 'entreprise', $_stamp);
+ parent::__construct($_user,
fals
e, 'entreprise', $_stamp);
$this->id = $_id;
$this->name = $_name;
$this->acronym = $_acronym;
$this->id = $_id;
$this->name = $_name;
$this->acronym = $_acronym;
@@
-54,8
+54,7
@@
class EntrReq extends Validate
$this->tel = $_tel;
$this->fax = $_fax;
$this->tel = $_tel;
$this->fax = $_fax;
- $separators = array("&", "(", ")", "-", "_", ",", ";", ".", ":", "/", "\\", "\'", "\"");
- $replacement = array(" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ");
+ $_name = preg_replace('/[^0-9a-z]/i', ' ', strtolower(replace_accent($_name)));
$name = explode(" ", $_name);
$name_array = array_map("trim", $name);
$length = count($name_array);
$name = explode(" ", $_name);
$name_array = array_map("trim", $name);
$length = count($name_array);
@@
-74,7
+73,6
@@
class EntrReq extends Validate
. $where);
$this->suggestions = "| ";
while ($sug = $res->next()) {
. $where);
$this->suggestions = "| ";
while ($sug = $res->next()) {
- var_dump($sug);
$this->suggestions .= $sug['name'] . " | ";
}
}
$this->suggestions .= $sug['name'] . " | ";
}
}