Overview
Comment:Utilisation de KD2\Translate pour obtenir la liste des pays
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 1c1f650b033791dd357cb5d1e45d23dfff48dbd3
User & Date: bohwaz on 2017-06-08 05:37:02
Other Links: branch diff | manifest | tags
Context
2017-06-08
05:37
Correction message login qui ne marche pas check-in: 9112f10a85 user: bohwaz tags: dev
05:37
Utilisation de KD2\Translate pour obtenir la liste des pays check-in: 1c1f650b03 user: bohwaz tags: dev
03:40
Correction : gérer les noms de plugins en majuscules (signal par @Youssef) check-in: c3541ceb63 user: bohwaz tags: dev
Changes

Modified src/include/lib/Garradin/Utils.php from [eae3812611] to [ac170902ce].

1
2
3
4
5
6

7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace Garradin;

use KD2\Security;
use KD2\Form;


class Utils
{
    static protected $country_list = null;

    static protected $skriv = null;

    static private $french_date_names = [
        'January'=>'Janvier', 'February'=>'Février', 'March'=>'Mars', 'April'=>'Avril', 'May'=>'Mai',
        'June'=>'Juin', 'July'=>'Juillet', 'August'=>'Août', 'September'=>'Septembre', 'October'=>'Octobre',
        'November'=>'Novembre', 'December'=>'Décembre', 'Monday'=>'Lundi', 'Tuesday'=>'Mardi', 'Wednesday'=>'Mercredi',
        'Thursday'=>'Jeudi','Friday'=>'Vendredi','Saturday'=>'Samedi','Sunday'=>'Dimanche',






>



<
<







1
2
3
4
5
6
7
8
9
10


11
12
13
14
15
16
17
<?php

namespace Garradin;

use KD2\Security;
use KD2\Form;
use KD2\Translate;

class Utils
{


    static protected $skriv = null;

    static private $french_date_names = [
        'January'=>'Janvier', 'February'=>'Février', 'March'=>'Mars', 'April'=>'Avril', 'May'=>'Mai',
        'June'=>'Juin', 'July'=>'Juillet', 'August'=>'Août', 'September'=>'Septembre', 'October'=>'Octobre',
        'November'=>'Novembre', 'December'=>'Décembre', 'Monday'=>'Lundi', 'Tuesday'=>'Mardi', 'Wednesday'=>'Mercredi',
        'Thursday'=>'Jeudi','Friday'=>'Vendredi','Saturday'=>'Samedi','Sunday'=>'Dimanche',
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
    static public function getIP()
    {
        if (!empty($_SERVER['REMOTE_ADDR']))
            return $_SERVER['REMOTE_ADDR'];
        return '';
    }

    static public function &getCountryList()
    {
        return \KD2\Countries_FR::$countries;
    }

    static public function getCountryName($code)
    {
        $list = self::getCountryList();

        if (!isset($list[$code]))







|

|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
    static public function getIP()
    {
        if (!empty($_SERVER['REMOTE_ADDR']))
            return $_SERVER['REMOTE_ADDR'];
        return '';
    }

    static public function getCountryList()
    {
        return Translate::getCountriesList('fr');
    }

    static public function getCountryName($code)
    {
        $list = self::getCountryList();

        if (!isset($list[$code]))