- Switch to the new URI scheme. -MC
* Events:
- - Switch to the new URI scheme. -MC
+ - Switch to the new URI scheme. -MC/FRU
* Geoloc:
- Switch to the new URI scheme. -MC/Car
subscribe_nl($uid);
}
- function handler_ev(&$page)
+ function handler_ev(&$page, $action = 'list', $eid = null)
{
$page->changeTpl('login.tpl');
}
// cache les evenements lus et raffiche les evenements a relire
- if (Env::has('lu')){
+ if ($action == 'read' && $eid) {
XDB::execute('DELETE FROM evenements_vus AS ev
INNER JOIN evenements AS e ON e.id = ev.evt_id
WHERE peremption < NOW)');
XDB::execute('REPLACE INTO evenements_vus VALUES({?},{?})',
- Env::v('lu'), S::v('uid'));
+ $eid, S::v('uid'));
}
- if (Env::has('nonlu')){
+ if ($action == 'unread' && $eid) {
XDB::execute('DELETE FROM evenements_vus
WHERE evt_id = {?} AND user_id = {?}',
- Env::v('nonlu'), S::v('uid'));
+ $eid, S::v('uid'));
}
// affichage des evenements
{if $smarty.session.perms eq 'admin'}
<a href="admin/events/edit/{$ev.id}">{icon name=page_edit title="Editer cet article"}</a>
{/if}
- <a href="events?lu={$ev.id}{if $previd}#newsid{$previd}{/if}">{icon name=cross title="Cacher cet article"}</a>
+ <a href="events/read/{$ev.id}{if $previd}#newsid{$previd}{/if}">{icon name=cross title="Cacher cet article"}</a>
</div>
{assign var="previd" value=$ev.id}
<a id="newsid{$ev.id}"></a>
<tr class="{cycle values="impair,pair"}">
<td class="half">
•
- <a href="{if !$ev.nonlu}events?nonlu={$ev.id}{/if}#newsid{$ev.id}">
+ <a href="{if !$ev.nonlu}events/unread/{$ev.id}{/if}#newsid{$ev.id}">
{if $ev.nonlu}<strong>{/if}
{tidy}
{$ev.titre|nl2br}