Adds XSRF protection to the Carnet module.
[platal.git] / templates / profile / profile.tpl
index 24b7972..68ce962 100644 (file)
@@ -65,10 +65,10 @@ function chgMainWinLoc(strPage)
       &nbsp;{if !$x.dcd}<a href="vcard/{$x.forlife}.vcf">{*
         *}{icon name=vcard title="Afficher la carte de visite"}</a>{/if}
       {if !$x.is_contact}
-      <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}')">
+      <a href="javascript:chgMainWinLoc('carnet/contacts?action=ajouter&amp;user={$x.forlife}&amp;token={xsrf_token}')">
         {icon name=add title="Ajouter à mes contacts"}</a>
       {else}
-      <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}')">
+      <a href="javascript:chgMainWinLoc('carnet/contacts?action=retirer&amp;user={$x.forlife}&amp;token={xsrf_token}')">
         {icon name=cross title="Retirer de mes contacts"}</a>
       {/if}
       {if hasPerm('admin')}
@@ -187,13 +187,19 @@ function chgMainWinLoc(strPage)
     {$x.cv|miniwiki:title|smarty:nodefaults}
   </div>
   {/if}
-  {if !$logged}
+  {if $view eq 'public'}
   <div class="part">
     <small>
     Cette fiche est publique et visible par tout internaute,<br />
     vous pouvez aussi voir <a href="profile/private/{$x.forlife}?display=light">celle&nbsp;réservée&nbsp;aux&nbsp;X</a>.
     </small>
   </div>
+  {elseif $view eq 'ax'}
+  <div class="part">
+    <small>
+    Cette fiche est privée et ne recense que les informations transmises à l'AX.
+    </small>
+  </div>
   {/if}
   <div class="spacer"></div>
 </div>