<?php
/***************************************************************************
- * Copyright (C) 2003-2008 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public function __construct(User &$_user, $_id, $_name, $_acronym, $_url, $_email, $_tel, $_fax, $_stamp = 0)
{
- parent::__construct($_user, true, 'entreprise', $_stamp);
+ parent::__construct($_user, false, 'entreprise', $_stamp);
$this->id = $_id;
$this->name = $_name;
$this->acronym = $_acronym;
$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);
. $where);
$this->suggestions = "| ";
while ($sug = $res->next()) {
- var_dump($sug);
$this->suggestions .= $sug['name'] . " | ";
}
}