Bye bye core_rss_hash.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 23 Dec 2008 22:45:15 +0000 (23:45 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Tue, 23 Dec 2008 22:45:15 +0000 (23:45 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
modules/admin.php
modules/carnet.php
modules/events.php
modules/xnetgrp.php
templates/admin/wiki.tpl
templates/carnet/index.tpl
templates/carnet/panel.tpl
templates/events/index.tpl
templates/platal/filrss.tpl
templates/xnetgrp/asso.tpl

index 501b030..9534e99 100644 (file)
@@ -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
index a60d869..b5a2c4d 100644 (file)
@@ -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')) {
index 4a106e1..4da9e85 100644 (file)
@@ -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.
index db33b8a..7e32553 100644 (file)
@@ -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);
index 40c645b..b406dfd 100644 (file)
@@ -68,7 +68,7 @@
 {/literal}
 
 <p class="center">
-   <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.hruid}&hash={$smarty.session.core_rss_hash}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</a>
+   <a href="Site/AllRecentChanges?action=rss&user={$smarty.session.hruid}&hash={$smarty.session.token}" style="display:block;float:right" title="Changements">{icon name=feed title='fil rss'}</a>
    {icon name=magnifier} <a href="Site/AllRecentChanges">Voir les changements récents</a>
 </p>
 
index 129e096..e746cb6 100644 (file)
@@ -53,8 +53,8 @@
 <table class="bicol">
   <tr>
     <th colspan="2">
-      {if $smarty.session.core_rss_hash}
-      <a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Notifications">
+      {if $smarty.session.token}
+      <a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" style="display:block;float:right" title="Notifications">
         {icon name=feed title='fil rss'}
       </a>
       {else}
index 47d982b..02aa2c2 100644 (file)
@@ -38,8 +38,8 @@ Il faut pour cela se rendre sur la page de <a href='carnet/notifs'>configuration
 </p>
 
 <div class="right">
-{if $smarty.session.core_rss_hash}
-<a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
+{if $smarty.session.token}
+<a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
 {/if}
 </div>
 
index e0f35b8..6535855 100644 (file)
@@ -105,8 +105,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
     <tr class="pair" style="height: 18px">
       <td class="half titre" style="height: 18px; padding-top: 1px; padding-bottom: 1px;">
         {if $smarty.foreach.events.first}
-        {if $smarty.session.core_rss_hash}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
+        {if $smarty.session.token}
+        <a href="rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" style="display:block;float:right" title="Annonces">
           {icon name=feed title='fil rss'}
         </a>
         {else}
@@ -145,8 +145,8 @@ Bienvenue {$smarty.session.display_name}{if $birthday}
     {if !$has_evts}
     <tr>
       <td class="half">
-        {if $smarty.session.core_rss_hash}
-        <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" style="display:block;float:right" title="Annonces">
+        {if $smarty.session.token}
+        <a href="rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" style="display:block;float:right" title="Annonces">
           {icon name=feed title='fil rss'}
         </a>
         {else}
index 26cd81c..cb01f1e 100644 (file)
@@ -22,7 +22,7 @@
 
 <h1>Fil RSS</h1>
 
-{if !$smarty.session.core_rss_hash}
+{if !$smarty.session.token}
 <p>
   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&nbsp;:
 <ul>
   <li>
   Anonces sur la page d'entrée&nbsp;:
-  <a href="rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" title="Annonces">{icon name=feed title='fil rss'}</a>
+  <a href="rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" title="Annonces">{icon name=feed title='fil rss'}</a>
   </li>
   <li>
   Ton carnet polytechnicien&nbsp;:
-  <a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
+  <a href="carnet/rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml" title="Notifications">{icon name=feed title='fil rss'}</a>
   </li>
 </ul>
 <p>
index 1febab4..c4e46ca 100644 (file)
 <table class="tinybicol">
   <tr>
     <th>
-      {if $smarty.session.core_rss_hash}
-      <a href='{$platal->ns}rss/{$smarty.session.hruid}/{$smarty.session.core_rss_hash}/rss.xml' style="display:block;float:right">
+      {if $smarty.session.token}
+      <a href='{$platal->ns}rss/{$smarty.session.hruid}/{$smarty.session.token}/rss.xml' style="display:block;float:right">
         {icon name=feed title='fil rss'}
       </a>
       {else}