Enabler PHP natives assertion in debug and use Platal::assert() as a
[platal.git] / plugins / function.xsrf_token_field.php
index 8eb2430..943d5c4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -19,9 +19,9 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-function smarty_function_xsrf_token_field($params, &$smarty) {
+function smarty_function_xsrf_token_field($params, $smarty) {
     if (S::has('xsrf_token')) {
-        return '<input type="hidden" name="token" value="' . S::v('xsrf_token') . '" />';
+        return '<div style="display: none"><input type="hidden" name="token" value="' . S::v('xsrf_token') . '" /></div>';
     }
     return '';
 }