Allow parenthesis before hasPerm in smarty templates
[platal.git] / classes / plcache.php
index c8e3fd3..b25a44c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -474,12 +474,12 @@ class PlMemcacheCache implements PlCacheBackend
         return $this->context->get($key) !== false;
     }
 
-    public function get($key, $type, $callbac, $cbargs, $expire)
+    public function get($key, $type, $callback, $cbargs, $expire)
     {
         $value = $this->context->get($key);
         if ($value === false) {
             if (is_null($callback)) {
-                throw new PlNotFoundInCacheException($key);
+                throw new PlNotFoundInCacheException($key, $type);
             }
             $value = call_user_func_array($callback, $cbargs);
             $this->set($key, $type, $value, $expire);
@@ -503,5 +503,5 @@ class PlMemcacheCache implements PlCacheBackend
     }
 }
 
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
 ?>