diff options
| author | polo <ordipolo@gmx.fr> | 2025-11-01 17:54:22 +0100 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-11-01 17:54:22 +0100 |
| commit | 46d3c239a7ad2b00e86373f2fd0e829fdcba57f7 (patch) | |
| tree | 054d8e5d3c43bcfc587bb5308e6d2a444eec54bf /bin | |
| parent | f33135c5d36d0e747d07773919ae0bc84cbceac1 (diff) | |
| download | cms-46d3c239a7ad2b00e86373f2fd0e829fdcba57f7.tar.gz cms-46d3c239a7ad2b00e86373f2fd0e829fdcba57f7.tar.bz2 cms-46d3c239a7ad2b00e86373f2fd0e829fdcba57f7.zip | |
utilisation des icônes SVG du dépôt twbs/bootstrap-icons pour les réseaux sociaux, amélioration du CSS
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/install_tinymce_lang.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/install_tinymce_lang.php b/bin/install_tinymce_lang.php index 4950cc1..e76ec91 100644 --- a/bin/install_tinymce_lang.php +++ b/bin/install_tinymce_lang.php | |||
| @@ -2,7 +2,8 @@ | |||
| 2 | // bin/install_tinymce_lang.php | 2 | // bin/install_tinymce_lang.php |
| 3 | function installTinymceLang(string $lang = 'fr_FR'): void | 3 | function installTinymceLang(string $lang = 'fr_FR'): void |
| 4 | { | 4 | { |
| 5 | $dest = 'public/js/tinymce-langs/' . $lang . '.js'; | 5 | $path = 'public/js/tinymce-langs'; |
| 6 | $dest = $lang . '.js'; | ||
| 6 | $link = "https://cdn.jsdelivr.net/npm/tinymce-lang/langs/" . $lang . ".min.js"; | 7 | $link = "https://cdn.jsdelivr.net/npm/tinymce-lang/langs/" . $lang . ".min.js"; |
| 7 | 8 | ||
| 8 | $curl = curl_init($link); | 9 | $curl = curl_init($link); |
| @@ -10,8 +11,12 @@ function installTinymceLang(string $lang = 'fr_FR'): void | |||
| 10 | echo "Erreur : Impossible d'initialiser cURL.\n"; | 11 | echo "Erreur : Impossible d'initialiser cURL.\n"; |
| 11 | return; | 12 | return; |
| 12 | } | 13 | } |
| 14 | |||
| 15 | if(!is_dir($path)){ | ||
| 16 | mkdir($path, 0755, true); | ||
| 17 | } | ||
| 13 | 18 | ||
| 14 | $file = @fopen($dest, 'w+'); // @masque l'erreur pour la traiter soi-même | 19 | $file = @fopen($path . '/' . $dest, 'w+'); // @masque l'erreur pour la traiter soi-même |
| 15 | if(!$file){ // erreur écriture fichier | 20 | if(!$file){ // erreur écriture fichier |
| 16 | echo "Erreur : Impossible d'ouvrir le fichier $dest pour l'écriture.\n"; | 21 | echo "Erreur : Impossible d'ouvrir le fichier $dest pour l'écriture.\n"; |
| 17 | return; | 22 | return; |
