projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Activates geocoding reminder for new geocoding.
[platal.git]
/
include
/
validations
/
surveys.inc.php
diff --git
a/include/validations/surveys.inc.php
b/include/validations/surveys.inc.php
index
b9967b8
..
e2ca7a1
100644
(file)
--- a/
include/validations/surveys.inc.php
+++ b/
include/validations/surveys.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
11
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 *
@@
-33,7
+33,7
@@
class SurveyReq extends Validate
// }}}
// {{{ constructor
// }}}
// {{{ constructor
- public function __construct($_title, $_description, $_end, $_mode, $_promos, $_questions, User
&
$_user)
+ public function __construct($_title, $_description, $_end, $_mode, $_promos, $_questions, User $_user)
{
parent::__construct($_user, false, 'surveys');
$this->title = $_title;
{
parent::__construct($_user, false, 'surveys');
$this->title = $_title;
@@
-65,10
+65,11
@@
class SurveyReq extends Validate
protected function _mail_body($isok)
{
protected function _mail_body($isok)
{
+ $you_have = ($this->formal ? 'vous aviez' : 'tu avais');
if ($isok) {
if ($isok) {
- return " Le sondage que
tu avais
proposé vient d'être validé.";
+ return " Le sondage que
$you_have
proposé vient d'être validé.";
} else {
} else {
- return " Le sondage que
tu avais
proposé a été refusé.";
+ return " Le sondage que
$you_have
proposé a été refusé.";
}
}
}
}
@@
-91,14
+92,9
@@
class SurveyReq extends Validate
public function commit()
{
public function commit()
{
- $sql = 'INSERT INTO survey_surveys
- SET questions={?},
- title={?},
- description={?},
- author_id={?},
- end={?},
- mode={?},
- promos={?}';
+ $sql = 'INSERT INTO surveys
+ SET questions = {?}, title = {?}, description = {?},
+ uid = {?}, end = {?},mode = {?}, promos = {?}';
return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->user->id(), $this->end, $this->mode, $this->promos);
}
return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->user->id(), $this->end, $this->mode, $this->promos);
}