Merge branch 'platal-1.0.0'
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 17 Sep 2010 12:36:31 +0000 (14:36 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 17 Sep 2010 12:36:31 +0000 (14:36 +0200)
Conflicts:
core

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
core
include/massmailer.inc.php
include/ufbuilder.inc.php
modules/axletter/axletter.inc.php
modules/payment/money/paypal.inc.php
templates/xnetgrp/annuaire-csv.tpl

diff --git a/core b/core
index adf0fa2..3c7bc7a 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit adf0fa2119688cf61ca23b7bc23b0730af702c6d
+Subproject commit 3c7bc7a377e3d5422f61b92ddf69c4a953ad3d15
index 269a570..c866f90 100644 (file)
@@ -195,6 +195,8 @@ abstract class MassMailer
              INNER JOIN  accounts AS a ON (ni.uid = a.uid)
               LEFT JOIN  email_options AS eo ON (eo.uid = a.uid)
               LEFT JOIN  emails   AS e ON (e.uid = a.uid AND e.flags='active')
+              LEFT JOIN  account_profiles AS ap ON (a.uid = ap.uid AND FIND_IN_SET('owner', ap.perms))
+              LEFT JOIN  profile_display AS pd ON (ap.pid = pd.pid)
                   WHERE  ni.last < {?} AND ({$this->subscriptionWhere()}) AND
                          (e.email IS NOT NULL OR FIND_IN_SET('googleapps', eo.storage))
                GROUP BY  a.uid";
index 6b437d8..09dc307 100644 (file)
@@ -322,7 +322,7 @@ abstract class UFBF_Text extends UFB_Field
             return $this->raise("Le champ %s est trop court (minimum {$this->minlength}).");
         } else if (strlen($this->val) > $this->maxlength) {
             return $this->raise("Le champ %s est trop long (maximum {$this->maxlength}).");
-        } else if (preg_match(":[\]\[<>{}~/§_`|%$^=+]|\*\*:u", $this->val)) {
+        } else if (preg_match(":[\]\[<>{}~§_`|%$^=]|\*\*:u", $this->val)) {
             return $this->raise('Le champ %s contient un caractère interdit rendant la recherche impossible.');
         }
 
index f31f979..53c7dd3 100644 (file)
@@ -178,10 +178,10 @@ class AXLetter extends MassMailer
         /* 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 u.promo >= {$this->_promo_min}))";
+            $where[] = "((ni.uid = 0 AND ni.promo >= {$this->_promo_min}) OR (ni.uid != 0 AND pd.promo >= 'X{$this->_promo_min}'))";
         }
         if ($this->_promo_max) {
-            $where[] = "((ni.uid = 0 AND ni.promo <= {$this->_promo_max}) OR (ni.uid != 0 AND u.promo <= {$this->_promo_max}))";
+            $where[] = "((ni.uid = 0 AND ni.promo <= {$this->_promo_max}) OR (ni.uid != 0 AND pd.promo <= 'X{$this->_promo_max}'))";
         }
         if ($this->_subset) {
             require_once("emails.inc.php");
index e7ae70d..be1f2d0 100644 (file)
@@ -42,6 +42,8 @@ class PayPal
         // the user must come back on the site.
         global $globals, $platal;
 
+        require_once 'geocoding.inc.php';
+
         $this->urlform = 'https://' . $globals->money->paypal_site . '/cgi-bin/webscr';
         $user = S::user();
         $name = $user->lastName();
index ebb9390..006b3c0 100644 (file)
@@ -23,7 +23,7 @@ Nom,Prénom,Sexe,Promotion,Email,Commentaire
 {if $users|@count}
 {foreach from=$users item=user}
 
-{$user->firstName()},{$user->lastName()},{if $user->isFemale()}F{else}M{/if},{$user->promo()},{$user->forlifeEmail()},{$user->group_comm|replace:',':'\,'}
+{$user->lastName()},{$user->firstName()},{if $user->isFemale()}F{else}M{/if},{$user->promo()},{$user->forlifeEmail()},{$user->group_comm|replace:',':'\,'}
 
 {/foreach}
 {/if}