CVSROOT: /cvsroot/phpgwapi Module name: phpgwapi Changes by: Dave Hall <skwashd> 06/09/09 11:39:00
Modified files: inc : class.ofphpgwapi.inc.php Log message: clean up a little and add sessions CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.ofphpgwapi.inc.php?cvsroot=phpgwapi&r1=1.5&r2=1.6 Patches: Index: class.ofphpgwapi.inc.php =================================================================== RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.ofphpgwapi.inc.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -b -r1.5 -r1.6 --- class.ofphpgwapi.inc.php 3 Sep 2006 06:15:27 -0000 1.5 +++ class.ofphpgwapi.inc.php 9 Sep 2006 11:39:00 -0000 1.6 @@ -7,7 +7,7 @@ * @license http://www.fsf.org/licenses/gpl.html GNU General Public License * @package phpgwapi * @subpackage application - * @version $Id: class.ofphpgwapi.inc.php,v 1.5 2006/09/03 06:15:27 skwashd Exp $ + * @version $Id: class.ofphpgwapi.inc.php,v 1.6 2006/09/09 11:39:00 skwashd Exp $ */ /** @@ -48,6 +48,10 @@ return ofphpgwapi::CreateAccountObject($account_id, $account_type); break; + case 'sessions': + return ofphpgwapi::CreateSessionObject(); + break; + default: return parent::CreateObject($class,$p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8,$p9,$p10,$p11,$p12,$p13,$p14,$p15,$p16); } @@ -127,5 +131,27 @@ } } + /** + * Create a new session object + */ + function CreateSessionObject() + { + include_once(PHPGW_API_INC.'/sessions/class.sessions.inc.php'); + + switch($GLOBALS['phpgw_info']['server']['sessions_type']) + { + case 'db': + include_once(PHPGW_API_INC . '/sessions/class.sessions_db.inc.php'); + return new sessions_db(); + break; + + case 'php': + case 'php4': //legacy, should be dropped + default: + include_once(PHPGW_API_INC . '/sessions/class.sessions_php.inc.php'); + return new sessions_php(); + } + } + } ?> _______________________________________________ Phpgroupware-cvs mailing list Phpgroupware-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs