projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start porting carnet to UserFilter.
[platal.git]
/
include
/
banana
/
ml.inc.php
diff --git
a/include/banana/ml.inc.php
b/include/banana/ml.inc.php
index
39dacf6
..
e2457f3
100644
(file)
--- a/
include/banana/ml.inc.php
+++ b/
include/banana/ml.inc.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 *
@@
-45,10
+45,13
@@
class MLBanana extends Banana
{
static public $listname;
static public $domain;
{
static public $listname;
static public $domain;
+ private $user;
- function __construct(
$forlife
, $params = null)
+ function __construct(
User &$user
, $params = null)
{
global $globals;
{
global $globals;
+ $this->user = &$user;
+
Banana::$spool_root = $globals->banana->spool_root;
Banana::$spool_boxlist = false;
Banana::$msgedit_canattach = true;
Banana::$spool_root = $globals->banana->spool_root;
Banana::$spool_boxlist = false;
Banana::$msgedit_canattach = true;
@@
-60,9
+63,7
@@
class MLBanana extends Banana
Banana::$msgshow_mimeparts[] = 'source';
}
array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
Banana::$msgshow_mimeparts[] = 'source';
}
array_push(Banana::$msgparse_headers, 'x-org-id', 'x-org-mail');
- if (!S::v('core_rss_hash')) {
- Banana::$feed_active = false;
- }
+ Banana::$feed_active = S::hasAuthToken();
MLBanana::$listname = $params['listname'];
MLBanana::$domain = $params['domain'];
MLBanana::$listname = $params['listname'];
MLBanana::$domain = $params['domain'];
@@
-75,16
+76,16
@@
class MLBanana extends Banana
global $platal, $globals;
$nom = S::v('prenom') . ' ' . S::v('nom');
global $platal, $globals;
$nom = S::v('prenom') . ' ' . S::v('nom');
- $mail =
S::v('bestalias') . '@' . $globals->mail->domain
;
+ $mail =
$this->user->bestEmail()
;
$sig = $nom . ' (' . S::v('promo') . ')';
$sig = $nom . ' (' . S::v('promo') . ')';
- Banana::$msgedit_headers['X-Org-Mail'] =
S::v('forlife') . '@' . $globals->mail->domain
;
+ Banana::$msgedit_headers['X-Org-Mail'] =
$this->user->forlifeEmail()
;
// Tree color
// Tree color
- $req = XDB::query(
"
SELECT tree_unread, tree_read
- FROM
{$globals->banana->table_prefix}profil
s
- WHERE uid=
{?}", S::i('uid'
));
+ $req = XDB::query(
'
SELECT tree_unread, tree_read
+ FROM
forum_profile
s
+ WHERE uid=
{?}', $this->user->id(
));
if (!(list($unread, $read) = $req->fetchOneRow())) {
if (!(list($unread, $read) = $req->fetchOneRow())) {
- $unread = '
b
';
+ $unread = '
o
';
$read = 'dg';
}
Banana::$tree_unread = $unread;
$read = 'dg';
}
Banana::$tree_unread = $unread;