Use .mail.tpl extension for mail templates. Remove unused templates.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Dec 2007 14:27:56 +0000 (15:27 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 21 Dec 2007 14:27:56 +0000 (15:27 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
21 files changed:
bin/cron/notifs.send.php
include/marketing.inc.php
include/newsletter.inc.php
include/validations/paiements.inc.php
modules/admin.php
modules/axletter/axletter.inc.php
modules/banana.php
modules/email.php
modules/profile/page.inc.php
templates/admin/forums-promo.mail.tpl [moved from templates/mails/forums.promo.tpl with 100% similarity]
templates/admin/useredit.mail.tpl [moved from templates/admin/mail_intervention.tpl with 100% similarity]
templates/axletter/letter.mail.tpl [moved from templates/axletter/letter.tpl with 100% similarity]
templates/carnet/notif.mail.tpl [moved from templates/carnet/mail.notif.tpl with 100% similarity]
templates/emails/test.mail.tpl [moved from templates/emails/mail.test.tpl with 100% similarity]
templates/geoloc/geoloc.mail.tpl [moved from templates/geoloc/mail_geoloc.tpl with 100% similarity]
templates/mails/listes.promo.tpl [deleted file]
templates/marketing/marketing.mail.tpl [moved from templates/marketing/mail.marketing.tpl with 100% similarity]
templates/marketing/relance.mail.tpl [moved from templates/marketing/mail.relance.tpl with 100% similarity]
templates/newsletter/nl.mail.tpl [moved from templates/newsletter/nl.tpl with 100% similarity]
templates/newsletter/show.tpl
templates/xnetevents/newpayment.mail.tpl [moved from templates/xnetevents/mail.new_payment.tpl with 100% similarity]

index 9ffed23..86ddc68 100755 (executable)
@@ -26,9 +26,9 @@ require_once("../../include/notifs.inc.php");
 
 $all = new AllNotifs();
 
-$mailer = new PlMailer('carnet/mail.notif.tpl');
+$mailer = new PlMailer('carnet/notif.mail.tpl');
 foreach ($all->_data as $u) {
-    $mailer = new PlMailer('carnet/mail.notif.tpl');
+    $mailer = new PlMailer('carnet/notif.mail.tpl');
     $mailer->assign('u', $u);
     $mailer->assign('week', date("W - Y"));
     $mailer->assign('cats', $all->_cats);
index abd8482..3c3a501 100644 (file)
@@ -215,7 +215,7 @@ class Marketing
         $pass_encrypted = hash_encrypt($pass);
         $fdate    = strftime('%d %B %Y', strtotime($date));
 
-        $mymail = new PlMailer('marketing/mail.relance.tpl');
+        $mymail = new PlMailer('marketing/relance.mail.tpl');
         $mymail->assign('nbdix',      $nbx);
         $mymail->assign('fdate',      $fdate);
         $mymail->assign('lusername',  $alias);
@@ -287,7 +287,7 @@ class AnnuaireMarketing implements MarketingEngine
 
     public function getText(array $user)
     {
-        $page = new XorgPage('marketing/mail.marketing.tpl', NO_SKIN);
+        $page = new XorgPage('marketing/marketing.mail.tpl', NO_SKIN);
         $this->prepareText($page, $user);
         return $page->raw();
     }
index 0ab9899..1c58f0a 100644 (file)
@@ -31,7 +31,7 @@ class NewsLetter extends MassMailer
 
     function __construct($id = null)
     {
-        parent::__construct('newsletter/nl.tpl', 'nl.css', 'nl/show', 'newsletter', 'newsletter_ins');
+        parent::__construct('newsletter/nl.mail.tpl', 'nl.css', 'nl/show', 'newsletter', 'newsletter_ins');
         if (isset($id)) {
             if ($id == 'last') {
                 $res = XDB::query("SELECT MAX(id) FROM newsletter WHERE bits!='new'");
index 6782166..d6c94d9 100644 (file)
@@ -185,7 +185,7 @@ class PayReq extends Validate
                                 WHERE  e.eid = {?}",
                               $this->evt);
             list($nom, $diminutif, $evt) = $res->fetchOneRow();
-            $mailer = new PlMailer('xnetevents/mail.new_payment.tpl');
+            $mailer = new PlMailer('xnetevents/newpayment.mail.tpl');
             $mailer->assign('asso', $nom);
             $mailer->assign('diminutif', $diminutif);
             $mailer->assign('evt', $evt);
index 7bbe5e7..74edd0e 100644 (file)
@@ -553,7 +553,7 @@ class AdminModule extends PLModule
                             $res = XDB::query($watch);
                             $new_fields = $res->fetchOneAssoc();
 
-                            $mailer = new PlMailer("admin/mail_intervention.tpl");
+                            $mailer = new PlMailer("admin/useredit.mail.tpl");
                             $mailer->assign("user", S::v('forlife'));
                             $mailer->assign('old', $old_fields);
                             $mailer->assign('new', $new_fields);
@@ -587,7 +587,7 @@ class AdminModule extends PLModule
                         // update number of subscribers (perms or deceased may have changed)
                         update_NbIns();
                         $page->trig("'{$mr['user_id']}' a été désinscrit !");
-                        $mailer = new PlMailer("admin/mail_intervention.tpl");
+                        $mailer = new PlMailer("admin/useredit.mail.tpl");
                         $mailer->assign("user", S::v('forlife'));
                         $mailer->assign("query", "\nUtilisateur $login désinscrit");
                         $mailer->send();
index 575b48b..896b9d0 100644 (file)
@@ -33,7 +33,7 @@ class AXLetter extends MassMailer
 
     function __construct($id)
     {
-        parent::__construct('axletter/letter.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
+        parent::__construct('axletter/letter.mail.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
         $this->_head = '<cher> <prenom>,';
 
         if (!is_array($id)) {
index 3ad4cbc..556ac85 100644 (file)
@@ -45,7 +45,7 @@ class BananaModule extends PLModule
                                  FROM  auth_user_md5 WHERE promo={?}", $promo);
             list($effau, $effid) = $res->fetchOneRow();
             if (5*$effau>$effid) { // + de 20% d'inscrits
-                $mymail = new PlMailer('mails/forums.promo.tpl');
+                $mymail = new PlMailer('admin/forums-promo.mail.tpl');
                 $mymail->assign('promo', $promo);
                 $mymail->send();
             }
index b5c6224..52f2aef 100644 (file)
@@ -417,7 +417,7 @@ class EmailModule extends PLModule
         if (!S::has_perms() || !$forlife) {
             $forlife = S::v('bestalias');
         }
-        $mailer = new PlMailer('emails/mail.test.tpl');
+        $mailer = new PlMailer('emails/test.mail.tpl');
         $mailer->assign('email', $forlife . '@' . $globals->mail->domain);
         $iterator = XDB::iterator("SELECT  email
                                      FROM  emails AS e
index c11793f..d1a8d85 100644 (file)
@@ -172,7 +172,7 @@ abstract class ProfileGeoloc implements ProfileSetting
             } else if (@$address['parsevalid']) {
                 $address = array_merge($address, cut_address(@$address['text']));
                 $address['checked'] = true;
-                $mailer = new PlMailer('geoloc/mail_geoloc.tpl');
+                $mailer = new PlMailer('geoloc/geoloc.mail.tpl');
                 $mailer->assign('text', get_address_text($address));
                 $mailer->assign('geoloc', $geotxt);
                 $mailer->send();
diff --git a/templates/mails/listes.promo.tpl b/templates/mails/listes.promo.tpl
deleted file mode 100644 (file)
index c502b20..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-{**************************************************************************}
-{*                                                                        *}
-{*  Copyright (C) 2003-2007 Polytechnique.org                             *}
-{*  http://opensource.polytechnique.org/                                  *}
-{*                                                                        *}
-{*  This program is free software; you can redistribute it and/or modify  *}
-{*  it under the terms of the GNU General Public License as published by  *}
-{*  the Free Software Foundation; either version 2 of the License, or     *}
-{*  (at your option) any later version.                                   *}
-{*                                                                        *}
-{*  This program is distributed in the hope that it will be useful,       *}
-{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
-{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
-{*  GNU General Public License for more details.                          *}
-{*                                                                        *}
-{*  You should have received a copy of the GNU General Public License     *}
-{*  along with this program; if not, write to the Free Software           *}
-{*  Foundation, Inc.,                                                     *}
-{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
-{*                                                                        *}
-{**************************************************************************}
-
-{config_load file="mails.conf" section="listes_promo"}
-{if $mail_part eq 'head'}
-{from full=#from#}
-{to addr=#to#}
-{subject text="Création de la liste promo $promo"}
-{elseif $mail_part eq 'text'}
-
-Création de la liste promo {$promo} à faire !
-{/if}
-{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
index 3d5fcc5..3cf8b18 100644 (file)
@@ -47,7 +47,7 @@
   <tr><th>{$nl->title(true)}</th></tr>
   <tr>
     <td>
-      {include file="newsletter/nl.tpl"}
+      {include file="newsletter/nl.mail.tpl"}
     </td>
   </tr>
 </table>