From 418c4f8edb257673e86e878485b3fa5eb8887dc9 Mon Sep 17 00:00:00 2001 From: "maieul@maieul.net" <> Date: Sat, 10 Dec 2016 20:35:18 +0000 Subject: [PATCH] =?UTF-8?q?retourner=20le=20bon=20message=20si=20un=20v?= =?UTF-8?q?=C3=A9rification=20stricte=20d'url=20=C3=A9choue=20d=C3=A9j?= =?UTF-8?q?=C3=A0=20sur=20le=20protocole?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paquet.xml | 2 +- plugin.xml | 2 +- verifier/url.php | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/paquet.xml b/paquet.xml index e03f043..53751bc 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ <paquet prefix="verifier" categorie="outil" - version="1.1.0" + version="1.1.1" etat="stable" compatibilite="[2.0.10;3.1.*]" logo="images/verifier-128.png" diff --git a/plugin.xml b/plugin.xml index 75d355b..206efed 100644 --- a/plugin.xml +++ b/plugin.xml @@ -9,7 +9,7 @@ <auteur>[Les Développements Durables->http://www.ldd.fr]</auteur> <icon>images/verifier-128.png</icon> <licence>GPL v3</licence> - <version>1.1.0</version> + <version>1.1.1</version> <etat>stable</etat> <description> <multi> diff --git a/verifier/url.php b/verifier/url.php index 71b5032..e85ce93 100644 --- a/verifier/url.php +++ b/verifier/url.php @@ -44,7 +44,6 @@ function verifier_url_dist($valeur, $options = array()) { $fonctions_disponibles = array('protocole_seul' => 'verifier_url_protocole', 'php_filter' => 'verifier_php_filter', 'complet' => 'verifier_url_complet'); $fonction_verif = $fonctions_disponibles[$mode]; - return $fonction_verif($valeur,$type_protocole,$protocole) ; } @@ -97,7 +96,7 @@ function verifier_url_protocole($url, $type_protocole, $protocole) { * @return boolean Retourne true uniquement lorsque l'url est valide */ function verifier_php_filter($url, $type_protocole, $protocole) { - if ($msg = verifier_url_protocole($url, $type_protocole, $protocole) != '') { + if ($msg = verifier_url_protocole($url, $type_protocole, $protocole)) { return $msg; } if (!filter_var($url, FILTER_VALIDATE_URL)) { @@ -119,7 +118,7 @@ function verifier_php_filter($url, $type_protocole, $protocole) { */ function verifier_url_complet($url, $type_protocole, $protocole) { - if ($msg = verifier_url_protocole($url, $type_protocole, $protocole) != '') { + if ($msg = verifier_url_protocole($url, $type_protocole, $protocole)) { return $msg; } // SCHEME -- GitLab