[SPIP] +2.1.12
[velocampus/web/www.git] / www / plugins / auto / cfg / cfg / classes / type_id.php
1 <?php
2 /**
3 * Plugin générique de configuration pour SPIP
4 *
5 * @license GNU/GPL
6 * @package plugins
7 * @subpackage cfg
8 * @category outils
9 * @copyright (c) toggg, marcimat 2007-2008
10 * @link http://www.spip-contrib.net/
11 * @version $Id: type_id.php 36735 2010-03-28 21:25:09Z gilles.vincent@gmail.com $
12 */
13
14 if (!defined("_ECRIRE_INC_VERSION")) return;
15
16 /**
17 *
18 * @param string $champ
19 * @param Object $cfg
20 * @return string
21 */
22 function cfg_verifier_type_id($champ, &$cfg){
23 if (!preg_match('#^[a-z_]\w*$#', $cfg->val[$champ])){
24 $cfg->ajouter_erreur(_T('cfg:erreur_type_id', array('champ'=>$champ)));
25 }
26 return true;
27 }
28
29 ?>