From 84fc72ffb0ef96311a18e668c2d427e8642753d5 Mon Sep 17 00:00:00 2001 From: Florent Bruneau Date: Tue, 23 Dec 2008 23:45:15 +0100 Subject: [PATCH] Bye bye core_rss_hash. Signed-off-by: Florent Bruneau --- modules/admin.php | 4 ++-- modules/carnet.php | 6 +++--- modules/events.php | 4 ++-- modules/xnetgrp.php | 4 ++-- templates/admin/wiki.tpl | 2 +- templates/carnet/index.tpl | 4 ++-- templates/carnet/panel.tpl | 4 ++-- templates/events/index.tpl | 8 ++++---- templates/platal/filrss.tpl | 6 +++--- templates/xnetgrp/asso.tpl | 4 ++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/modules/admin.php b/modules/admin.php index 501b030..9534e99 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -1063,9 +1063,9 @@ class AdminModule extends PLModule function handler_wiki(&$page, $action = 'list', $wikipage = null, $wikipage2 = null) { - if (S::v('core_rss_hash')) { + if (S::hasAuthToken()) { $page->setRssLink('Changement Récents', - '/Site/AllRecentChanges?action=rss&user=' . S::v('hruid') . '&hash=' . S::v('core_rss_hash')); + '/Site/AllRecentChanges?action=rss&user=' . S::v('hruid') . '&hash=' . S::v('token')); } // update wiki perms diff --git a/modules/carnet.php b/modules/carnet.php index a60d869..b5a2c4d 100644 --- a/modules/carnet.php +++ b/modules/carnet.php @@ -39,11 +39,11 @@ class CarnetModule extends PLModule function _add_rss_link(&$page) { - if (!S::has('core_rss_hash')) { + if (!S::hasAuthToken()) { return; } $page->setRssLink('Polytechnique.org :: Carnet', - '/carnet/rss/'.S::v('hruid').'/'.S::v('core_rss_hash').'/rss.xml'); + '/carnet/rss/'.S::v('hruid').'/'.S::v('token').'/rss.xml'); } function handler_index(&$page) @@ -168,7 +168,7 @@ class CarnetModule extends PLModule // For XSRF protection, checks both the normal xsrf token, and the special RSS token. // It allows direct linking to contact adding in the RSS feed. - if (Env::v('action') && Env::v('token') !== S::v('core_rss_hash')) { + if (Env::v('action') && Env::v('token') !== S::v('token')) { S::assert_xsrf_token(); } switch (Env::v('action')) { diff --git a/modules/events.php b/modules/events.php index 4a106e1..4da9e85 100644 --- a/modules/events.php +++ b/modules/events.php @@ -133,9 +133,9 @@ class EventsModule extends PLModule $page->assign('geoloc_incitation', count($res)); // Direct link to the RSS feed, when available. - if (S::rssActivated()) { + if (S::hasAuthToken()) { $page->setRssLink('Polytechnique.org :: News', - '/rss/'.S::v('hruid') .'/'.S::v('core_rss_hash').'/rss.xml'); + '/rss/'.S::v('hruid') .'/'.S::v('token').'/rss.xml'); } // Hide the read event, and reload the page to get to the next event. diff --git a/modules/xnetgrp.php b/modules/xnetgrp.php index db33b8a..7e32553 100644 --- a/modules/xnetgrp.php +++ b/modules/xnetgrp.php @@ -173,12 +173,12 @@ class XnetGrpModule extends PLModule $page->assign('requests', $subs_valid->numRows()); } - if (!S::has('core_rss_hash')) { + if (!S::hasAuthToken()) { $page->setRssLink("Polytechnique.net :: {$globals->asso("nom")} :: News publiques", $platal->ns . "rss/rss.xml"); } else { $page->setRssLink("Polytechnique.net :: {$globals->asso("nom")} :: News", - $platal->ns . 'rss/'.S::v('hruid') .'/'.S::v('core_rss_hash').'/rss.xml'); + $platal->ns . 'rss/'.S::v('hruid') .'/'.S::v('token').'/rss.xml'); } $page->assign('articles', $arts); diff --git a/templates/admin/wiki.tpl b/templates/admin/wiki.tpl index 40c645b..b406dfd 100644 --- a/templates/admin/wiki.tpl +++ b/templates/admin/wiki.tpl @@ -68,7 +68,7 @@ {/literal}

- {icon name=feed title='fil rss'} + {icon name=feed title='fil rss'} {icon name=magnifier} Voir les changements récents

diff --git a/templates/carnet/index.tpl b/templates/carnet/index.tpl index 129e096..e746cb6 100644 --- a/templates/carnet/index.tpl +++ b/templates/carnet/index.tpl @@ -53,8 +53,8 @@
- {if $smarty.session.core_rss_hash} - + {if $smarty.session.token} + {icon name=feed title='fil rss'} {else} diff --git a/templates/carnet/panel.tpl b/templates/carnet/panel.tpl index 47d982b..02aa2c2 100644 --- a/templates/carnet/panel.tpl +++ b/templates/carnet/panel.tpl @@ -38,8 +38,8 @@ Il faut pour cela se rendre sur la page de configuration

diff --git a/templates/events/index.tpl b/templates/events/index.tpl index e0f35b8..6535855 100644 --- a/templates/events/index.tpl +++ b/templates/events/index.tpl @@ -105,8 +105,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
{if $smarty.foreach.events.first} - {if $smarty.session.core_rss_hash} - + {if $smarty.session.token} + {icon name=feed title='fil rss'} {else} @@ -145,8 +145,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday} {if !$has_evts}
- {if $smarty.session.core_rss_hash} - + {if $smarty.session.token} + {icon name=feed title='fil rss'} {else} diff --git a/templates/platal/filrss.tpl b/templates/platal/filrss.tpl index 26cd81c..cb01f1e 100644 --- a/templates/platal/filrss.tpl +++ b/templates/platal/filrss.tpl @@ -22,7 +22,7 @@

Fil RSS

-{if !$smarty.session.core_rss_hash} +{if !$smarty.session.token}

Tu viens de cliquer sur le lien d'activation des fils RSS. Les fils RSS du site ne sont pas activés dans tes préférences. @@ -52,11 +52,11 @@ En voici les adresses :

diff --git a/templates/xnetgrp/asso.tpl b/templates/xnetgrp/asso.tpl index 1febab4..c4e46ca 100644 --- a/templates/xnetgrp/asso.tpl +++ b/templates/xnetgrp/asso.tpl @@ -112,8 +112,8 @@
- {if $smarty.session.core_rss_hash} - + {if $smarty.session.token} + {icon name=feed title='fil rss'} {else} -- 2.1.4