From b35106ba54ec9da440f3c19926c00a0d465baa72 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Sat, 10 Nov 2007 12:14:24 +0100 Subject: [PATCH] Small fixes of the axletter. Signed-off-by: Florent Bruneau --- configs/mails.conf | 2 +- modules/axletter/axletter.inc.php | 6 +++--- templates/axletter/show.tpl | 2 +- upgrade/0.9.16/02_axletter.sql | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 upgrade/0.9.16/02_axletter.sql diff --git a/configs/mails.conf b/configs/mails.conf index 48c3dc6..c3aed32 100644 --- a/configs/mails.conf +++ b/configs/mails.conf @@ -36,7 +36,7 @@ from=webmaster@polytechnique.org to=geoloc@staff.polytechnique.org [mails_ax] -from="Association des Anciens élèves de l'X" +from="Amicale des Anciens de l'X" replyto=info@amicale.polytechnique.org [payment_ready] diff --git a/modules/axletter/axletter.inc.php b/modules/axletter/axletter.inc.php index 386eb26..575b48b 100644 --- a/modules/axletter/axletter.inc.php +++ b/modules/axletter/axletter.inc.php @@ -45,7 +45,7 @@ class AXLetter extends MassMailer } else { $res = XDB::query("SELECT * FROM axletter - WHERE id = {?} OR shortname = {?}", $id, $id); + WHERE id = {?} OR short_name = {?}", $id, $id); } if (!$res->numRows()) { $this->_id = null; @@ -223,7 +223,7 @@ class AXLetter extends MassMailer static public function listSent() { - $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre + $res = XDB::query("SELECT IF(short_name IS NULL, id, short_name) as id, date, subject AS titre FROM axletter WHERE NOT (FIND_IN_SET('new', bits)) ORDER BY date DESC"); @@ -232,7 +232,7 @@ class AXLetter extends MassMailer static public function listAll() { - $res = XDB::query("SELECT IF(shortname IS NULL, id, shortname) as id, date, subject AS titre + $res = XDB::query("SELECT IF(short_name IS NULL, id, short_name) as id, date, subject AS titre FROM axletter ORDER BY date DESC"); return $res->fetchAllAssoc(); diff --git a/templates/axletter/show.tpl b/templates/axletter/show.tpl index 08a46c6..c85689b 100644 --- a/templates/axletter/show.tpl +++ b/templates/axletter/show.tpl @@ -54,6 +54,6 @@ {include file="axletter/letter.tpl"} - + {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} diff --git a/upgrade/0.9.16/02_axletter.sql b/upgrade/0.9.16/02_axletter.sql new file mode 100644 index 0000000..175996c --- /dev/null +++ b/upgrade/0.9.16/02_axletter.sql @@ -0,0 +1,3 @@ +alter table axletter change column shortname short_name varchar(16) unique key; + +# vim:set syntax=mysql: -- 2.1.4