Permalink
Browse files

Avoid code duplication.

  • Loading branch information...
1 parent 84932fc commit 4407cdb010ce497d89c5d87019dbf00f20291d66 @ADmad ADmad committed Jan 22, 2014
Showing with 2 additions and 11 deletions.
  1. +2 −11 lib/Cake/Model/Datasource/CakeSession.php
View
13 lib/Cake/Model/Datasource/CakeSession.php
@@ -541,18 +541,9 @@ protected static function _cookieName() {
}
self::init();
+ self::_configureSession();
- $sessionConfig = Configure::read('Session');
- if (isset($sessionConfig['ini']['session.name'])) {
- return self::$_cookieName = $sessionConfig['ini']['session.name'];
- }
-
- $defaults = self::_defaultConfig($sessionConfig['defaults']);
- if ($defaults) {
- return self::$_cookieName = $defaults['cookie'];
- }
-
- return self::$_cookieName = ini_get('session.name');
+ return self::$_cookieName = session_name();
}
/**

0 comments on commit 4407cdb

Please sign in to comment.