X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fprive%2Fformulaires%2Fediter_mot.php;h=4309d2173fb624e160481bed77aaefe01941d53b;hp=ba20a0b8125eaa297309ebad65167d83bde63ea7;hb=e99f0878011913365e49b30d90e496c24c301393;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed
diff --git a/www/prive/formulaires/editer_mot.php b/www/prive/formulaires/editer_mot.php
index ba20a0b..4309d21 100644
--- a/www/prive/formulaires/editer_mot.php
+++ b/www/prive/formulaires/editer_mot.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. *
@@ -59,12 +59,17 @@ function formulaires_editer_mot_verifier_dist($id_mot='new', $id_groupe=0, $reto
// la comparaison accepte un numero absent ou different
// sinon avertir
if (!count($erreurs) AND !_request('confirm_titre_mot')){
- if (sql_countsel("spip_mots",
+ if ($l = sql_allfetsel('id_mot', "spip_mots",
"titre REGEXP ".sql_quote("^([0-9]+[.] )?".preg_quote(supprimer_numero(_request('titre')))."$")
- ." AND id_mot<>".intval($id_mot)))
- $erreurs['titre'] =
- _T('avis_doublon_mot_cle')
- ." ";
+ ." AND id_mot<>".intval($id_mot))) {
+ $a = 'id_mot='.$l[0]['id_mot'];
+ $h = generer_url_ecrire('mots_edit', $a);
+ $l = join(' ', array_map('array_shift', $l));
+ $t = _T('avis_doublon_mot_cle');
+ $erreurs['titre'] = "$t ?"
+ ." ";
+ set_request('edit','oui');
+ }
}
return $erreurs;
}