Fixes the AXLetter module (SQL field 'shortname' is now known as 'short_name').
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 18 May 2008 13:41:50 +0000 (15:41 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sun, 18 May 2008 13:41:50 +0000 (15:41 +0200)
Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
modules/axletter.php

index 67833e8..1efe115 100644 (file)
@@ -134,7 +134,7 @@ class AXLetterModule extends PLModule
                           . "que de chiffres, lettres et tirets");
                 Post::kill('valid');
             } elseif ($shortname != Post::v('old_shortname')) {
-                $res = XDB::query("SELECT id FROM axletter WHERE  shortname = {?}", $shortname);
+                $res = XDB::query("SELECT id FROM axletter WHERE short_name = {?}", $shortname);
                 if ($res->numRows() && $res->fetchOneCell() != $id) {
                     $page->trig("Le nom $shortname est déjà utilisé, merci d'en choisir un autre");
                     $shortname = Post::v('old_shortname');
@@ -154,7 +154,7 @@ class AXLetterModule extends PLModule
 
               case 'Confirmer':
                 XDB::execute("REPLACE INTO  axletter
-                                       SET  id = {?}, shortname = {?}, subject = {?}, title = {?}, body = {?},
+                                       SET  id = {?}, short_name = {?}, subject = {?}, title = {?}, body = {?},
                                             signature = {?}, promo_min = {?}, promo_max = {?}, echeance = {?}",
                              $id, $shortname, $subject, $title, $body, $signature, $promo_min, $promo_max, $echeance);
                 if (!$saved) {