Browse Source

Clean up database session driver.

Taylor Otwell 13 years ago
parent
commit
6c149b282f
1 changed files with 10 additions and 2 deletions
  1. 10 2
      system/session/db.php

+ 10 - 2
system/session/db.php

@@ -17,7 +17,11 @@ class DB implements Driver {
 
 		if ( ! is_null($session))
 		{
-			return array('id' => $session->id, 'last_activity' => $session->last_activity, 'data' => unserialize($session->data));
+			return array(
+				'id'            => $session->id,
+				'last_activity' => $session->last_activity,
+				'data'          => unserialize($session->data)
+			);
 		}
 	}
 
@@ -31,7 +35,11 @@ class DB implements Driver {
 	{
 		$this->delete($session['id']);
 
-		$this->table()->insert(array('id' => $session['id'], 'last_activity' => $session['last_activity'], 'data' => serialize($session['data'])));
+		$this->table()->insert(array(
+			'id'            => $session['id'], 
+			'last_activity' => $session['last_activity'], 
+			'data'          => serialize($session['data'])
+		));
 	}
 
 	/**