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
/
nl.inc.php
diff --git
a/include/validations/nl.inc.php
b/include/validations/nl.inc.php
index
25067a4
..
728bf38
100644
(file)
--- a/
include/validations/nl.inc.php
+++ b/
include/validations/nl.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-201
0
Polytechnique.org *
+ * Copyright (C) 2003-201
1
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 NLReq extends Validate
// }}}
// {{{ constructor
// }}}
// {{{ constructor
- public function __construct(User
&
$_user, $_title, $_body, $_append)
+ public function __construct(User $_user, $_title, $_body, $_append)
{
parent::__construct($_user, false, 'nl');
$this->art = new NLArticle($_title, $_body, $_append);
{
parent::__construct($_user, false, 'nl');
$this->art = new NLArticle($_title, $_body, $_append);
@@
-60,9
+60,9
@@
class NLReq extends Validate
protected function handle_editor()
{
protected function handle_editor()
{
- $this->art->
_
body = Env::v('nl_body');
- $this->art->
_
title = Env::v('nl_title');
- $this->art->
_
append = Env::v('nl_append');
+ $this->art->body = Env::v('nl_body');
+ $this->art->title = Env::v('nl_title');
+ $this->art->append = Env::v('nl_append');
return true;
}
return true;
}
@@
-79,10
+79,11
@@
class NLReq 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 " L'article que
tu avais
proposé (" . $this->art->title() . ") vient d'être validé.";
+ return " L'article que
$you_have
proposé (" . $this->art->title() . ") vient d'être validé.";
} else {
} else {
- return " L'article que
tu avais
proposé a été refusé.";
+ return " L'article que
$you_have
proposé a été refusé.";
}
}
}
}
@@
-106,7
+107,7
@@
class NLReq extends Validate
public function commit()
{
public function commit()
{
- $nl
= new NewsLetter(
);
+ $nl
= NewsLetter::forGroup(NewsLetter::GROUP_XORG)->getPendingIssue(true
);
$nl->saveArticle($this->art);
return true;
}
$nl->saveArticle($this->art);
return true;
}