From b71f7275d0abe31614da74e05524ac08033bbe18 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Fri, 21 Dec 2007 15:27:56 +0100 Subject: [PATCH] Use .mail.tpl extension for mail templates. Remove unused templates. Signed-off-by: Florent Bruneau --- bin/cron/notifs.send.php | 4 +-- include/marketing.inc.php | 4 +-- include/newsletter.inc.php | 2 +- include/validations/paiements.inc.php | 2 +- modules/admin.php | 4 +-- modules/axletter/axletter.inc.php | 2 +- modules/banana.php | 2 +- modules/email.php | 2 +- modules/profile/page.inc.php | 2 +- .../forums-promo.mail.tpl} | 0 .../{mail_intervention.tpl => useredit.mail.tpl} | 0 templates/axletter/{letter.tpl => letter.mail.tpl} | 0 .../carnet/{mail.notif.tpl => notif.mail.tpl} | 0 templates/emails/{mail.test.tpl => test.mail.tpl} | 0 .../geoloc/{mail_geoloc.tpl => geoloc.mail.tpl} | 0 templates/mails/listes.promo.tpl | 32 ---------------------- .../{mail.marketing.tpl => marketing.mail.tpl} | 0 .../{mail.relance.tpl => relance.mail.tpl} | 0 templates/newsletter/{nl.tpl => nl.mail.tpl} | 0 templates/newsletter/show.tpl | 2 +- .../{mail.new_payment.tpl => newpayment.mail.tpl} | 0 21 files changed, 13 insertions(+), 45 deletions(-) rename templates/{mails/forums.promo.tpl => admin/forums-promo.mail.tpl} (100%) rename templates/admin/{mail_intervention.tpl => useredit.mail.tpl} (100%) rename templates/axletter/{letter.tpl => letter.mail.tpl} (100%) rename templates/carnet/{mail.notif.tpl => notif.mail.tpl} (100%) rename templates/emails/{mail.test.tpl => test.mail.tpl} (100%) rename templates/geoloc/{mail_geoloc.tpl => geoloc.mail.tpl} (100%) delete mode 100644 templates/mails/listes.promo.tpl rename templates/marketing/{mail.marketing.tpl => marketing.mail.tpl} (100%) rename templates/marketing/{mail.relance.tpl => relance.mail.tpl} (100%) rename templates/newsletter/{nl.tpl => nl.mail.tpl} (100%) rename templates/xnetevents/{mail.new_payment.tpl => newpayment.mail.tpl} (100%) diff --git a/bin/cron/notifs.send.php b/bin/cron/notifs.send.php index 9ffed23..86ddc68 100755 --- a/bin/cron/notifs.send.php +++ b/bin/cron/notifs.send.php @@ -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); diff --git a/include/marketing.inc.php b/include/marketing.inc.php index abd8482..3c3a501 100644 --- a/include/marketing.inc.php +++ b/include/marketing.inc.php @@ -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(); } diff --git a/include/newsletter.inc.php b/include/newsletter.inc.php index 0ab9899..1c58f0a 100644 --- a/include/newsletter.inc.php +++ b/include/newsletter.inc.php @@ -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'"); diff --git a/include/validations/paiements.inc.php b/include/validations/paiements.inc.php index 6782166..d6c94d9 100644 --- a/include/validations/paiements.inc.php +++ b/include/validations/paiements.inc.php @@ -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); diff --git a/modules/admin.php b/modules/admin.php index 7bbe5e7..74edd0e 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -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(); diff --git a/modules/axletter/axletter.inc.php b/modules/axletter/axletter.inc.php index 575b48b..896b9d0 100644 --- a/modules/axletter/axletter.inc.php +++ b/modules/axletter/axletter.inc.php @@ -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 = ' ,'; if (!is_array($id)) { diff --git a/modules/banana.php b/modules/banana.php index 3ad4cbc..556ac85 100644 --- a/modules/banana.php +++ b/modules/banana.php @@ -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(); } diff --git a/modules/email.php b/modules/email.php index b5c6224..52f2aef 100644 --- a/modules/email.php +++ b/modules/email.php @@ -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 diff --git a/modules/profile/page.inc.php b/modules/profile/page.inc.php index c11793f..d1a8d85 100644 --- a/modules/profile/page.inc.php +++ b/modules/profile/page.inc.php @@ -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/forums.promo.tpl b/templates/admin/forums-promo.mail.tpl similarity index 100% rename from templates/mails/forums.promo.tpl rename to templates/admin/forums-promo.mail.tpl diff --git a/templates/admin/mail_intervention.tpl b/templates/admin/useredit.mail.tpl similarity index 100% rename from templates/admin/mail_intervention.tpl rename to templates/admin/useredit.mail.tpl diff --git a/templates/axletter/letter.tpl b/templates/axletter/letter.mail.tpl similarity index 100% rename from templates/axletter/letter.tpl rename to templates/axletter/letter.mail.tpl diff --git a/templates/carnet/mail.notif.tpl b/templates/carnet/notif.mail.tpl similarity index 100% rename from templates/carnet/mail.notif.tpl rename to templates/carnet/notif.mail.tpl diff --git a/templates/emails/mail.test.tpl b/templates/emails/test.mail.tpl similarity index 100% rename from templates/emails/mail.test.tpl rename to templates/emails/test.mail.tpl diff --git a/templates/geoloc/mail_geoloc.tpl b/templates/geoloc/geoloc.mail.tpl similarity index 100% rename from templates/geoloc/mail_geoloc.tpl rename to templates/geoloc/geoloc.mail.tpl diff --git a/templates/mails/listes.promo.tpl b/templates/mails/listes.promo.tpl deleted file mode 100644 index c502b20..0000000 --- a/templates/mails/listes.promo.tpl +++ /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: *} diff --git a/templates/marketing/mail.marketing.tpl b/templates/marketing/marketing.mail.tpl similarity index 100% rename from templates/marketing/mail.marketing.tpl rename to templates/marketing/marketing.mail.tpl diff --git a/templates/marketing/mail.relance.tpl b/templates/marketing/relance.mail.tpl similarity index 100% rename from templates/marketing/mail.relance.tpl rename to templates/marketing/relance.mail.tpl diff --git a/templates/newsletter/nl.tpl b/templates/newsletter/nl.mail.tpl similarity index 100% rename from templates/newsletter/nl.tpl rename to templates/newsletter/nl.mail.tpl diff --git a/templates/newsletter/show.tpl b/templates/newsletter/show.tpl index 3d5fcc5..3cf8b18 100644 --- a/templates/newsletter/show.tpl +++ b/templates/newsletter/show.tpl @@ -47,7 +47,7 @@ {$nl->title(true)} - {include file="newsletter/nl.tpl"} + {include file="newsletter/nl.mail.tpl"} diff --git a/templates/xnetevents/mail.new_payment.tpl b/templates/xnetevents/newpayment.mail.tpl similarity index 100% rename from templates/xnetevents/mail.new_payment.tpl rename to templates/xnetevents/newpayment.mail.tpl -- 2.1.4