Index: README.md
===================================================================
--- README.md	(revision 1578)
+++ README.md	(revision 1743)
@@ -50,5 +50,5 @@
     * iconv
     * simplexml
-    * mysql, postgresql or sqlite
+    * mysql, mysqli, postgresql or sqlite
  * A database server (MySQL or PostgreSQL) or SQLite.
 
Index: admin/install/check.php
===================================================================
--- admin/install/check.php	(revision 1179)
+++ admin/install/check.php	(revision 1743)
@@ -49,5 +49,5 @@
 	}
 	
-	if ($con->driver() == 'mysql')
+	if ($con->driver() == 'mysql' || $con->driver() == 'mysqli')
 	{
 		if (version_compare($con->version(),'4.1','<'))
Index: admin/install/wizard.php
===================================================================
--- admin/install/wizard.php	(revision 1399)
+++ admin/install/wizard.php	(revision 1743)
@@ -55,5 +55,5 @@
 }
 
-$DBDRIVER = !empty($_POST['DBDRIVER']) ? $_POST['DBDRIVER'] : 'mysql';
+$DBDRIVER = !empty($_POST['DBDRIVER']) ? $_POST['DBDRIVER'] : 'mysqli';
 $DBHOST = !empty($_POST['DBHOST']) ? $_POST['DBHOST'] : '';
 $DBNAME = !empty($_POST['DBNAME']) ? $_POST['DBNAME'] : '';
@@ -179,5 +179,5 @@
 '<form action="wizard.php" method="post">'.
 '<p><label class="required" for="DBDRIVER"><abbr title="'.__('Required field').'">*</abbr> '.__('Database type:').'</label> '.
-form::combo('DBDRIVER',array('MySQL'=>'mysql','PostgreSQL'=>'pgsql'),$DBDRIVER).'</p>'.
+form::combo('DBDRIVER',array(__('MySQL (deprecated)')=>'mysql',__('MySQLi')=>'mysqli',__('PostgreSQL')=>'pgsql'),$DBDRIVER).'</p>'.
 '<p><label for="DBHOST">'.__('Database Host Name:').'</label> '.
 form::field('DBHOST',30,255,html::escapeHTML($DBHOST)).'</p>'.
Index: debian/control
===================================================================
--- debian/control	(revision 0)
+++ debian/control	(revision 1743)
@@ -8,5 +8,5 @@
 Package: dotclear
 Architecture: all
-Depends: ${misc:Depends}, apache2 | httpd | apache, libclearbricks, php5-pgsql | php5-sqlite | php5-mysql, php5-gd
+Depends: ${misc:Depends}, apache2 | httpd | apache, libclearbricks, php5-pgsql | php5-sqlite | php5-mysql | php5-mysqli, php5-gd
 Suggests: php5-tidy
 Description: DotClear 2
Index: inc/config.php.in
===================================================================
--- inc/config.php.in	(revision 1535)
+++ inc/config.php.in	(revision 1743)
@@ -12,5 +12,5 @@
 if (!defined('DC_RC_PATH')) { return; }
 
-// Database driver (mysql, pgsql, sqlite)
+// Database driver (mysql, mysqli, pgsql, sqlite)
 define('DC_DBDRIVER','');
 
Index: inc/core/class.dc.blog.php
===================================================================
--- inc/core/class.dc.blog.php	(revision 1689)
+++ inc/core/class.dc.blog.php	(revision 1743)
@@ -658,5 +658,5 @@
 		if (!$rs->isEmpty())
 		{
-			if ($this->con->driver() == 'mysql') {
+			if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
 				$clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'";
 			} elseif ($this->con->driver() == 'pgsql') {
@@ -1828,5 +1828,5 @@
 		if (!$rs->isEmpty())
 		{
-			if ($this->con->driver() == 'mysql') {
+			if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
 				$clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'";
 			} elseif ($this->con->driver() == 'pgsql') {
@@ -2187,5 +2187,5 @@
 		
 		# mySQL uses "JOIN" synthax
-		if ($this->con->driver() == 'mysql') {
+		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
 			$strReq .= 
 				'JOIN '.$this->prefix.'post tp ON tc.post_id = tp.post_id ';
@@ -2196,5 +2196,5 @@
 		
 		# pgSQL uses "FROM" synthax
-		if ($this->con->driver() != 'mysql') {
+		if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') {
 			$strReq .= 
 				'FROM '.$this->prefix.'post tp ';
@@ -2206,5 +2206,5 @@
 		
 		# add pgSQL "WHERE" clause
-		if ($this->con->driver() != 'mysql') {
+		if ($this->con->driver() != 'mysql' || $this->con->driver() == 'mysqli') {
 			$strReq .= 
 				'AND tc.post_id = tp.post_id ';
@@ -2265,5 +2265,5 @@
 		
 		# mySQL uses "INNER JOIN" synthax
-		if ($this->con->driver() == 'mysql') {
+		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
 			$strReq = 
 				'DELETE FROM tc '.
@@ -2302,5 +2302,5 @@
 		
 		# mySQL uses "INNER JOIN" synthax
-		if ($this->con->driver() == 'mysql') {
+		if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') {
 			$strReq = 
 				'DELETE FROM tc '.
Index: inc/core/class.dc.core.php
===================================================================
--- inc/core/class.dc.core.php	(revision 1698)
+++ inc/core/class.dc.core.php	(revision 1743)
@@ -64,4 +64,6 @@
 		if ($this->con instanceof mysqlConnection) {
 			mysqlConnection::$weak_locks = true;
+		} elseif ($this->con instanceof mysqliConnection) {
+			mysqliConnection::$weak_locks = true;
 		}
 		
Index: locales/fr/main.po
===================================================================
--- locales/fr/main.po	(revision 1728)
+++ locales/fr/main.po	(revision 1743)
@@ -3330,2 +3330,5 @@
 msgid "You do not have sufficient permissions to write to this folder."
 msgstr "Vous n'avez pas les droits suffisants pour écrire dans ce répertoire."
+
+msgid "MySQL (deprecated)"
+msgstr "MySQL (obsolète)"
Index: plugins/importExport/inc/flat/class.flat.import.php
===================================================================
--- plugins/importExport/inc/flat/class.flat.import.php	(revision 1093)
+++ plugins/importExport/inc/flat/class.flat.import.php	(revision 1743)
@@ -160,5 +160,5 @@
 					if (in_array($last_line_name,$constrained)) {
 						# UNDEFER
-						if ($this->con->driver() == 'mysql') $this->con->execute('SET foreign_key_checks = 1');
+						if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 1');
 						if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL DEFERRED');
 					}
@@ -166,5 +166,5 @@
 					if (in_array($line->__name,$constrained)) {
 						# DEFER
-						if ($this->con->driver() == 'mysql') $this->con->execute('SET foreign_key_checks = 0');
+						if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 0');
 						if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL IMMEDIATE');
 					}
@@ -205,5 +205,5 @@
 			}
 			
-			if ($this->con->driver() == 'mysql') $this->con->execute('SET foreign_key_checks = 1');
+			if ($this->con->driver() == 'mysql' || $this->con->driver() == 'mysqli') $this->con->execute('SET foreign_key_checks = 1');
 			if ($this->con->driver() == 'pgsql') $this->con->execute('SET CONSTRAINTS ALL DEFERRED');
 		}
