Fix some issues with database connections.
install_db_connect() function must return database resource link insert into set syntax is mysql specific git-svn-id: http://piwigo.org/svn/trunk@5781 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
3d20e56ada
commit
8ed51d8497
3 changed files with 5 additions and 5 deletions
|
|
@ -146,7 +146,7 @@ function install_db_connect(&$infos, &$errors)
|
|||
$pwg_db_link = pwg_db_connect($_POST['dbhost'], $_POST['dbuser'],
|
||||
$_POST['dbpasswd'], $_POST['dbname']);
|
||||
|
||||
return true;
|
||||
return $pwg_db_link;
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1012,15 +1012,15 @@ function conf_update_param($param, $value)
|
|||
$query = '
|
||||
DELETE
|
||||
FROM '.CONFIG_TABLE.'
|
||||
WHERE param = "'.$param.'"
|
||||
WHERE param = \''.$param.'\'
|
||||
;';
|
||||
pwg_query($query);
|
||||
|
||||
$query = '
|
||||
INSERT
|
||||
INTO '.CONFIG_TABLE.'
|
||||
SET param = "'.$param.'"
|
||||
, value = "'.$value.'"
|
||||
(param, value)
|
||||
VALUES(\''.$param.'\', \''.$value.'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php');
|
|||
|
||||
if ( isset( $_POST['install'] ))
|
||||
{
|
||||
if (install_db_connect($infos, $errors))
|
||||
if ($pwg_db_link = install_db_connect($infos, $errors))
|
||||
{
|
||||
$required_version = constant('REQUIRED_'.strtoupper($dblayer).'_VERSION');
|
||||
if ( version_compare(pwg_get_db_version(), $required_version, '>=') )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue