From 1836b28dc881e437eff091d41b8f2b68b01f9c7e Mon Sep 17 00:00:00 2001 From: Simounet Date: Sun, 20 Sep 2015 22:36:00 +0200 Subject: [PATCH] Switch from mysql to mysqli PHP mod --- Event.class.php | 6 ++--- Feed.class.php | 4 ++-- Folder.class.php | 4 ++-- Functions.class.php | 7 +++--- MysqlConnector.class.php | 17 ++++----------- MysqlEntity.class.php | 47 +++++++++++++++++++--------------------- Update.class.php | 6 ++--- install.php | 6 ++--- locale/en.json | 4 ++-- locale/eo.json | 4 ++-- locale/es.json | 4 ++-- locale/fr.json | 4 ++-- 12 files changed, 50 insertions(+), 63 deletions(-) diff --git a/Event.class.php b/Event.class.php index 58569705..03ee315f 100644 --- a/Event.class.php +++ b/Event.class.php @@ -52,7 +52,7 @@ function __construct($guid=null,$title=null,$description=null,$content=null,$pub 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 @@ function getEventCountPerFolder(){ 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 @@ function getEventsNotVerboseFeed($start=0,$limit=10000,$order,$columns='*'){ $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); diff --git a/Feed.class.php b/Feed.class.php index 7692ba51..f5216784 100644 --- a/Feed.class.php +++ b/Feed.class.php @@ -246,7 +246,7 @@ function countUnreadEvents(){ $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 @@ function getFeedsPerFolder(){ $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; diff --git a/Folder.class.php b/Folder.class.php index 65c726de..a191ddec 100644 --- a/Folder.class.php +++ b/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 @@ function getEvents($start=0,$limit=10000,$order,$columns='*'){ $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); diff --git a/Functions.class.php b/Functions.class.php index 2bea86fd..0b03e15f 100644 --- a/Functions.class.php +++ b/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 @@ public static function testDb($server, $login, $pass, $db=null) { /* 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; } diff --git a/MysqlConnector.class.php b/MysqlConnector.class.php index 585045cf..3aeda3da 100644 --- a/MysqlConnector.class.php +++ b/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 @@ public static function getInstance(){ } - - 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 :
"; diff --git a/MysqlEntity.class.php b/MysqlEntity.class.php index 5dd63aa4..ca7d7635 100644 --- a/MysqlEntity.class.php +++ b/MysqlEntity.class.php @@ -14,6 +14,7 @@ class MysqlEntity { + private $dbconnector = false; private $debug = false; private $debugAllQuery = false; @@ -70,14 +71,14 @@ protected function secure($value, $field){ 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 @@ public function __destruct(){ public function destroy($debug=false) { $query = 'DROP TABLE IF EXISTS `'.MYSQL_PREFIX.$this->TABLE_NAME.'`;'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $myQuery = $this->customQuery($query); } @@ -110,7 +111,7 @@ public function destroy($debug=false) public function truncate($debug=false) { $query = 'TRUNCATE TABLE `'.MYSQL_PREFIX.$this->TABLE_NAME.'`;'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $myQuery = $this->customQuery($query); } @@ -138,7 +139,7 @@ public function create($debug=false){ ENGINE InnoDB, DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $myQuery = $this->customQuery($query); } @@ -171,7 +172,7 @@ public function massiveInsert($events){ } $query .=';'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $this->customQuery($query); } @@ -212,9 +213,9 @@ public function save(){ $query .=');'; } - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$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 @@ public function change($columns,$columns2,$operation='=',$debug=false){ if($i){$query .='AND ';}else{$i=true;} $query .= '`'.$column.'`'.$operation.'"'.$this->secure($value, $column).'" '; } - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $this->customQuery($query); } @@ -288,9 +289,9 @@ public function loadAll($columns,$order=null,$limit=null,$operation="=",$debug=f if($limit!=null) $query .='LIMIT '.$limit.' '; $query .=';'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); - $execQuery = $this->customQuery($query); - while($queryReturn = mysql_fetch_assoc($execQuery)){ + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$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 @@ public function rowCount($columns=null) } } $query = 'SELECT COUNT(1) FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'`'.$whereClause; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$this->dbconnector->connection->error; $myQuery = $this->customQuery($query); - $number = mysql_fetch_array($myQuery); + $number = $myQuery->fetch_array(); return $number[0]; } @@ -383,27 +384,23 @@ public function delete($columns,$operation='=',$debug=false){ $whereClause .= '`'.$column.'`'.$operation.'"'.$this->secure($value, $column).'"'; } $query = 'DELETE FROM `'.MYSQL_PREFIX.$this->TABLE_NAME.'` WHERE '.$whereClause.' ;'; - if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.mysql_error(); + if($this->debug)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$query.'
'.$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 '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'
'.mysql_error(); - $result = mysql_query($request); + if($this->debugAllQuery)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'
'.$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 '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'
'.mysql_error(); - $result = mysql_query($request); - if (false===$result) { - throw new Exception(mysql_error()); - } - return $result; + if($this->debugAllQuery)echo '
'.$this->CLASS_NAME.' ('.__METHOD__ .') : Requete --> '.$request.'
'.$this->dbconnector->connection->error; + return $this->dbconnector->connection->query($request); } @@ -442,7 +439,7 @@ public function getObject_fields(){ 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; } } diff --git a/Update.class.php b/Update.class.php index aefa1654..a1ffbddb 100644 --- a/Update.class.php +++ b/Update.class.php @@ -85,14 +85,14 @@ public static function ExecutePatch($simulation=false) { 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); } } } diff --git a/install.php b/install.php index 8f69a9bd..7300a6b7 100644 --- a/install.php +++ b/install.php @@ -92,10 +92,10 @@ }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'); diff --git a/locale/en.json b/locale/en.json index 68b27568..971c706d 100755 --- a/locale/en.json +++ b/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,
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", diff --git a/locale/eo.json b/locale/eo.json index 033b33a4..8d775f32 100755 --- a/locale/eo.json +++ b/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", diff --git a/locale/es.json b/locale/es.json index d144c7ca..c4d46552 100755 --- a/locale/es.json +++ b/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,
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", diff --git a/locale/fr.json b/locale/fr.json index c8f15e5c..786440e0 100755 --- a/locale/fr.json +++ b/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é,
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",