projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tel_type can't be null.
[platal.git]
/
include
/
reminder
/
ml.inc.php
diff --git
a/include/reminder/ml.inc.php
b/include/reminder/ml.inc.php
index
7e4b297
..
fa45b0b
100644
(file)
--- a/
include/reminder/ml.inc.php
+++ b/
include/reminder/ml.inc.php
@@
-36,11
+36,10
@@
class ReminderMl extends Reminder
S::i('uid'));
while (list($sub, $domain) = $res->next()) {
if (array_shift($subs) == "$sub@$domain") {
S::i('uid'));
while (list($sub, $domain) = $res->next()) {
if (array_shift($subs) == "$sub@$domain") {
- list($sub, $domain) = explode('@', $list);
if ($domain != $current_domain) {
$current_domain = $domain;
if ($domain != $current_domain) {
$current_domain = $domain;
- $client = new MMList(S::v('uid'), S::v('password'), $domain);
}
}
+ $client = new MMList(S::v('uid'), S::v('password'), $domain);
$client->subscribe($sub);
}
}
$client->subscribe($sub);
}
}
@@
-59,13
+58,9
@@
class ReminderMl extends Reminder
}
}
}
}
- protected function GetDisplayText() {}
-
- public function Display(&$page)
+ public function Prepare(&$page)
{
{
- header('Content-Type: text/html; charset=utf-8');
- $page->changeTpl('reminder/ml.tpl', NO_SKIN);
- $page->assign('baseurl', $this->GetBaseUrl());
+ parent::Prepare($page);
$res = XDB::iterRow("SELECT sub, domain
FROM register_subs
$res = XDB::iterRow("SELECT sub, domain
FROM register_subs
@@
-85,12
+80,21
@@
class ReminderMl extends Reminder
$page->assign_by_ref('lists', $lists);
}
$page->assign_by_ref('lists', $lists);
}
+ public function template()
+ {
+ return 'reminder/ml.tpl';
+ }
+ public function title()
+ {
+ return "Inscription aux listes de diffusion";
+ }
+
public static function IsCandidate(User &$user, $candidate)
{
public static function IsCandidate(User &$user, $candidate)
{
- $res = XDB::
execute
("SELECT COUNT(*) AS lists
-
FROM register_subs
-
WHERE uid = {?} AND type = 'list'",
-
$user->id());
+ $res = XDB::
query
("SELECT COUNT(*) AS lists
+ FROM register_subs
+ WHERE uid = {?} AND type = 'list'",
+ $user->id());
$mlCount = $res->fetchOneCell();
if (!$mlCount) {
$mlCount = $res->fetchOneCell();
if (!$mlCount) {