projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'origin/fusionax' into account
[platal.git]
/
modules
/
newsletter.php
diff --git
a/modules/newsletter.php
b/modules/newsletter.php
index
9dfe318
..
a9b0bb7
100644
(file)
--- a/
modules/newsletter.php
+++ b/
modules/newsletter.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 *
@@
-57,17
+57,14
@@
class NewsletterModule extends PLModule
require_once 'newsletter.inc.php';
$nl = new NewsLetter($nid);
require_once 'newsletter.inc.php';
$nl = new NewsLetter($nid);
+ $user =& S::user();
if (Get::has('text')) {
if (Get::has('text')) {
- $nl->toText($page,
S::v('prenom'), S::v('nom'), S::v('femme')
);
+ $nl->toText($page,
$user
);
} else {
} else {
- $nl->toHtml($page,
S::v('prenom'), S::v('nom'), S::v('femme')
);
+ $nl->toHtml($page,
$user
);
}
if (Post::has('send')) {
}
if (Post::has('send')) {
- $res = XDB::query("SELECT hash FROM newsletter_ins WHERE user_id = {?}", S::i('uid'));
- $nl->sendTo(S::v('prenom'), S::v('nom'),
- S::v('bestalias'), S::v('femme'),
- S::v('mail_fmt') != 'texte',
- $res->fetchOneCell());
+ $nl->sendTo($user);
}
}
}
}
@@
-87,7
+84,7
@@
class NewsletterModule extends PLModule
$page->assign('art', $art);
} elseif (Post::has('valid')) {
require_once('validations.inc.php');
$page->assign('art', $art);
} elseif (Post::has('valid')) {
require_once('validations.inc.php');
- $art = new NLReq(S::
v('uid'
), Post::v('title'),
+ $art = new NLReq(S::
user(
), Post::v('title'),
Post::v('body'), Post::v('append'));
$art->submit();
$page->assign('submited', true);
Post::v('body'), Post::v('append'));
$art->submit();
$page->assign('submited', true);