Overview
Comment:Menues corrections pour wiki et squelettes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2bd0af25f077136c81815c094547faa02e5e60e1
User & Date: bohwaz on 2012-05-24 03:03:58
Other Links: manifest | tags
Context
2012-05-24
03:58
+ Meilleure gestion des retours entre boucles parent et enfant + Génération de code plus propre check-in: dd192f0919 user: bohwaz tags: trunk
03:03
Menues corrections pour wiki et squelettes check-in: 2bd0af25f0 user: bohwaz tags: trunk
2012-05-21
23:02
Fix [4e07e7a56f] Affichage des infos manquantes sur la fiche de membre check-in: ebe59d4c1c user: bohwaz tags: trunk
Changes

Modified include/class.wiki.php from [13b3a1b331] to [7f1efacd51].

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    protected $restriction_categorie = null;
    protected $restriction_droit = null;

    static public function transformTitleToURI($str)
    {
        $str = utils::transliterateToAscii($str);

        $str = preg_replace('!\s+!', '-', $str);
        $str = preg_replace('![^a-z0-9_-]!i', '', $str);

        return $str;
    }

    // Gestion des données ///////////////////////////////////////////////////////

    public function _checkFields(&$data)







|
|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    protected $restriction_categorie = null;
    protected $restriction_droit = null;

    static public function transformTitleToURI($str)
    {
        $str = utils::transliterateToAscii($str);

        $str = preg_replace('![^\w\d_-]!i', '-', $str);
        $str = preg_replace('!-{2,}!', '-', $str);

        return $str;
    }

    // Gestion des données ///////////////////////////////////////////////////////

    public function _checkFields(&$data)

Modified include/lib.squelette.filtres.php from [6b436a7caf] to [cb6fbac260].

42
43
44
45
46
47
48







49
50
51
52
53
54
55
        '<='    =>  'inferieur_ou_egal_a',
        'yes'   =>  'oui',
        'no'    =>  'non',
        'and'   =>  'et',
        'or'    =>  'ou',
        'xor'   =>  'xou',
    );








    static public function date_en_francais($date)
    {
        return ucfirst(strtolower(utils::strftime_fr('%A %e %B %Y', $date)));
    }

    static public function heure_en_francais($date)







>
>
>
>
>
>
>







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
        '<='    =>  'inferieur_ou_egal_a',
        'yes'   =>  'oui',
        'no'    =>  'non',
        'and'   =>  'et',
        'or'    =>  'ou',
        'xor'   =>  'xou',
    );

    static public $desactiver_defaut = array(
        'formatter_texte',
        'entites_html',
        'proteger_contact',
        'echapper_xml',
    );

    static public function date_en_francais($date)
    {
        return ucfirst(strtolower(utils::strftime_fr('%A %e %B %Y', $date)));
    }

    static public function heure_en_francais($date)
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
            return '<span style="unicode-bidi:bidi-override;direction: rtl;">'.htmlspecialchars(strrev($contact), ENT_QUOTES, 'UTF-8').'</span>';
        else
            return '<a href="'.htmlspecialchars($contact, ENT_QUOTES, 'UTF-8').'">'.htmlspecialchars($contact, ENT_QUOTES, 'UTF-8').'</a>';
    }

    static public function entites_html($texte)
    {
        return htmlspecialchars($texte, ENT_COMPAT, 'UTF-8');
    }

    static public function echapper_xml($texte)
    {
        return str_replace('&#039;', '&apos;', htmlspecialchars($texte, ENT_QUOTES, 'UTF-8'));
    }








|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
            return '<span style="unicode-bidi:bidi-override;direction: rtl;">'.htmlspecialchars(strrev($contact), ENT_QUOTES, 'UTF-8').'</span>';
        else
            return '<a href="'.htmlspecialchars($contact, ENT_QUOTES, 'UTF-8').'">'.htmlspecialchars($contact, ENT_QUOTES, 'UTF-8').'</a>';
    }

    static public function entites_html($texte)
    {
        return htmlspecialchars($texte, ENT_QUOTES, 'UTF-8');
    }

    static public function echapper_xml($texte)
    {
        return str_replace('&#039;', '&apos;', htmlspecialchars($texte, ENT_QUOTES, 'UTF-8'));
    }

210
211
212
213
214
215
216







217
218
219
220
221
222
223
        return ($value == $test) ? $un : $deux;
    }

    static public function supprimer_tags($value, $replace = '')
    {
        return preg_replace('!<[^>]*>!', $replace, $value);
    }








    static public function couper($texte, $taille, $etc = ' (...)')
    {
        if (strlen($texte) > $taille)
        {
            $texte = substr($texte, 0, $taille);
            $taille -= ($taille * 0.1);







>
>
>
>
>
>
>







217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
        return ($value == $test) ? $un : $deux;
    }

    static public function supprimer_tags($value, $replace = '')
    {
        return preg_replace('!<[^>]*>!', $replace, $value);
    }

    static public function supprimer_spip($value)
    {
        $value = preg_replace('!\[([^\]]+)(?:->[^\]]*)?\]!U', '$1', $value);
        $value = preg_replace('!\{+([^\}]*)\}+!', '$1', $value);
        return $value;
    }

    static public function couper($texte, $taille, $etc = ' (...)')
    {
        if (strlen($texte) > $taille)
        {
            $texte = substr($texte, 0, $taille);
            $taille -= ($taille * 0.1);