Skip to content

Commit

Permalink
feature 2773: add pwg_db_close() method
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@18634 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
mistic100 committed Oct 13, 2012
1 parent 97294da commit cb11878
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/include/functions.php
Expand Up @@ -1676,7 +1676,7 @@ function create_table_add_character_set($query)
defined('DB_CHARSET') or fatal_error('create_table_add_character_set DB_CHARSET undefined');
if ('DB_CHARSET'!='')
{
if ( version_compare(mysql_get_server_info(), '4.1.0', '<') )
if ( version_compare(pwg_get_db_version(), '4.1.0', '<') )
{
return $query;
}
Expand Down
2 changes: 1 addition & 1 deletion i.php
Expand Up @@ -518,7 +518,7 @@ class json_response
{
$page['rotation_angle'] = 0;
}
mysql_close($pwg_db_link);
pwg_db_close($pwg_db_link);

if (!try_switch_source($params, $src_mtime) && $params->type==IMG_CUSTOM)
{
Expand Down
5 changes: 5 additions & 0 deletions include/dblayer/functions_mysql.inc.php
Expand Up @@ -178,6 +178,11 @@ function pwg_db_insert_id($table=null, $column='id')
return mysql_insert_id();
}

function pwg_db_close($link=null)
{
return mysql_close($link);
}

/**
*
* complex functions
Expand Down

0 comments on commit cb11878

Please sign in to comment.