<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
$res = XDB::query("SELECT IF (n.short_name IS NULL, n.id, n.short_name)
FROM {$this->_table} AS n
WHERE n.bits != 'new' AND {$where}
- LIMIT 1");
+ LIMIT 1");
if ($res->numRows() != 1) {
return null;
}
public function head($prenom = null, $nom = null, $sexe = null, $type = 'text')
{
if (is_null($prenom)) {
- return $this->_head;
+ return $this->_head;
} else {
$head = $this->_head;
$head = str_replace('<cher>', $sexe ? 'Chère' : 'Cher', $head);
{
$this->css($page);
$page->assign('is_mail', false);
- $page->assign('html_version', false);
+ $page->assign('mail_part', 'text');
$page->assign('prenom', $prenom);
$page->assign('nom', $nom);
$page->assign('sexe', $sexe);
$this->css($page);
$page->assign('prefix', $this->_prefix . '/' . $this->id());
$page->assign('is_mail', false);
- $page->assign('html_version', true);
+ $page->assign('mail_part', 'html');
$page->assign('prenom', $prenom);
$page->assign('nom', $nom);
$page->assign('sexe', $sexe);
INNER JOIN auth_user_quick AS q ON(q.user_id = u.user_id)
INNER JOIN aliases AS a ON(u.user_id=a.id AND FIND_IN_SET('bestalias',a.flags))
LEFT JOIN emails AS e ON(e.uid=u.user_id AND e.flags='active')
- WHERE ni.last < {?} AND ({$this->subscriptionWhere()}) AND e.email IS NOT NULL
+ WHERE ni.last < {?} AND ({$this->subscriptionWhere()}) AND
+ (e.email IS NOT NULL OR FIND_IN_SET('googleapps', u.mail_storage))
GROUP BY u.user_id";
}
XDB::execute("UPDATE {$this->_subscriptionTable}
SET last = {?}
WHERE " . implode(' OR ', $sent), $this->_id);
-
+
sleep(60);
}
}