Fixes csv downloading with IE8 (Closes #1325)
[platal.git] / modules / axletter / axletter.inc.php
index 5297ac9..8c28586 100644 (file)
@@ -131,8 +131,8 @@ class AXLetter extends MassMailer
     static public function subscribe($uid = null)
     {
         $user = is_null($uid) ? S::v('uid') : $uid;
-        XDB::execute("REPLACE INTO  axletter_ins (uid,last)
-                            VALUES  ({?}, 0)", $user);
+        XDB::execute('INSERT IGNORE INTO  axletter_ins (uid, last)
+                                  VALUES  ({?}, 0)', $user);
     }
 
     static public function hasPerms()
@@ -175,6 +175,7 @@ class AXLetter extends MassMailer
         if (!$this->_promo_min && !$this->_promo_max && !$this->_subset) {
             return '1';
         }
+        /* TODO: refines this filter on promotions by using userfilter. */
         $where = array();
         if ($this->_promo_min) {
             $where[] = "((ni.uid = 0 AND ni.promo >= {$this->_promo_min}) OR (ni.uid != 0 AND pd.promo >= 'X{$this->_promo_min}'))";