-Subproject commit adf0fa2119688cf61ca23b7bc23b0730af702c6d
+Subproject commit 3c7bc7a377e3d5422f61b92ddf69c4a953ad3d15
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";
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.');
}
/* 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");
// 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();
{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}