Improved Ajax class: allow multiple ajax requests at the same time
[platal.git] / modules / axletter / axletter.inc.php
index a2a136b..af34cac 100644 (file)
@@ -33,7 +33,7 @@ class AXLetter extends MassMailer
 
     function __construct($id)
     {
-        parent::__construct('axletter/letter.tpl', 'ax.css', 'ax/show');
+        parent::__construct('axletter/letter.tpl', 'ax.css', 'ax/show', 'axletter', 'axletter_ins');
         $this->_head = '<cher> <prenom>,';
 
         if (!is_array($id)) {
@@ -56,6 +56,9 @@ class AXLetter extends MassMailer
         list($this->_id, $this->_shortname, $this->_title_mail, $this->_title,
              $this->_body, $this->_signature, $this->_promo_min, $this->_promo_max,
              $this->_echeance, $this->_date, $this->_bits) = $id;
+        if ($this->_date == '0000-00-00') {
+            $this->_date = 0;
+        }
     }
 
     protected function assignData(&$smarty)
@@ -181,11 +184,6 @@ class AXLetter extends MassMailer
         return XDB::execute("DELETE FROM axletter_rights WHERE user_id = {?}", $uid);
     }
 
-    protected function subscriptionTable()
-    {
-        return 'axletter_ins';
-    }
-
     protected function subscriptionWhere()
     {
         if (!$this->_promo_min && !$this->_promo_max) {
@@ -241,5 +239,5 @@ class AXLetter extends MassMailer
     }
 }
 
-// vim:set et sw=4 sts=4 sws=4:
+// vim:set et sw=4 sts=4 sws=4 enc=utf-8:
 ?>