GX-Bug #40764 » xtc_db_close.inc.php
1 |
<?php
|
---|---|
2 |
/* --------------------------------------------------------------
|
3 |
xtc_db_close.inc.php 2014-11-07 gm
|
4 |
Gambio GmbH
|
5 |
http://www.gambio.de
|
6 |
Copyright (c) 2014 Gambio GmbH
|
7 |
Released under the GNU General Public License (Version 2)
|
8 |
[http://www.gnu.org/licenses/gpl-2.0.html]
|
9 |
--------------------------------------------------------------
|
10 |
|
11 |
|
12 |
based on:
|
13 |
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
|
14 |
(c) 2002-2003 osCommerce(database.php,v 1.19 2003/03/22); www.oscommerce.com
|
15 |
(c) 2003 nextcommerce (xtc_db_close.inc.php,v 1.4 2003/08/13); www.nextcommerce.org
|
16 |
(c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: xtc_db_close.inc.php 899 2005-04-29 02:40:57Z hhgag $)
|
17 |
|
18 |
Released under the GNU General Public License
|
19 |
--------------------------------------------------------------------------------------- */
|
20 |
|
21 |
function xtc_db_close($p_link = 'db_link') |
22 |
{
|
23 |
$t_link = $GLOBALS[$p_link]; |
24 |
|
25 |
if(STORE_SESSIONS === 'mysql') |
26 |
{
|
27 |
session_write_close(); |
28 |
}
|
29 |
|
30 |
if(is_resource($t_link) && get_resource_type($t_link) === 'mysql link') |
31 |
{
|
32 |
return mysql_close($t_link); |
33 |
}
|
34 |
|
35 |
return false; |
36 |
}
|