Browse Source

Switch from mysql to mysqli PHP mod

Simounet 5 years ago
parent
commit
1836b28dc8
12 changed files with 50 additions and 63 deletions
  1. 3 3
      Event.class.php
  2. 2 2
      Feed.class.php
  3. 2 2
      Folder.class.php
  4. 3 4
      Functions.class.php
  5. 4 13
      MysqlConnector.class.php
  6. 22 25
      MysqlEntity.class.php
  7. 3 3
      Update.class.php
  8. 3 3
      install.php
  9. 2 2
      locale/en.json
  10. 2 2
      locale/eo.json
  11. 2 2
      locale/es.json
  12. 2 2
      locale/fr.json

+ 3 - 3
Event.class.php

@@ -52,7 +52,7 @@ class Event extends MysqlEntity{
     function getEventCountPerFolder(){
         $events = array();
         $results = $this->customQuery('SELECT COUNT(`'.MYSQL_PREFIX.$this->TABLE_NAME.'`.`id`),`'.MYSQL_PREFIX.'feed`.`folder` FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.$this->TABLE_NAME.'`.`unread`=1 GROUP BY `'.MYSQL_PREFIX.'feed`.`folder`');
-        while($item = mysql_fetch_array($results)){
+        while($item = $results->fetch_array()){
             $events[$item[1]] = $item[0];
         }
 
@@ -61,7 +61,7 @@ class Event extends MysqlEntity{
 
     function getEventCountNotVerboseFeed(){
         $results = $this->customQuery('SELECT COUNT(1) FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.$this->TABLE_NAME.'`.`unread`=1 AND `'.MYSQL_PREFIX.'feed`.`isverbose`=0');
-        while($item = mysql_fetch_array($results)){
+        while($item = $results->fetch_array()){
             $nbitem =  $item[0];
         }
 
@@ -73,7 +73,7 @@ class Event extends MysqlEntity{
         $objects = array();
         $results = $this->customQuery('SELECT '.$columns.' FROM `'.MYSQL_PREFIX.'event` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.'event`.`unread`=1 AND `'.MYSQL_PREFIX.'feed`.`isverbose` = 0 ORDER BY '.$order.' LIMIT '.$start.','.$limit);
         if($results!=false){
-            while($item = mysql_fetch_array($results)){
+            while($item = $results->fetch_array()){
                 $object = new Event();
                 foreach($object->getObject_fields() as $field=>$type){
                     $setter = 'set'.ucFirst($field);

+ 2 - 2
Feed.class.php

@@ -246,7 +246,7 @@ class Feed extends MysqlEntity{
         $results = Feed::customQuery("SELECT COUNT(`".MYSQL_PREFIX."event`.`id`), `".MYSQL_PREFIX."event`.`feed` FROM `".MYSQL_PREFIX."event` WHERE `".MYSQL_PREFIX."event`.`unread` = 1 GROUP BY `".MYSQL_PREFIX."event`.`feed`") ;
         if($results!=false){
             $total = 0;
-            while($item = mysql_fetch_array($results)){
+            while($item = $results->fetch_array()){
                 $unreads[$item[1]] = $item[0];
                 $total += $item[0];
             }
@@ -261,7 +261,7 @@ class Feed extends MysqlEntity{
 
         $results = Feed::customQuery("SELECT `".MYSQL_PREFIX."feed`.`name` AS name, `".MYSQL_PREFIX."feed`.`id`   AS id, `".MYSQL_PREFIX."feed`.`url`  AS url, `".MYSQL_PREFIX."folder`.`id` AS folder FROM `".MYSQL_PREFIX."feed` INNER JOIN `".MYSQL_PREFIX."folder` ON ( `".MYSQL_PREFIX."feed`.`folder` = `".MYSQL_PREFIX."folder`.`id` ) ORDER BY `".MYSQL_PREFIX."feed`.`name` ;");
         if($results!=false){
-            while($item = mysql_fetch_array($results)){
+            while($item = $results->fetch_array()){
                 $name = $item['name'];
                 $feedsIdMap[$item['id']]['name'] = $name;
 

+ 2 - 2
Folder.class.php

@@ -21,7 +21,7 @@ class Folder extends MysqlEntity{
 
     function unreadCount(){
         $results = $this->customQuery('SELECT COUNT(`'.MYSQL_PREFIX.'event`.`id`) FROM `'.MYSQL_PREFIX.'event` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.'event`.`unread`=1 AND `'.MYSQL_PREFIX.'feed`.`folder` = '.$this->getId());
-        $number = mysql_fetch_array($results);
+        $number = $results->fetch_array();
         return $number[0];
     }
 
@@ -31,7 +31,7 @@ class Folder extends MysqlEntity{
         $objects = array();
         $results = $this->customQuery('SELECT '.$columns.' FROM `'.MYSQL_PREFIX.'event` INNER JOIN `'.MYSQL_PREFIX.'feed` ON (`'.MYSQL_PREFIX.'event`.`feed` = `'.MYSQL_PREFIX.'feed`.`id`) WHERE `'.MYSQL_PREFIX.'event`.`unread`=1 AND `'.MYSQL_PREFIX.'feed`.`folder` = '.$this->getId().' ORDER BY '.$order.' LIMIT '.$start.','.$limit);
         if($results!=false){
-            while($item = mysql_fetch_array($results)){
+            while($item = $results->fetch_array()){
                 $object = new Event();
                     foreach($object->getObject_fields() as $field=>$type){
                         $setter = 'set'.ucFirst($field);

+ 3 - 4
Functions.class.php

@@ -21,7 +21,7 @@ class Functions
 
     public static function secure($var,$level = 1){
         $var = htmlspecialchars($var, ENT_QUOTES, "UTF-8");
-        if($level<1)$var = mysql_real_escape_string($var);
+        if($level<1)$var = mysqli_real_escape_string($var);
         if($level<2)$var = addslashes($var);
         return $var;
     }
@@ -348,10 +348,9 @@ class Functions
         /* Méthode hors des classes dédiées aux BDD afin de supporter le moins
            de dépendances possibles. En particulier, pas besoin que le fichier
            de configuration existe. */
-        $link = mysql_connect($server, $login, $pass);
+        $link = mysqli_connect($server, $login, $pass, $db);
         if (false===$link) return false;
-        if (!is_null($db) && false===mysql_select_db($db, $link)) return false;
-        mysql_close($link);
+        mysqli_close($link);
         return true;
     }
 

+ 4 - 13
MysqlConnector.class.php

@@ -16,11 +16,12 @@ class MysqlConnector
     private $bdd;
     private $port;
     public $debug=0;
-    private $connection = null;
+    public $connection = null;
     public static $instance = null;
 
-    private function __construct(){
-        $this->connect();
+    public function __construct(){
+        $this->connection = new mysqli(MYSQL_HOST,MYSQL_LOGIN,MYSQL_MDP,MYSQL_BDD);
+        $this->connection->query('SET NAMES utf8');
     }
 
 
@@ -42,16 +43,6 @@ class MysqlConnector
     }
 
 
-
-    public function connect(){
-        // @TODO use PDO or mysqli
-        $this->connection = @mysql_connect(MYSQL_HOST,MYSQL_LOGIN,MYSQL_MDP);
-        mysql_query('SET NAMES utf8');
-        mysql_select_db(MYSQL_BDD,$this->connection);
-    }
-
-
-
     public function __toString(){
         $retour = "";
         $retour .= "instance de la classe MysqlConnector : <br/>";

+ 22 - 25
MysqlEntity.class.php

@@ -14,6 +14,7 @@ require_once('MysqlConnector.class.php');
 class MysqlEntity
 {
 
+    private $dbconnector = false;
     private $debug = false;
     private $debugAllQuery = false;
 
@@ -70,14 +71,14 @@ class MysqlEntity
             case 'timestamp':
             case 'longstring':
             default;
-                $return = mysql_real_escape_string((string)$value);
+                $return = $this->dbconnector->connection->real_escape_string((string)$value);
             break;
         }
         return $return ;
     }
 
     public function __construct(){
-        MysqlConnector::getInstance();
+        $this->dbconnector = MysqlConnector::getInstance();
     }
 
     public function __destruct(){
@@ -96,7 +97,7 @@ class MysqlEntity
     public function destroy($debug=false)
     {
         $query = 'DROP TABLE IF EXISTS `'.MYSQL_PREFIX.$this->TABLE_NAME.'`;';
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $myQuery = $this->customQuery($query);
     }
 
@@ -110,7 +111,7 @@ class MysqlEntity
     public function truncate($debug=false)
     {
         $query = 'TRUNCATE TABLE `'.MYSQL_PREFIX.$this->TABLE_NAME.'`;';
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $myQuery = $this->customQuery($query);
     }
 
@@ -138,7 +139,7 @@ class MysqlEntity
         ENGINE InnoDB,
         DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
         ;';
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $myQuery = $this->customQuery($query);
     }
 
@@ -171,7 +172,7 @@ class MysqlEntity
             }
 
             $query .=';';
-            if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+            if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
 
         $this->customQuery($query);
     }
@@ -212,9 +213,9 @@ class MysqlEntity
 
             $query .=');';
         }
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $this->customQuery($query);
-        $this->id =  (!isset($this->id)?mysql_insert_id():$this->id);
+        $this->id =  (!isset($this->id)?$this->dbconnector->connection->insert_id:$this->id);
     }
 
     /**
@@ -241,7 +242,7 @@ class MysqlEntity
             if($i){$query .='AND ';}else{$i=true;}
             $query .= '`'.$column.'`'.$operation.'"'.$this->secure($value, $column).'" ';
         }
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $this->customQuery($query);
     }
 
@@ -288,9 +289,9 @@ class MysqlEntity
             if($limit!=null) $query .='LIMIT '.$limit.' ';
             $query .=';';
 
-            if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
-            $execQuery = $this->customQuery($query);
-            while($queryReturn = mysql_fetch_assoc($execQuery)){
+            if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
+            $result = $this->customQuery($query);
+            while($queryReturn = $result->fetch_assoc()){
 
                 $object = new $this->CLASS_NAME();
                 foreach($this->object_fields as $field=>$type){
@@ -358,9 +359,9 @@ class MysqlEntity
             }
         }
         $query = 'SELECT COUNT(1) FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'`'.$whereClause;
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $myQuery = $this->customQuery($query);
-        $number = mysql_fetch_array($myQuery);
+        $number = $myQuery->fetch_array();
         return $number[0];
     }
 
@@ -383,27 +384,23 @@ class MysqlEntity
             $whereClause .= '`'.$column.'`'.$operation.'"'.$this->secure($value, $column).'"';
         }
         $query = 'DELETE FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` WHERE '.$whereClause.' ;';
-        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.mysql_error();
+        if($this->debug)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'<br>'.$this->dbconnector->connection->error;
         $this->customQuery($query);
 
     }
 
     ///@TODO: pourquoi deux méthodes différentes qui font la même chose ?
     public function customExecute($request){
-        if($this->debugAllQuery)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'<br>'.mysql_error();
-        $result = mysql_query($request);
+        if($this->debugAllQuery)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'<br>'.$this->dbconnector->connection->error;
+        $result = $this->dbconnector->connection->query($request);
         if (false===$result) {
-            throw new Exception(mysql_error());
+            throw new Exception($this->dbconnector->connection->error);
         }
         return $result;
     }
     public function customQuery($request){
-        if($this->debugAllQuery)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'<br>'.mysql_error();
-        $result = mysql_query($request);
-        if (false===$result) {
-            throw new Exception(mysql_error());
-        }
-        return $result;
+        if($this->debugAllQuery)echo '<hr>'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'<br>'.$this->dbconnector->connection->error;
+        return $this->dbconnector->connection->query($request);
     }
 
 
@@ -442,7 +439,7 @@ class MysqlEntity
     public function tableExists() {
         $table = '`'.MYSQL_PREFIX.$this->TABLE_NAME.'';
         $result = $this->customQuery("SHOW TABLES LIKE '$table'");
-        $assoc = mysql_fetch_assoc($result);
+        $assoc = $result->fetch_assoc();
         return false===$assoc ? false : true;
     }
 }

+ 3 - 3
Update.class.php

@@ -85,14 +85,14 @@ class Update{
                     if ($val != '') {
                         //remplacement des préfixes de table
                         $val = str_replace('##MYSQL_PREFIX##',MYSQL_PREFIX,$val);
-                        $result = mysql_query($val);
+                        $result = mysqli_query($val);
                         $ficlog = dirname(__FILE__).Update::FOLDER.'/'.substr($file,0,strlen($file)-3).'log';
                         if (false===$result) {
                             file_put_contents($ficlog, date('d/m/Y H:i:s').' : SQL : '.$val."\n", FILE_APPEND);
-                            file_put_contents($ficlog, date('d/m/Y H:i:s').' : '.mysql_error()."\n", FILE_APPEND);
+                            file_put_contents($ficlog, date('d/m/Y H:i:s').' : '.mysqli_error()."\n", FILE_APPEND);
                         } else {
                             file_put_contents($ficlog, date('d/m/Y H:i:s').' : SQL : '.$val."\n", FILE_APPEND);
-                            file_put_contents($ficlog, date('d/m/Y H:i:s').' : '.mysql_affected_rows().' rows affected'."\n", FILE_APPEND);
+                            file_put_contents($ficlog, date('d/m/Y H:i:s').' : '.mysqli_affected_rows().' rows affected'."\n", FILE_APPEND);
                         }
                     }
                 }

+ 3 - 3
install.php

@@ -92,10 +92,10 @@ if(!is_writable('./')){
 }else{
     $test[$lib_success][]=_t('INSTALL_INFO_RIGHT');
 }
-if (!@function_exists('mysql_connect')){
-    $test[$lib_errors][] = _t('INSTALL_ERROR_MYSQLCONNECT');
+if (!@function_exists('mysqli_connect')){
+    $test[$lib_errors][] = _t('INSTALL_ERROR_MYSQLICONNECT');
 }else{
-    $test[$lib_success][] = _t('INSTALL_INFO_MYSQLCONNECT');
+    $test[$lib_success][] = _t('INSTALL_INFO_MYSQLICONNECT');
 }
 if (!@function_exists('file_get_contents')){
     $test[$lib_errors][] =  _t('INSTALL_ERROR_FILEGET');

+ 2 - 2
locale/en.json

@@ -25,7 +25,7 @@
  "INSTALL_ERROR_CURL":"The required function 'curl_exec' is inaccessible on your server, please install the Curl module for PHP.",
  "INSTALL_ERROR_FILEGET":"The required function 'file_get_contents' is inaccessible on your server, check your version of PHP.",
  "INSTALL_ERROR_FILEPUT":"The required 'file_put_contents' is inaccessible on your server, check your version of PHP.",
- "INSTALL_ERROR_MYSQLCONNECT":"The required function 'mysql_connect' is inaccessible on your server, check your MySql installation.",
+ "INSTALL_ERROR_MYSQLICONNECT":"The required function 'mysqli_connect' is inaccessible on your server, check your MySql installation.",
  "INSTALL_ERROR_PHPV":"Your PHP version ($1) is too old, it is possible that some features script include malfunctions.",
  "INSTALL_ERROR_RIGHT":"Can't write in Leed directory, please add write permissions on the entire folder (sudo chmod 777 -R $1, think about shielding permissions later)",
  "INSTALL_ERROR_SAFEMODE":"The script can not manage the timeout alone because your safe mode is enabled,<br/>in your PHP configuration file, set the max_execution_time variable to 0 or disable safemode.",
@@ -35,7 +35,7 @@
  "INSTALL_INFO_CURL":"Requested function 'curl_exec' : OK",
  "INSTALL_INFO_FILEGET":"Requested function 'file_get_contents' : OK",
  "INSTALL_INFO_FILEPUT":"Requested function 'file_put_contents' : OK",
- "INSTALL_INFO_MYSQLCONNECT":"Requested function 'mysql_connect' : OK",
+ "INSTALL_INFO_MYSQLICONNECT":"Requested function 'mysqli_connect' : OK",
  "INSTALL_INFO_PHPV":"Php version compatibility ($1) : OK",
  "INSTALL_INFO_RIGHT":"Permissions on the current folder: OK ",
  "INSTALL_INFO_SAFEMODE":"Management timeout: OK",

+ 2 - 2
locale/eo.json

@@ -25,7 +25,7 @@
  "INSTALL_ERROR_CURL":"La funkcio nepra 'curl_exec' ne akceseblas ĉe via servilo, kontrolu vian version de PHP.",
  "INSTALL_ERROR_FILEGET":"La funkcio nepra 'file_get_contents' ne akceseblas ĉe via servilo, kontrolu vian version de PHP.",
  "INSTALL_ERROR_FILEPUT":"La funkcio nepra 'file_put_contents' ne akceseblas ĉe via servilo, kontrolu vian version de PHP.",
- "INSTALL_ERROR_MYSQLCONNECT":"La funkcio nepra 'mysql_connect' ne akceseblas ĉe via servilo, kontrolu vian version de MySql.",
+ "INSTALL_ERROR_MYSQLICONNECT":"La funkcio nepra 'mysqli_connect' ne akceseblas ĉe via servilo, kontrolu vian version de MySql.",
  "INSTALL_ERROR_PHPV":"Via versio de PHP ($1) estas tro malnova, eblas ke funkcioj misfunkcias.",
  "INSTALL_ERROR_RIGHT":"Ne eblas skribi en la dosierujon Leed, bonvolu aldoni permesojn por skribi sur la tuta dosierujo (sudo chmod 777 -R $1, pripensu finagordi la permesoj poste)",
  "INSTALL_ERROR_SAFEMODE":"La skripto ne povas mastrumi la tempolimo mem ĉar via safe mode estas aktivita en via agorda dosiero de PHP, ŝalti la variablon max_execution_time al 0 aŭ malŝalti la safemode.",
@@ -35,7 +35,7 @@
  "INSTALL_INFO_CURL":"Funkcio nepra 'curl_exec': bone",
  "INSTALL_INFO_FILEGET":"Funkcio nepra 'file_get_contents': bone",
  "INSTALL_INFO_FILEPUT":"Funkcio nepra 'file_put_contents': bone",
- "INSTALL_INFO_MYSQLCONNECT":"Funkcio nepra 'mysql_connect': bone",
+ "INSTALL_INFO_MYSQLICONNECT":"Funkcio nepra 'mysqli_connect': bone",
  "INSTALL_INFO_PHPV":"Kongrueco versio PHP ($1): bone",
  "INSTALL_INFO_RIGHT":"Permesoj sur aktuala dosierujo: bone",
  "INSTALL_INFO_SAFEMODE":"Mastrumo de tempolimo: bone",

+ 2 - 2
locale/es.json

@@ -24,7 +24,7 @@
  "INSTALL_ERROR_CONNEXION":"No se puede conectar a la base de datos.",
  "INSTALL_ERROR_FILEGET":"Se necesita la función 'file_get_contents' pero no es disponible sobre el servidor. Verificar su versión de PHP.",
  "INSTALL_ERROR_FILEPUT":"Se necesita la función 'file_put_contents' pero no es disponible sobre el servidor. Verificar su versión de PHP.",
- "INSTALL_ERROR_MYSQLCONNECT":"Se necesita la función 'mysql_connect' pero no es disponible sobre el servidor. Verificar su versión de PHP.",
+ "INSTALL_ERROR_MYSQLICONNECT":"Se necesita la función 'mysqli_connect' pero no es disponible sobre el servidor. Verificar su versión de PHP.",
  "INSTALL_ERROR_PHPV":"Su versión de PHP ($1) es demasiada antigua, se puede que algunas funcionalidades del script no funcionan.",
  "INSTALL_ERROR_RIGHT":"No se puede escribir en el directorio de Leed. Añadir los permisos para escribir sobre todo el directorio (sudo chmod 777 -R $1, pensar a modificarlo de nuevo por medida se seguridad después de la instalación)",
  "INSTALL_ERROR_SAFEMODE":"El script no puede administrar el timeout solo ya que el safe mode está activado,<br/> en su archivo de configuración de PHP, poner la variable max_execution_time a 0 o desactivar el safe mode.",
@@ -33,7 +33,7 @@
  "INSTALL_INFO_CONNEXION":"Connexión a la base de datos : OK",
  "INSTALL_INFO_FILEGET":"Función necesaria 'file_get_contents' : OK",
  "INSTALL_INFO_FILEPUT":"Función necesaria 'file_put_contents' : OK",
- "INSTALL_INFO_MYSQLCONNECT":"Función necesaria 'mysql_connect' : OK",
+ "INSTALL_INFO_MYSQLICONNECT":"Función necesaria 'mysqli_connect' : OK",
  "INSTALL_INFO_PHPV":"Version de PHP ($1) compatible : OK",
  "INSTALL_INFO_RIGHT":"Permisos sobre el directorio corriente : OK",
  "INSTALL_INFO_SAFEMODE":"Gestión del timeout : OK",

+ 2 - 2
locale/fr.json

@@ -25,7 +25,7 @@
  "INSTALL_ERROR_CURL":"La fonction requise 'curl_exec' est inaccessible sur votre serveur, veuillez installer le module Curl de PHP.",
  "INSTALL_ERROR_FILEGET":"La fonction requise 'file_get_contents' est inaccessible sur votre serveur, vérifiez votre version de PHP.",
  "INSTALL_ERROR_FILEPUT":"La fonction requise 'file_put_contents' est inaccessible sur votre serveur, vérifiez votre version de PHP.",
- "INSTALL_ERROR_MYSQLCONNECT":"La fonction requise 'mysql_connect' est inaccessible sur votre serveur, vérifiez votre installation de MySql.",
+ "INSTALL_ERROR_MYSQLICONNECT":"La fonction requise 'mysqli_connect' est inaccessible sur votre serveur, vérifiez votre installation de MySql.",
  "INSTALL_ERROR_PHPV":"Votre version de PHP ($1) est trop ancienne, il est possible que certaines fonctionnalités du script comportent des dysfonctionnements.",
  "INSTALL_ERROR_RIGHT":"Écriture impossible dans le répertoire Leed, veuillez ajouter les permissions en écriture sur tout le dossier (sudo chmod 777 -R $1, pensez à blinder les permissions par la suite)",
  "INSTALL_ERROR_SAFEMODE":"Le script ne peut pas gérer le timeout tout seul car votre safe mode est activé,<br/> dans votre fichier de configuration PHP, mettez la variable max_execution_time à 0 ou désactivez le safemode.",
@@ -35,7 +35,7 @@
  "INSTALL_INFO_CURL":"Fonction requise 'curl_exec' : OK",
  "INSTALL_INFO_FILEGET":"Fonction requise 'file_get_contents' : OK",
  "INSTALL_INFO_FILEPUT":"Fonction requise 'file_put_contents' : OK",
- "INSTALL_INFO_MYSQLCONNECT":"Fonction requise 'mysql_connect' : OK",
+ "INSTALL_INFO_MYSQLICONNECT":"Fonction requise 'mysqli_connect' : OK",
  "INSTALL_INFO_PHPV":"Compatibilité version PHP ($1) : OK",
  "INSTALL_INFO_RIGHT":"Permissions sur le dossier courant : OK",
  "INSTALL_INFO_SAFEMODE":"Gestion du timeout : OK",