From 30f983a171d82c6a8f421036a137950af6a0395a Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Sun, 21 Dec 2008 15:54:16 +0100 Subject: [PATCH] Removes compatibility with non-hruid code (please use core-1.0.0 for non-hruid-compatible code). Signed-off-by: Vincent Zanotti --- classes/plmailer.php | 4 ---- include/wiki.engine.inc.php | 7 +------ modules/core.php | 20 ++++---------------- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/classes/plmailer.php b/classes/plmailer.php index ca85633..08e71f8 100644 --- a/classes/plmailer.php +++ b/classes/plmailer.php @@ -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) { diff --git a/include/wiki.engine.inc.php b/include/wiki.engine.inc.php index ae32040..c97acc5 100644 --- a/include/wiki.engine.inc.php +++ b/include/wiki.engine.inc.php @@ -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); } diff --git a/modules/core.php b/modules/core.php index fd8518f..42b0c4c 100644 --- a/modules/core.php +++ b/modules/core.php @@ -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); -- 2.1.4