Permalink
Browse files

Updating storage\Session and storage\session\adapter\Memory for

filterable delete.
  • Loading branch information...
1 parent 0df9dd0 commit c7a8098cd1abb7bd67af3d8dec4bd522aba6c25b @jperras jperras committed with gwoo Feb 10, 2010
Showing with 7 additions and 2 deletions.
  1. +1 −1 libraries/lithium/storage/Session.php
  2. +6 −1 libraries/lithium/storage/session/adapter/Memory.php
@@ -167,7 +167,7 @@ public static function delete($key, $options = array()) {
$settings = static::_config($name);
foreach ($methods as $name => $method) {
- $params = compact('key', 'value', 'options');
+ $params = compact('key', 'options');
$filters = $settings['filters'];
$result = $result || static::_filter(__METHOD__, $params, $method, $filters);
}
@@ -48,7 +48,12 @@ public function write($key, $value, $options = array()) {
}
public function delete($key, $options = array()) {
- unset($this->_session[$key]);
+ $session =& $this->_session;
+
+ return function($self, $params, $chain) use (&$session) {
+ extract($params);
+ unset($session[$key]);
+ };
}
/**

0 comments on commit c7a8098

Please sign in to comment.