Removes compatibility with non-hruid code (please use core-1.0.0 for non-hruid-compat...
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 21 Dec 2008 14:54:16 +0000 (15:54 +0100)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 21 Dec 2008 14:54:16 +0000 (15:54 +0100)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
classes/plmailer.php
include/wiki.engine.inc.php
modules/core.php

index ca85633..08e71f8 100644 (file)
@@ -312,10 +312,6 @@ class PlMailer extends Mail_Mime {
         $this->processPage($with_html);
         if (S::user()) {
             $this->addHeader('X-Org-Mail', S::user()->forlifeEmail());
-        } else if (S::v('forlife')) {
-            // TODO(vzanotti): trash this code when hruid will be part of master.
-            global $globals;
-            $this->addHeader('X-Org-Mail', S::v('forlife') . '@' . $globals->mail->domain);
         }
         $addrs = Array();
         foreach(Array('To', 'Cc', 'Bcc') as $hdr) {
index ae32040..c97acc5 100644 (file)
@@ -126,12 +126,7 @@ $page->addJsLink('wiki.js');
 if (!Env::v('action')) {
     $url = '/' . str_replace('.', '/', $n) . '?action=rss';
     if (S::logged()) {
-        if (S::user()) {
-            $url .= '&user=' . S::user()->login() . '&hash=' . S::v('core_rss_hash');
-        } else {
-            // TODO(vzanotti): trash that code when forlife support will be gone.
-            $url .= '&user=' . S::v('forlife') . '&hash=' . S::v('core_rss_hash');
-        }
+        $url .= '&user=' . S::user()->login() . '&hash=' . S::v('core_rss_hash');
     }
     $page->setRssLink($n, $url);
 }
index fd8518f..42b0c4c 100644 (file)
@@ -127,12 +127,7 @@ class CoreModule extends PLModule
         }
 
         if (isset($_SESSION['log'])) {
-            if (S::user()) {
-                S::logger()->log("suid_start", "login by " . S::user()->login());
-            } else {
-                // TODO(vzanotti): trash that code when support of forlife will be gone.
-                S::logger()->log("suid_start", "login by ".S::v('forlife'));
-            }
+            S::logger()->log("suid_start", "login by " . S::user()->login());
         }
         Platal::session()->startSUID(S::i('uid'));
         Platal::session()->makePerms($level);
@@ -160,11 +155,10 @@ class CoreModule extends PLModule
         if (Env::has('send') && trim(Env::v('detailed_desc'))) {
             S::assert_xsrf_token();
 
-            // TODO(vzanotti): trash the 'forlife' bit when support of forlife will be gone.
             $body = wordwrap(Env::v('detailed_desc'), 78) . "\n\n"
                   . "----------------------------\n"
                   . "Page        : " . Env::v('page') . "\n\n"
-                  . "Utilisateur : " . (S::user() ? S::user()->login() : S::v('forlife')) . "\n"
+                  . "Utilisateur : " . S::user()->login() . "\n"
                   . "Navigateur  : " . $_SERVER['HTTP_USER_AGENT'] . "\n"
                   . "Skin        : " . S::v('skin') . "\n";
             $page->assign('bug_sent', 1);
@@ -172,14 +166,8 @@ class CoreModule extends PLModule
                              . ', tu devrais en recevoir une copie d\'ici quelques minutes. Nous allons '
                              . 'le traiter et y répondre dans les plus brefs délais.');
             $mymail = new PlMailer();
-            // TODO(vzanotti): trash the 'bestalias' bits when support of bestalias will be gone.
-            if (S::user()) {
-                $mymail->setFrom(sprintf('"%s" <%s>', S::user()->fullName(), S::user()->bestEmail()));
-                $mymail->addCc(sprintf('"%s" <%s>', S::user()->fullName(), S::user()->bestEmail()));
-            } else {
-                $mymail->setFrom('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@' . $globals->mail->domain . '>');
-                $mymail->addCc('"'.S::v('prenom').' '.S::v('nom').'" <'.S::v('bestalias').'@' . $globals->mail->domain . '>');
-            }
+            $mymail->setFrom(sprintf('"%s" <%s>', S::user()->fullName(), S::user()->bestEmail()));
+            $mymail->addCc(sprintf('"%s" <%s>', S::user()->fullName(), S::user()->bestEmail()));
             $mymail->addTo('support+platal@' . $globals->mail->domain);
             $mymail->setSubject('Plat/al '.Env::v('task_type').' : '.Env::v('item_summary'));
             $mymail->setTxtBody($body);