equal
deleted
inserted
replaced
15 */ |
15 */ |
16 date_default_timezone_set('UTC'); |
16 date_default_timezone_set('UTC'); |
17 |
17 |
18 $project_url_base = 'ldtplatform/ldt/cljson/id/'; |
18 $project_url_base = 'ldtplatform/ldt/cljson/id/'; |
19 |
19 |
20 $C_default_rep = 'tac-2018-03-economie-contributive-societe-soin'; |
20 $C_default_rep = 'enmi18-preparatoire'; |
21 $C_feedback_form_url = 'https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dDZILVdXVHRzd0xhWGVZXzkweHN2RGc6MQ#gid=0'; |
21 $C_feedback_form_url = 'https://spreadsheets.google.com/spreadsheet/viewform?hl=en_US&formkey=dDZILVdXVHRzd0xhWGVZXzkweHN2RGc6MQ#gid=0'; |
22 $C_event_props = __DIR__ . "/event_props"; |
22 $C_event_props = __DIR__ . "/event_props"; |
23 $C_event_users = array('polemictweet' => 'polemictweet'.date('Y/m/d')); |
23 $C_event_users = array('polemictweet' => 'polemictweet'.date('Y/m/d')); |
24 |
24 |
25 $C_openssl_cipher_iv_length = 16; //openssl_cipher_iv_length('aes256') |
25 $C_openssl_cipher_iv_length = 16; //openssl_cipher_iv_length('aes256') |
647 * Modifies a string to remove all non ASCII characters and spaces. |
647 * Modifies a string to remove all non ASCII characters and spaces. |
648 */ |
648 */ |
649 function slugify($text) |
649 function slugify($text) |
650 { |
650 { |
651 // replace non letter or digits by - |
651 // replace non letter or digits by - |
652 $text = preg_replace('~[^\\pL\d]+~u', '-', $text); |
652 $text = preg_replace('~[^\pL\d]+~u', '-', $text); |
653 |
653 |
654 // trim |
654 // trim |
655 $text = trim($text, '-'); |
655 $text = trim($text, '-'); |
656 |
656 |
657 // transliterate |
657 $transliterator = Transliterator::create( |
658 if (function_exists('iconv')) |
658 'NFD; [:Nonspacing Mark:] Remove; NFC;' |
659 { |
659 ); |
660 $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); |
660 $text = $transliterator->transliterate($text); |
661 } |
|
662 |
661 |
663 // lowercase |
662 // lowercase |
664 $text = strtolower($text); |
663 $text = strtolower($text); |
665 |
664 |
666 // remove unwanted characters |
665 // remove unwanted characters |