Last change
on this file since 1438 was
1438,
checked in by teymour, 11 years ago
|
Bug étrange avec les url_for dans les task
Gestion plus rationnelle du app.yml
Parametrage de l'envoi des alertes
|
File size:
923 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /** |
---|
4 | * Alerte |
---|
5 | * |
---|
6 | * This class has been auto-generated by the Doctrine ORM Framework |
---|
7 | * |
---|
8 | * @package cpc |
---|
9 | * @subpackage model |
---|
10 | * @author Your name here |
---|
11 | * @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $ |
---|
12 | */ |
---|
13 | class Alerte extends BaseAlerte |
---|
14 | { |
---|
15 | public function getEmail() { |
---|
16 | if ($c = $this->Citoyen) { |
---|
17 | return $c->email; |
---|
18 | } |
---|
19 | return $this->_get('email'); |
---|
20 | } |
---|
21 | |
---|
22 | public function generateVerif() { |
---|
23 | $v = md5(rand(1, 999999999999)); |
---|
24 | $this->_set('verif', $v); |
---|
25 | return $v; |
---|
26 | } |
---|
27 | public function getTitre() { |
---|
28 | if (!$this->_get('titre')) |
---|
29 | return "Recherche correspondant aux mots clés « ".$this->query." »"; |
---|
30 | return $this->_get('titre'); |
---|
31 | } |
---|
32 | |
---|
33 | public function save(Doctrine_Connection $c = null) { |
---|
34 | if (!$this->last_mail) |
---|
35 | $this->last_mail = date('Y-m-d H:i:s'); |
---|
36 | if (!$this->verif) |
---|
37 | $this->generateVerif(); |
---|
38 | return parent::save($c); |
---|
39 | } |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.