Only Potlatch 1 needs a token to be created
[rails.git] / app / views / site / _potlatch.html.erb
index c255cef9124f863e30d2a56be9f2a4eb1e8bc7e0..68205b6ff459b93040a60714b8a9693c7d4728ed 100644 (file)
@@ -3,6 +3,9 @@
 </div>
 
 <%= javascript_include_tag 'swfobject.js' %>
+
+<% session[:token] = @user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) %>
+
 <script type="text/javascript" defer="defer">
   var brokenContentSize = $("content").offsetWidth == 0;
   var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "100%", "100%", "6", "#FFFFFF");