X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Finstall.php;h=3f4ac9cdb69c2126805f649ed8cc552c10c8f334;hp=f9cd3646d667ecefd8a0410d0a1ce17be5b6b05e;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed diff --git a/www/ecrire/inc/install.php b/www/ecrire/inc/install.php index f9cd364..3f4ac9c 100644 --- a/www/ecrire/inc/install.php +++ b/www/ecrire/inc/install.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2011 * + * Copyright (c) 2001-2014 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -56,8 +56,10 @@ function analyse_fichier_connection($file) array_shift($regs); return $regs; } else { - $arg = '\s*\'([^\']*)\'\s*,'; - if (preg_match("#spip_connect_db\($arg$arg$arg$arg\s*'([^']*)'\s*(?:,\s*'([^']*))?#", $s, $regs)) { + $ar = '\s*\'([^\']*)\''; + $r = '\s*,' . $ar; + $r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r)?)?)?#"; + if (preg_match($r, $s, $regs)) { $regs[2] = $regs[1] . (!$regs[2] ? '' : ":$port_db;"); array_shift($regs); array_shift($regs); @@ -65,7 +67,7 @@ function analyse_fichier_connection($file) } } spip_log("$file n'est pas un fichier de connexion"); - return ''; + return array(); } // http://doc.spip.org/@bases_referencees