[*] Installer : added timout to sql connection

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16743 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger
2012-08-07 12:32:40 +00:00
parent a98846bc57
commit 3cee49d012
4 changed files with 14 additions and 7 deletions
+2 -2
View File
@@ -179,11 +179,11 @@ class DbPDOCore extends Db
/**
* @see Db::checkConnection()
*/
static public function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null)
public static function tryToConnect($server, $user, $pwd, $db, $newDbLink = true, $engine = null, $timeout = 5)
{
try
{
$link = @new PDO('mysql:dbname='.$db.';host='.$server, $user, $pwd);
$link = @new PDO('mysql:dbname='.$db.';host='.$server, $user, $pwd, array(PDO::ATTR_TIMEOUT => $timeout));
}
catch (PDOException $e)
{