{
return array(
'ax' => $this->make_hook('nl', AUTH_COOKIE, 'user'),
- 'ax/out' => $this->make_hook('out', AUTH_PUBLIC),
+ 'ax/out' => $this->make_hook('out', AUTH_COOKIE, 'user'),
'ax/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'),
'ax/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'),
'ax/admin' => $this->make_hook('admin_nl', AUTH_PASSWD, 'user'),
function handler_out($page, $hash = null, $issue_id = null)
{
+ $hash = ($hash == 'nohash') ? null : $hash;
if (!$hash) {
if (!S::logged()) {
return PL_DO_AUTH;
'comletter' => $this->make_hook('nl', AUTH_COOKIE, 'user'),
'comletter/submit' => $this->make_hook('coml_submit', AUTH_PASSWD, 'user'),
'comletter/remaining' => $this->make_hook('coml_remaining', AUTH_PASSWD, 'user'),
- 'comletter/out' => $this->make_hook('out', AUTH_PUBLIC),
+ 'comletter/out' => $this->make_hook('out', AUTH_COOKIE, 'user'),
'comletter/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'),
'comletter/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'),
'comletter/admin' => $this->make_hook('admin_nl', AUTH_PASSWD, 'user'),
function handler_out($page, $hash = null, $issue_id = null)
{
+ $hash = ($hash == 'nohash') ? null : $hash;
if (!$hash) {
if (!S::logged()) {
return PL_DO_AUTH;
{
return array(
'epletter' => $this->make_hook('nl', AUTH_COOKIE, 'user'),
- 'epletter/out' => $this->make_hook('out', AUTH_PUBLIC),
+ 'epletter/out' => $this->make_hook('out', AUTH_COOKIE, 'user'),
'epletter/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'),
'epletter/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'),
'epletter/admin' => $this->make_hook('admin_nl', AUTH_PASSWD, 'user'),
function handler_out($page, $hash = null, $issue_id = null)
{
+ $hash = ($hash == 'nohash') ? null : $hash;
if (!$hash) {
if (!S::logged()) {
return PL_DO_AUTH;
{
return array(
'fxletter' => $this->make_hook('nl', AUTH_COOKIE, 'user'),
- 'fxletter/out' => $this->make_hook('out', AUTH_PUBLIC),
+ 'fxletter/out' => $this->make_hook('out', AUTH_COOKIE, 'user'),
'fxletter/show' => $this->make_hook('nl_show', AUTH_COOKIE, 'user'),
'fxletter/search' => $this->make_hook('nl_search', AUTH_COOKIE, 'user'),
'fxletter/admin' => $this->make_hook('admin_nl', AUTH_PASSWD, 'user'),
function handler_out($page, $hash = null, $issue_id = null)
{
+ $hash = ($hash == 'nohash') ? null : $hash;
if (!$hash) {
if (!S::logged()) {
return PL_DO_AUTH;
if (Env::has('del_member')) {
S::assert_xsrf_token();
- if ($del_member = User::getSilent(Env::t('del_member'))) {
- $mlist->unsubscribeBulk(array($del_member->forlifeEmail()));
+ if (strpos(Env::v('del_member'), '@') === false) {
+ if ($del_member = User::getSilent(Env::t('del_member'))) {
+ $mlist->unsubscribeBulk(array($del_member->forlifeEmail()));
+ }
+ } else {
+ $mlist->unsubscribeBulk(array(Env::v('del_member')));
}
pl_redirect('lists/admin/'.$liste);
}
if (Env::has('del_owner')) {
S::assert_xsrf_token();
- if ($del_owner = User::getSilent(Env::t('del_owner'))) {
- $mlist->removeOwner($del_owner->forlifeEmail());
+ if (strpos(Env::v('del_owner'), '@') === false) {
+ if ($del_owner = User::getSilent(Env::t('del_owner'))) {
+ $mlist->removeOwner($del_owner->forlifeEmail());
+ }
+ } else {
+ $mlist->removeOwner(Env::v('del_owner'));
}
pl_redirect('lists/admin/'.$liste);
}
$eid);
$eid = $id;
}
- $evt = XDB::fetchOneAssoc('SELECT ge.uid, ge.intitule, ge.descriptif, ge.debut, ge.fin, ge.deadline_inscription, ge.accept_nonmembre, ge.paiement_id
+ $evt = XDB::fetchOneAssoc('SELECT ge.uid, ge.intitule, ge.descriptif, ge.debut, ge.fin, ge.deadline_inscription, ge.accept_nonmembre, ge.noinvite, ge.paiement_id
FROM group_events as ge
WHERE eid = {?}',
$eid);
// compares new and old subscription
if ($old_subs[$item_id]['nb'] != $subs[$item_id]) {
if ($subs[$item_id] != 0) {
- echo "je m'inscris ";
XDB::execute('INSERT INTO group_event_participants (eid, uid, item_id, nb, flags, paid)
VALUES ({?}, {?}, {?}, {?}, {?}, {?})
ON DUPLICATE KEY UPDATE nb = VALUES(nb), flags = VALUES(flags), paid = VALUES(paid)',
{assign var=nb value=$subs.$item_id.nb}
<label><input type="radio" name="moment[{$item_id}]" value="0"
{if !$nb}checked="checked"{/if}/>Je ne m'inscris pas</label><br />
- {if $event.accept_nonmembre}
+ {if $event.noinvite}
<label><input type="radio" name="moment[{$item_id}]" value="1"
{if $nb eq 1}checked="checked"{/if}/>Je m'inscris</label>
{else}