foreach ($result as $user) {
echo '* ' . $user['email'] . ' pour ' . $user['hruid'] . "\n";
}
- echo "\n";
+ }
+ echo "\n";
}
// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
-Subproject commit 9f671b1782f8abbdf718b3cedb90f2b7ee81550d
+Subproject commit aa3f926f7f3e37d95872357c139dae4003670cb2
{'url_prefix': 'http://add.my.yahoo.com/content?.intl=fr&url=',
'img': 'images/goodies/add-yahoo.gif',
'alt': 'Add to My Yahoo!',
- 'title': 'Ajouter à My Yahoo!'},
- {'url_prefix': 'http://www.newsgator.com/ngs/subscriber/subext.aspx?url=',
- 'img': 'images/goodies/add-newsgator.gif',
- 'alt': 'Subscribe in NewsGator Online',
- 'title': 'Ajouter à Newsgator'}
+ 'title': 'Ajouter à My Yahoo!'}
]
};
}, 750)
.parent().stop()
.animate({ backgroundColor: bgcolor }, 750);
- var submitButton = $(":submit[@name='" + passwordprompt_submit + "']");
+ var submitButton = $(":submit[name='" + passwordprompt_submit + "']");
if (ok && pass.length >= 6) {
submitButton.attr("value", okLabel);
submitButton.removeAttr("disabled");
// Checks for alias' user validity.
if (!preg_match('/[-a-z0-9\.]+/s', $alias)) {
$page->trigError("'$alias' n'est pas un alias valide");
+ break;
}
// Eventually adds the alias to the right domain.
$res = XDB::query("SELECT * FROM axletter WHERE FIND_IN_SET('new', bits)");
if ($res->numRows()) {
extract($res->fetchOneAssoc(), EXTR_OVERWRITE);
- $subset_to = explode("\n", $subset);
+ $subset_to = ($subset ? explode("\n", $subset) : null);
$subset = (count($subset_to) > 0);
$saved = true;
} else {
XDB::execute("REPLACE INTO axletter
SET id = {?}, short_name = {?}, subject = {?}, title = {?}, body = {?},
signature = {?}, promo_min = {?}, promo_max = {?}, echeance = {?}, subset = {?}",
- $id, $short_name, $subject, $title, $body, $signature, $promo_min, $promo_max, $echeance, $subset ? implode("\n", $subset_to): null);
+ $id, $short_name, $subject, $title, $body, $signature, $promo_min, $promo_max, $echeance, $subset ? implode("\n", $subset_to) : null);
if (!$saved) {
global $globals;
$mailer = new PlMailer();
if ($this->_date == '0000-00-00') {
$this->_date = 0;
}
- $this->_subset_to = explode("\n", $this->_subset_to);
+ $this->_subset_to = ($this->_subset_to ? explode("\n", $this->_subset_to) : null);
$this->_subset = (count($this->_subset_to) > 0);
}
require_once("emails.inc.php");
$ids = ids_from_mails($this->_subset_to);
$ids_list = implode(',', $ids);
- if(count($ids_list) > 0) {
+ if(count($ids) > 0) {
$where[] = "ni.user_id IN ($ids_list)";
} else {
// No valid email
// Finally answers the request.
if ($server->IsUserAuthorized($user) && $trusted) {
- $server->AnswerRequest(
- true, $user, Post::b('trust_sreg') ? $sreg_response : null);
+ $server->AnswerRequest(true, Post::b('trust_sreg') ? $sreg_response : null);
} else {
$server->AnswerRequest(false);
}
// Answers the current request, and renders the response. Appends the |sreg|
// data when not null.
- public function AnswerRequest($is_authorized, $user = null, $sreg_data = null)
+ public function AnswerRequest($is_authorized, $sreg_data = null)
{
// Creates the response.
- if ($is_authorized && $this->request->idSelect() && $user) {
+ if ($is_authorized && $this->request->idSelect()) {
+ $user = S::user();
$response = $this->request->answer(
$is_authorized, null, $user->login(), $this->GetUserUrl($user));
} else {
header(sprintf('%s %d', $_SERVER['SERVER_PROTOCOL'], $web_response->code),
true, $web_response->code);
- foreach ($web_response->headers as $key => $value) {
- header(sprintf('%s: %s', $key, $value));
- }
+ if (is_a($response, 'Auth_OpenID_ServerError')) {
+ print "Erreur lors de l'authentification OpenId: " . $response->toString();
+ } else {
+ foreach ($web_response->headers as $key => $value) {
+ header(sprintf('%s: %s', $key, $value));
+ }
- header('Connection: close');
- print $web_response->body;
+ header('Connection: close');
+ print $web_response->body;
+ }
}
exit;
}
</td>
<td>
<div style="float: left">
- <input type="text" name="newpass_clair" size="10" maxlength="10" value="********" />
+ <input type="text" name="newpass_clair" size="10" maxlength="256" value="********" />
<input type="hidden" name="passw" size="32" maxlength="32" value="{$mr.password}" />
<input type="hidden" name="hashpass" value="" />
</div>
<script type="text/javascript">//<![CDATA[
{literal}
$(function() {
- $(":radio[@name=asso]").change(function() {
- var asso = $(":radio[@name=asso]:checked").val();
+ $(":radio[name=asso]").change(function() {
+ var asso = $(":radio[name=asso]:checked").val();
if ((asso == "binet") || (asso == "alias")) {
$(".groupex").hide();
$(".promo").show();
}).change();
});
$(function() {
- $(":text[@name=promo]").change(function () {
- var str = $(":text[@name=promo]").val();
+ $(":text[name=promo]").change(function () {
+ var str = $(":text[name=promo]").val();
$("span#promotion").text(str);
}).change();
});
<script type="text/javascript">//<![CDATA[
{literal}
$(function() {
- $(":radio[@name=bogo_level]").change(function() {
- if ($(":radio[@name=bogo_level]:checked").val() == 0) {
+ $(":radio[name=bogo_level]").change(function() {
+ if ($(":radio[name=bogo_level]:checked").val() == 0) {
$("#unsurelevel").hide();
} else {
$("#unsurelevel").show();
// when changing country, open up region choice
function changeCountry(a2) {
- $(".autocompleteTarget[@name='country']").attr('value',a2);
+ $(".autocompleteTarget[name='country']").attr('value',a2);
if (a2) {
- $(".autocomplete[@name='countryTxt']").addClass('hidden_valid');
+ $(".autocomplete[name='countryTxt']").addClass('hidden_valid');
- $("[@name='region']").parent().load(baseurl + 'list/region/', { country:a2 }, function() {
- if ($("select[@name='region']").children("option").size() > 1) {
- $("select[@name='region']").attr('value', '{/literal}{$smarty.request.region}{literal}');
+ $("[name='region']").parent().load(baseurl + 'list/region/', { country:a2 }, function() {
+ if ($("select[name='region']").children("option").size() > 1) {
+ $("select[name='region']").attr('value', '{/literal}{$smarty.request.region}{literal}');
$("tr#region_ln").show();
} else {
- $("select[@name='region']").attr('value', '');
+ $("select[name='region']").attr('value', '');
$("tr#region_ln").hide();
}
});
} else {
- $(".autocomplete[@name='countryTxt']").removeClass('hidden_valid');
+ $(".autocomplete[name='countryTxt']").removeClass('hidden_valid');
- $("select[@name='region']").attr('value', '');
+ $("select[name='region']").attr('value', '');
$("tr#region_ln").hide();
}
// when changing school, open diploma choice
function changeSchool(schoolId) {
- $(".autocompleteTarget[@name='school']").attr('value',schoolId);
+ $(".autocompleteTarget[name='school']").attr('value',schoolId);
if (schoolId) {
- $(".autocomplete[@name='schoolTxt']").addClass('hidden_valid');
+ $(".autocomplete[name='schoolTxt']").addClass('hidden_valid');
} else {
- $(".autocomplete[@name='schoolTxt']").removeClass('hidden_valid');
+ $(".autocomplete[name='schoolTxt']").removeClass('hidden_valid');
}
- $("[@name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() {
- $("select[@name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}');
+ $("[name='diploma']").parent().load(baseurl + 'list/diploma/', { school:schoolId }, function() {
+ $("select[name='diploma']").attr('value', '{/literal}{$smarty.request.diploma}{literal}');
});
}
return function(i) {
nameRealField = this.field.replace(/Txt$/, '');
- $(".autocompleteTarget[@name='"+nameRealField+"']").attr('value',i.extra[1]);
+ $(".autocompleteTarget[name='"+nameRealField+"']").attr('value',i.extra[1]);
- $(".autocomplete[@name='"+this.field+"']").addClass('hidden_valid');
+ $(".autocomplete[name='"+this.field+"']").addClass('hidden_valid');
}
}
$(".autocomplete").change(function() { $(this).removeClass('hidden_valid'); });
- $(".autocomplete[@name='countryTxt']").change(function() { changeCountry(''); });
+ $(".autocomplete[name='countryTxt']").change(function() { changeCountry(''); });
changeCountry({/literal}'{$smarty.request.country}'{literal});
- $(".autocomplete[@name='schoolTxt']").change(function() { changeSchool(''); });
+ $(".autocomplete[name='schoolTxt']").change(function() { changeSchool(''); });
changeSchool({/literal}'{$smarty.request.school}'{literal});
var fieldName = $(this).attr('href');
$(this).attr('href', baseurl + 'list/'+fieldName).click(function() {
- var oldval = $("input.autocompleteTarget[@name='"+fieldName+"']")[0].value;
+ var oldval = $("input.autocompleteTarget[name='"+fieldName+"']")[0].value;
- $(".autocompleteTarget[@name='"+fieldName+"']").parent().load(baseurl + 'list/'+fieldName,{},
+ $(".autocompleteTarget[name='"+fieldName+"']").parent().load(baseurl + 'list/'+fieldName,{},
function(selectBox) {
- $(".autocompleteTarget[@name='"+fieldName+"']").remove();
- $(".autocomplete[@name='"+fieldName+"Txt']").remove();
- $("select[@name='"+fieldName+"']").attr('value', oldval);
+ $(".autocompleteTarget[name='"+fieldName+"']").remove();
+ $(".autocomplete[name='"+fieldName+"Txt']").remove();
+ $("select[name='"+fieldName+"']").attr('value', oldval);
});
return false;
$("#ln_promo_exp").show();
}
}
- $("[@name='survey_question[mode]']").change(function() { hidePromo(this.value); });
+ $("[name='survey_question[mode]']").change(function() { hidePromo(this.value); });
hidePromo({/literal}"{$survey_current.mode}"{literal});
});
{/literal}
--- /dev/null
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+###########################################################
+for sql in *.sql
+do
+ echo -n $sql
+ $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+ echo .
+done