X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f45b3fa3f243de8894c03d8c9377157d01092c8c..75f951d254127d8857b6ad95cac241917f88e542:/lib/cmd.php diff --git a/lib/cmd.php b/lib/cmd.php index 44923618..43669069 100644 --- a/lib/cmd.php +++ b/lib/cmd.php @@ -122,10 +122,6 @@ function showUsage($aSpec, $bExit = false, $sError = false) function chksql($oSql, $sMsg = false) { - if (PEAR::isError($oSql)) { - fail($sMsg || $oSql->getMessage(), $oSql->userinfo); - } - return $oSql; } @@ -155,7 +151,7 @@ function repeatWarnings() function runSQLScript($sScript, $bfatal = true, $bVerbose = false, $bIgnoreErrors = false) { // Convert database DSN to psql parameters - $aDSNInfo = DB::parseDSN(CONST_Database_DSN); + $aDSNInfo = \Nominatim\DB::parseDSN(CONST_Database_DSN); if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432; $sCMD = 'psql -p '.$aDSNInfo['port'].' -d '.$aDSNInfo['database']; if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) {