Merge branch 'platal-0.9.17'
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 30 Jun 2008 20:41:13 +0000 (22:41 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Mon, 30 Jun 2008 20:41:13 +0000 (22:41 +0200)
Conflicts:
include/xorg/session.inc.php

Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
ChangeLog
classes/xorgsession.php
templates/skin/common.menu.tpl

index ee9b857..c210cca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@ Bug/Wish:
         - Fix email sending, correcting bugs introduced in r1897           -VZA
         - #841: Improves contrast of links in legends in skin 'Espace'     -FRU
         - #844: Uses INT in MySQL to store user ids                        -VZA
+        - #851: Adds a direct link to GApps for gapps-active users         -VZA
 
     * Lists:
         - #756: Can build the list of members from a file                  -FRU
index 7cbaec4..7c76433 100644 (file)
@@ -188,11 +188,12 @@ class XorgSession extends PlSession
                                     matricule, password, FIND_IN_SET(\'femme\', u.flags) AS femme,
                                     a.alias AS forlife, a2.alias AS bestalias,
                                     q.core_mail_fmt AS mail_fmt, UNIX_TIMESTAMP(q.banana_last) AS banana_last, q.watch_last, q.core_rss_hash,
-                                    FIND_IN_SET(\'watch\', u.flags) AS watch_account, q.last_version
+                                    FIND_IN_SET(\'watch\', u.flags) AS watch_account, q.last_version, g.g_account_name IS NOT NULL AS googleapps
                               FROM  auth_user_md5   AS u
                         INNER JOIN  auth_user_quick AS q  USING(user_id)
                         INNER JOIN  aliases         AS a  ON (u.user_id = a.id AND a.type = \'a_vie\')
                         INNER JOIN  aliases         AS a2 ON (u.user_id = a2.id AND FIND_IN_SET(\'bestalias\', a2.flags))
+                         LEFT JOIN  gapps_accounts  AS g  ON (u.user_id = g.l_userid AND g.g_status = \'active\')
                              WHERE  u.user_id = {?} AND u.perms IN(\'admin\', \'user\')', $uid);
         $sess = $res->fetchOneAssoc();
         $perms = $sess['perms'];
index c26852e..f93a58e 100644 (file)
@@ -55,6 +55,9 @@
 <div class="menu_title">Services</div>
 <div class="menu_item"><a href="emails/send">Envoyer un mail</a></div>
 <div class="menu_item"><a href="banana/">Forums &amp; PA</a></div>
+{if $smarty.session.googleapps}
+<div class="menu_item"><a href="http://gmail.polytechnique.org/">Mails Google Apps</a></div>
+{/if}
 <div class="menu_item"><a href="lists">Listes de diffusion</a></div>
 <div class="menu_item"><a href="payment">TĂ©lĂ©paiements</a></div>
 <div class="menu_item"><a href="emails/antispam/submit">Soumettre un spam</a></div>