@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | |
@@ -40,29 +40,29 @@ discard block |
||
| 40 | 40 | * Code HTML de la liste |
| 41 | 41 | */ |
| 42 | 42 | function inc_lister_objets_dist($vue, $contexte = [], $force = false) { |
| 43 | - $res = ''; // debug |
|
| 44 | - if (!is_array($contexte)) { |
|
| 45 | - return _L('$contexte doit etre un tableau dans inc/lister_objets'); |
|
| 46 | - } |
|
| 43 | + $res = ''; // debug |
|
| 44 | + if (!is_array($contexte)) { |
|
| 45 | + return _L('$contexte doit etre un tableau dans inc/lister_objets'); |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - $fond = "prive/objets/liste/$vue"; |
|
| 49 | - if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 50 | - // traiter les cas particuliers |
|
| 51 | - include_spip('base/connect_sql'); |
|
| 52 | - $vue = table_objet($vue); |
|
| 53 | - $fond = "prive/objets/liste/$vue"; |
|
| 54 | - if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 55 | - return _L("vue $vue introuvable pour lister les objets"); |
|
| 56 | - } |
|
| 57 | - } |
|
| 48 | + $fond = "prive/objets/liste/$vue"; |
|
| 49 | + if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 50 | + // traiter les cas particuliers |
|
| 51 | + include_spip('base/connect_sql'); |
|
| 52 | + $vue = table_objet($vue); |
|
| 53 | + $fond = "prive/objets/liste/$vue"; |
|
| 54 | + if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 55 | + return _L("vue $vue introuvable pour lister les objets"); |
|
| 56 | + } |
|
| 57 | + } |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | - $contexte['sinon'] = ($force ? $contexte['titre'] : ''); |
|
| 60 | + $contexte['sinon'] = ($force ? $contexte['titre'] : ''); |
|
| 61 | 61 | |
| 62 | - $res = recuperer_fond($fond, $contexte, ['ajax' => true]); |
|
| 63 | - if (_request('var_liste')) { |
|
| 64 | - echo var_export($contexte, true); |
|
| 65 | - } |
|
| 62 | + $res = recuperer_fond($fond, $contexte, ['ajax' => true]); |
|
| 63 | + if (_request('var_liste')) { |
|
| 64 | + echo var_export($contexte, true); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - return $res; |
|
| 67 | + return $res; |
|
| 68 | 68 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | |
@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | * @param array $opt |
| 25 | 25 | */ |
| 26 | 26 | function inc_journal_dist($phrase, $opt = []) { |
| 27 | - if (!strlen($phrase)) { |
|
| 28 | - return; |
|
| 29 | - } |
|
| 30 | - if ($opt) { |
|
| 31 | - $phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt)); |
|
| 32 | - } |
|
| 33 | - spip_log($phrase, 'journal'); |
|
| 27 | + if (!strlen($phrase)) { |
|
| 28 | + return; |
|
| 29 | + } |
|
| 30 | + if ($opt) { |
|
| 31 | + $phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt)); |
|
| 32 | + } |
|
| 33 | + spip_log($phrase, 'journal'); |
|
| 34 | 34 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -38,70 +38,70 @@ discard block |
||
| 38 | 38 | * @return array|string |
| 39 | 39 | */ |
| 40 | 40 | function inc_couleurs_dist($choix = null, $ajouter = false) { |
| 41 | - static $couleurs_spip = [ |
|
| 42 | - // Violet soutenu |
|
| 43 | - 9 => ['couleur_theme' => '#9a6ef2'], |
|
| 44 | - // Violet rosé |
|
| 45 | - 4 => ['couleur_theme' => '#c464cb'], |
|
| 46 | - // Rose interface SPIP |
|
| 47 | - 2 => ['couleur_theme' => '#F02364'], |
|
| 48 | - // Rouge |
|
| 49 | - 8 => ['couleur_theme' => '#ff4524'], |
|
| 50 | - // Orange |
|
| 51 | - 3 => ['couleur_theme' => '#c97500'], |
|
| 52 | - // Vert SPIP |
|
| 53 | - 1 => ['couleur_theme' => '#9dba00'], |
|
| 54 | - // Vert Troglo |
|
| 55 | - 7 => ['couleur_theme' => '#419a2c'], |
|
| 56 | - // Bleu-vert |
|
| 57 | - 12 => ['couleur_theme' => '#269681'], |
|
| 58 | - // Bleu pastel |
|
| 59 | - 5 => ['couleur_theme' => '#3190ae'], |
|
| 60 | - // Bleu Kermesse |
|
| 61 | - 11 => ['couleur_theme' => '#288bdd'], |
|
| 62 | - // Gris bleuté |
|
| 63 | - 6 => ['couleur_theme' => '#7d90a2'], |
|
| 64 | - // Gris |
|
| 65 | - 10 => ['couleur_theme' => '#909090'], |
|
| 66 | - ]; |
|
| 41 | + static $couleurs_spip = [ |
|
| 42 | + // Violet soutenu |
|
| 43 | + 9 => ['couleur_theme' => '#9a6ef2'], |
|
| 44 | + // Violet rosé |
|
| 45 | + 4 => ['couleur_theme' => '#c464cb'], |
|
| 46 | + // Rose interface SPIP |
|
| 47 | + 2 => ['couleur_theme' => '#F02364'], |
|
| 48 | + // Rouge |
|
| 49 | + 8 => ['couleur_theme' => '#ff4524'], |
|
| 50 | + // Orange |
|
| 51 | + 3 => ['couleur_theme' => '#c97500'], |
|
| 52 | + // Vert SPIP |
|
| 53 | + 1 => ['couleur_theme' => '#9dba00'], |
|
| 54 | + // Vert Troglo |
|
| 55 | + 7 => ['couleur_theme' => '#419a2c'], |
|
| 56 | + // Bleu-vert |
|
| 57 | + 12 => ['couleur_theme' => '#269681'], |
|
| 58 | + // Bleu pastel |
|
| 59 | + 5 => ['couleur_theme' => '#3190ae'], |
|
| 60 | + // Bleu Kermesse |
|
| 61 | + 11 => ['couleur_theme' => '#288bdd'], |
|
| 62 | + // Gris bleuté |
|
| 63 | + 6 => ['couleur_theme' => '#7d90a2'], |
|
| 64 | + // Gris |
|
| 65 | + 10 => ['couleur_theme' => '#909090'], |
|
| 66 | + ]; |
|
| 67 | 67 | |
| 68 | - if (is_numeric($choix)) { |
|
| 69 | - $c = $couleurs_spip[$choix]; |
|
| 70 | - // compat < SPIP 3.3 |
|
| 71 | - include_spip('inc/filtres_images_mini'); |
|
| 72 | - $c['couleur_foncee'] = $c['couleur_theme']; |
|
| 73 | - $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5); |
|
| 68 | + if (is_numeric($choix)) { |
|
| 69 | + $c = $couleurs_spip[$choix]; |
|
| 70 | + // compat < SPIP 3.3 |
|
| 71 | + include_spip('inc/filtres_images_mini'); |
|
| 72 | + $c['couleur_foncee'] = $c['couleur_theme']; |
|
| 73 | + $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5); |
|
| 74 | 74 | |
| 75 | - return |
|
| 76 | - 'couleur_theme=' . substr($c['couleur_theme'], 1) |
|
| 77 | - // compat < SPIP 3.3 |
|
| 78 | - . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 79 | - . '&couleur_foncee=' . substr($c['couleur_foncee'], 1); |
|
| 80 | - } else { |
|
| 81 | - if (is_array($choix)) { |
|
| 82 | - // compat < SPIP 3.3 |
|
| 83 | - $compat_spip_33 = function ($c) { |
|
| 84 | - if (!isset($c['couleur_theme'])) { |
|
| 85 | - $c['couleur_theme'] = $c['couleur_foncee']; |
|
| 86 | - unset($c['couleur_foncee']); |
|
| 87 | - unset($c['couleur_claire']); |
|
| 88 | - unset($c['couleur_lien']); |
|
| 89 | - unset($c['couleur_lien_off']); |
|
| 90 | - } |
|
| 91 | - return $c; |
|
| 92 | - }; |
|
| 93 | - if ($ajouter) { |
|
| 94 | - foreach ($choix as $c) { |
|
| 95 | - $couleurs_spip[] = $compat_spip_33($c); |
|
| 96 | - } |
|
| 75 | + return |
|
| 76 | + 'couleur_theme=' . substr($c['couleur_theme'], 1) |
|
| 77 | + // compat < SPIP 3.3 |
|
| 78 | + . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 79 | + . '&couleur_foncee=' . substr($c['couleur_foncee'], 1); |
|
| 80 | + } else { |
|
| 81 | + if (is_array($choix)) { |
|
| 82 | + // compat < SPIP 3.3 |
|
| 83 | + $compat_spip_33 = function ($c) { |
|
| 84 | + if (!isset($c['couleur_theme'])) { |
|
| 85 | + $c['couleur_theme'] = $c['couleur_foncee']; |
|
| 86 | + unset($c['couleur_foncee']); |
|
| 87 | + unset($c['couleur_claire']); |
|
| 88 | + unset($c['couleur_lien']); |
|
| 89 | + unset($c['couleur_lien_off']); |
|
| 90 | + } |
|
| 91 | + return $c; |
|
| 92 | + }; |
|
| 93 | + if ($ajouter) { |
|
| 94 | + foreach ($choix as $c) { |
|
| 95 | + $couleurs_spip[] = $compat_spip_33($c); |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | - return $couleurs_spip; |
|
| 99 | - } else { |
|
| 100 | - $choix = array_map($compat_spip_33, $choix); |
|
| 101 | - return $couleurs_spip = $choix; |
|
| 102 | - } |
|
| 103 | - } |
|
| 104 | - } |
|
| 98 | + return $couleurs_spip; |
|
| 99 | + } else { |
|
| 100 | + $choix = array_map($compat_spip_33, $choix); |
|
| 101 | + return $couleurs_spip = $choix; |
|
| 102 | + } |
|
| 103 | + } |
|
| 104 | + } |
|
| 105 | 105 | |
| 106 | - return $couleurs_spip; |
|
| 106 | + return $couleurs_spip; |
|
| 107 | 107 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/actions'); |
@@ -36,11 +36,11 @@ discard block |
||
| 36 | 36 | * - ou tableau d'information sur le squelette. |
| 37 | 37 | */ |
| 38 | 38 | function inc_iconifier_dist($objet, $id, $script, $visible = false, $flag_modif = true) { |
| 39 | - // compat avec anciens appels |
|
| 40 | - $objet = objet_type($objet); |
|
| 39 | + // compat avec anciens appels |
|
| 40 | + $objet = objet_type($objet); |
|
| 41 | 41 | |
| 42 | - return recuperer_fond( |
|
| 43 | - 'prive/objets/editer/logo', |
|
| 44 | - ['objet' => $objet, 'id_objet' => $id, 'editable' => $flag_modif] |
|
| 45 | - ); |
|
| 42 | + return recuperer_fond( |
|
| 43 | + 'prive/objets/editer/logo', |
|
| 44 | + ['objet' => $objet, 'id_objet' => $id, 'editable' => $flag_modif] |
|
| 45 | + ); |
|
| 46 | 46 | } |
@@ -11,10 +11,10 @@ discard block |
||
| 11 | 11 | \***************************************************************************/ |
| 12 | 12 | |
| 13 | 13 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 14 | - return; |
|
| 14 | + return; |
|
| 15 | 15 | } |
| 16 | 16 | if (!defined('_AUTO_SELECTION_RUBRIQUE')) { |
| 17 | - define('_AUTO_SELECTION_RUBRIQUE', false); |
|
| 17 | + define('_AUTO_SELECTION_RUBRIQUE', false); |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | |
@@ -28,39 +28,39 @@ discard block |
||
| 28 | 28 | * @return string |
| 29 | 29 | */ |
| 30 | 30 | function inc_preselectionner_parent_nouvel_objet_dist($objet, $row) { |
| 31 | - if (!_AUTO_SELECTION_RUBRIQUE) { |
|
| 32 | - return ''; |
|
| 33 | - } |
|
| 31 | + if (!_AUTO_SELECTION_RUBRIQUE) { |
|
| 32 | + return ''; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - if (!isset($row['id_rubrique'])) { |
|
| 36 | - return ''; |
|
| 37 | - } |
|
| 35 | + if (!isset($row['id_rubrique'])) { |
|
| 36 | + return ''; |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - $id_rubrique = ''; |
|
| 40 | - if ($GLOBALS['connect_id_rubrique']) { |
|
| 41 | - // si admin restreint : sa rubrique |
|
| 42 | - $id_rubrique = $GLOBALS['connect_id_rubrique'][0]; |
|
| 43 | - } elseif ( |
|
| 44 | - is_int(_AUTO_SELECTION_RUBRIQUE) |
|
| 45 | - and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . intval(_AUTO_SELECTION_RUBRIQUE)) |
|
| 46 | - ) { |
|
| 47 | - $id_rubrique = _AUTO_SELECTION_RUBRIQUE; |
|
| 48 | - } else { |
|
| 49 | - // sinon la derniere rubrique cree |
|
| 50 | - $row_rub = sql_fetsel('id_rubrique', 'spip_rubriques', '', '', 'id_rubrique DESC', '0,1'); |
|
| 51 | - $id_rubrique = $row_rub['id_rubrique']; |
|
| 52 | - } |
|
| 53 | - // si le choix ne convient pas, on cherche dans un secteur |
|
| 54 | - if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) { |
|
| 55 | - $id_rubrique = ''; |
|
| 56 | - // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises |
|
| 57 | - $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0'); |
|
| 58 | - while (!$id_rubrique and $row_rub = sql_fetch($res)) { |
|
| 59 | - if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 60 | - $id_rubrique = $row_rub['id_rubrique']; |
|
| 61 | - } |
|
| 62 | - } |
|
| 63 | - } |
|
| 39 | + $id_rubrique = ''; |
|
| 40 | + if ($GLOBALS['connect_id_rubrique']) { |
|
| 41 | + // si admin restreint : sa rubrique |
|
| 42 | + $id_rubrique = $GLOBALS['connect_id_rubrique'][0]; |
|
| 43 | + } elseif ( |
|
| 44 | + is_int(_AUTO_SELECTION_RUBRIQUE) |
|
| 45 | + and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . intval(_AUTO_SELECTION_RUBRIQUE)) |
|
| 46 | + ) { |
|
| 47 | + $id_rubrique = _AUTO_SELECTION_RUBRIQUE; |
|
| 48 | + } else { |
|
| 49 | + // sinon la derniere rubrique cree |
|
| 50 | + $row_rub = sql_fetsel('id_rubrique', 'spip_rubriques', '', '', 'id_rubrique DESC', '0,1'); |
|
| 51 | + $id_rubrique = $row_rub['id_rubrique']; |
|
| 52 | + } |
|
| 53 | + // si le choix ne convient pas, on cherche dans un secteur |
|
| 54 | + if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) { |
|
| 55 | + $id_rubrique = ''; |
|
| 56 | + // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises |
|
| 57 | + $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0'); |
|
| 58 | + while (!$id_rubrique and $row_rub = sql_fetch($res)) { |
|
| 59 | + if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 60 | + $id_rubrique = $row_rub['id_rubrique']; |
|
| 61 | + } |
|
| 62 | + } |
|
| 63 | + } |
|
| 64 | 64 | |
| 65 | - return $id_rubrique; |
|
| 65 | + return $id_rubrique; |
|
| 66 | 66 | } |
@@ -18,206 +18,206 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | 20 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 21 | - return; |
|
| 21 | + return; |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | $GLOBALS['codes_langues'] = [ |
| 25 | - 'aa' => 'Afar', |
|
| 26 | - 'ab' => 'Abkhazian', |
|
| 27 | - 'af' => 'Afrikaans', |
|
| 28 | - 'am' => 'Amharic', |
|
| 29 | - 'an' => 'Aragonés', |
|
| 30 | - 'ar' => 'عربي', |
|
| 31 | - 'as' => 'Assamese', |
|
| 32 | - 'ast' => 'asturianu', |
|
| 33 | - 'ay' => 'Aymara', |
|
| 34 | - 'az' => 'Azərbaycan dili', |
|
| 35 | - 'ba' => 'Bashkir', |
|
| 36 | - 'be' => 'Беларуская', |
|
| 37 | - 'ber_tam' => 'Tamazigh', |
|
| 38 | - 'ber_tam_tfng' => 'Tamazigh tifinagh', |
|
| 39 | - 'bg' => 'български', |
|
| 40 | - 'bh' => 'Bihari', |
|
| 41 | - 'bi' => 'Bislama', |
|
| 42 | - 'bm' => 'Bambara', |
|
| 43 | - 'bn' => 'Bengali; Bangla', |
|
| 44 | - 'bo' => 'Tibetan', |
|
| 45 | - 'br' => 'brezhoneg', |
|
| 46 | - 'bs' => 'bosanski', |
|
| 47 | - 'ca' => 'català', |
|
| 48 | - 'co' => 'corsu', |
|
| 49 | - 'cpf' => 'Kréol réyoné', |
|
| 50 | - 'cpf_dom' => 'Kreyòl', |
|
| 51 | - 'cpf_hat' => 'Kreyòl (Peyi Dayiti)', |
|
| 52 | - 'cs' => 'čeština', |
|
| 53 | - 'cy' => 'Cymraeg', # welsh, gallois |
|
| 54 | - 'da' => 'dansk', |
|
| 55 | - 'de' => 'Deutsch', |
|
| 56 | - 'dz' => 'Bhutani', |
|
| 57 | - 'el' => 'ελληνικά', |
|
| 58 | - 'en' => 'English', |
|
| 59 | - 'en_hx' => 'H4ck3R', |
|
| 60 | - 'en_sm' => 'Smurf', |
|
| 61 | - 'eo' => 'Esperanto', |
|
| 62 | - 'es' => 'Español', |
|
| 63 | - 'es_co' => 'Colombiano', |
|
| 64 | - 'es_mx_pop' => 'Mexicano a lo güey', |
|
| 65 | - 'et' => 'eesti', |
|
| 66 | - 'eu' => 'euskara', |
|
| 67 | - 'fa' => 'فارسى', |
|
| 68 | - 'ff' => 'Fulah', // peul |
|
| 69 | - 'fi' => 'suomi', |
|
| 70 | - 'fj' => 'Fiji', |
|
| 71 | - 'fo' => 'føroyskt', |
|
| 72 | - 'fon' => 'fongbè', |
|
| 73 | - 'fr' => 'français', |
|
| 74 | - 'fr_fem' => 'français féminin', |
|
| 75 | - 'fr_sc' => 'schtroumpf', |
|
| 76 | - 'fr_lpc' => 'langue parlée complétée', |
|
| 77 | - 'fr_lsf' => 'langue des signes française', |
|
| 78 | - 'fr_spl' => 'français simplifié', |
|
| 79 | - 'fr_tu' => 'français copain', |
|
| 80 | - 'fy' => 'Frisian', |
|
| 81 | - 'ga' => 'Irish', |
|
| 82 | - 'gd' => 'Scots Gaelic', |
|
| 83 | - 'gl' => 'galego', |
|
| 84 | - 'gn' => 'Guarani', |
|
| 85 | - 'grc' => 'Ἀρχαία Ἑλληνική', // grec ancien |
|
| 86 | - 'gu' => 'Gujarati', |
|
| 87 | - 'ha' => 'Hausa', |
|
| 88 | - 'hac' => 'ک-هۆرامی', //"Kurdish-Horami" |
|
| 89 | - 'hbo' => 'עברית־התנך', // hebreu classique ou biblique |
|
| 90 | - 'haz' => 'هزاره گی', |
|
| 91 | - 'he' => 'עברית', |
|
| 92 | - 'hi' => 'हिंदी', |
|
| 93 | - 'hr' => 'hrvatski', |
|
| 94 | - 'hu' => 'magyar', |
|
| 95 | - 'hy' => 'Հայերեն',// Arménien |
|
| 96 | - 'ia' => 'Interlingua', |
|
| 97 | - 'id' => 'Indonesia', |
|
| 98 | - 'ie' => 'Interlingue', |
|
| 99 | - 'ik' => 'Inupiak', |
|
| 100 | - 'is' => 'íslenska', |
|
| 101 | - 'it' => 'italiano', |
|
| 102 | - 'it_fem' => 'italiana', |
|
| 103 | - 'iu' => 'Inuktitut', |
|
| 104 | - 'ja' => '日本語', |
|
| 105 | - 'jv' => 'Javanese', |
|
| 106 | - 'ka' => 'ქართული', |
|
| 107 | - 'kk' => 'қазақ тілі', // Kazakh |
|
| 108 | - 'kl' => 'kalaallisut', |
|
| 109 | - 'km' => 'ភាសាខ្មែរ',// Khmer |
|
| 110 | - 'kn' => 'Kannada', |
|
| 111 | - 'ko' => '한국어', |
|
| 112 | - 'kok' => 'कोंकणी', |
|
| 113 | - 'ks' => 'Kashmiri', |
|
| 114 | - 'ku' => 'کوردی', |
|
| 115 | - 'ky' => 'Kirghiz', |
|
| 116 | - 'la' => 'lingua latina', |
|
| 117 | - 'lb' => 'Lëtzebuergesch', |
|
| 118 | - 'ln' => 'Lingala', |
|
| 119 | - 'lo' => 'ພາສາລາວ', # lao |
|
| 120 | - 'lt' => 'lietuvių', |
|
| 121 | - 'lu' => 'luba-katanga', |
|
| 122 | - 'lv' => 'latviešu', |
|
| 123 | - 'man' => 'mandingue', # a traduire en mandingue |
|
| 124 | - 'mfv' => 'manjak', # ISO-639-3 |
|
| 125 | - 'mg' => 'Malagasy', |
|
| 126 | - 'mi' => 'Maori', |
|
| 127 | - 'mk' => 'македонски јазик', |
|
| 128 | - 'ml' => 'Malayalam', |
|
| 129 | - 'mn' => 'Монгол хэл', |
|
| 130 | - 'mo' => 'Moldavian', |
|
| 131 | - 'mos' => 'Moré', |
|
| 132 | - 'mr' => 'मराठी', |
|
| 133 | - 'ms' => 'Bahasa Malaysia', |
|
| 134 | - 'mt' => 'Maltese', |
|
| 135 | - 'my' => 'Burmese', |
|
| 136 | - 'na' => 'Nauru', |
|
| 137 | - 'nap' => 'napulitano', |
|
| 138 | - 'ne' => 'Nepali', |
|
| 139 | - 'nqo' => "N'ko", // www.manden.org |
|
| 140 | - 'nl' => 'Nederlands', |
|
| 141 | - 'no' => 'norsk', |
|
| 142 | - 'nb' => 'norsk bokmål', |
|
| 143 | - 'nn' => 'norsk nynorsk', |
|
| 144 | - 'oc' => 'òc', |
|
| 145 | - 'oc_lnc' => 'òc lengadocian', |
|
| 146 | - 'oc_ni' => 'òc niçard', |
|
| 147 | - 'oc_ni_la' => 'òc niçard (larg)', |
|
| 148 | - 'oc_ni_mis' => 'òc nissart (mistralenc)', |
|
| 149 | - 'oc_prv' => 'òc provençau', |
|
| 150 | - 'oc_gsc' => 'òc gascon', |
|
| 151 | - 'oc_lms' => 'òc lemosin', |
|
| 152 | - 'oc_auv' => 'òc auvernhat', |
|
| 153 | - 'oc_va' => 'òc vivaroaupenc', |
|
| 154 | - 'om' => '(Afan) Oromo', |
|
| 155 | - 'or' => 'Oriya', |
|
| 156 | - 'pa' => 'Punjabi', |
|
| 157 | - 'pbb' => 'Nasa Yuwe', |
|
| 158 | - 'pl' => 'polski', |
|
| 159 | - 'prs' => 'دری', // ISO-639-3 Dari (Afghanistan) |
|
| 160 | - 'ps' => 'پښتو', |
|
| 161 | - 'pt' => 'Português', |
|
| 162 | - 'pt_br' => 'Português do Brasil', |
|
| 163 | - 'qu' => 'Quechua', |
|
| 164 | - 'rm' => 'Rhaeto-Romance', |
|
| 165 | - 'rn' => 'Kirundi', |
|
| 166 | - 'ro' => 'română', |
|
| 167 | - 'roa' => "ch'ti", |
|
| 168 | - 'ru' => 'русский', |
|
| 169 | - 'rw' => 'Kinyarwanda', |
|
| 170 | - 'sa' => 'संस्कृत', |
|
| 171 | - 'sc' => 'sardu', |
|
| 172 | - 'scn' => 'sicilianu', |
|
| 173 | - 'sd' => 'Sindhi', |
|
| 174 | - 'sg' => 'Sangho', |
|
| 175 | - 'sh' => 'srpskohrvastski', |
|
| 176 | - 'sh_latn' => 'srpskohrvastski', |
|
| 177 | - 'sh_cyrl' => 'Српскохрватски', |
|
| 178 | - 'si' => 'Sinhalese', |
|
| 179 | - 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | - 'sl' => 'slovenščina', // (Slovenia) |
|
| 181 | - 'sm' => 'Samoan', |
|
| 182 | - 'sn' => 'Shona', |
|
| 183 | - 'so' => 'Somali', |
|
| 184 | - 'sq' => 'shqip', |
|
| 185 | - 'sr' => 'српски', |
|
| 186 | - 'src' => 'sardu logudorésu', // sarde cf 'sc' |
|
| 187 | - 'sro' => 'sardu campidanésu', |
|
| 188 | - 'ss' => 'Siswati', |
|
| 189 | - 'st' => 'Sesotho', |
|
| 190 | - 'su' => 'Sundanese', |
|
| 191 | - 'sv' => 'svenska', |
|
| 192 | - 'sw' => 'Kiswahili', |
|
| 193 | - 'ta' => 'தமிழ்', // Tamil |
|
| 194 | - 'te' => 'Telugu', |
|
| 195 | - 'tg' => 'Tajik', |
|
| 196 | - 'th' => 'ไทย', |
|
| 197 | - 'ti' => 'Tigrinya', |
|
| 198 | - 'tk' => 'Turkmen', |
|
| 199 | - 'tl' => 'Tagalog', |
|
| 200 | - 'tn' => 'Setswana', |
|
| 201 | - 'to' => 'Tonga', |
|
| 202 | - 'tr' => 'Türkçe', |
|
| 203 | - 'ts' => 'Tsonga', |
|
| 204 | - 'tt' => 'Татар', |
|
| 205 | - 'tw' => 'Twi', |
|
| 206 | - 'ty' => 'reo mā`ohi', // tahitien |
|
| 207 | - 'ug' => 'Uighur', |
|
| 208 | - 'uk' => 'українська', |
|
| 209 | - 'ur' => 'ٱردو', |
|
| 210 | - 'uz' => "O'zbekcha", |
|
| 211 | - 'vi' => 'Tiếng Việt', |
|
| 212 | - 'vo' => 'Volapuk', |
|
| 213 | - 'wa' => 'walon', |
|
| 214 | - 'wo' => 'Wolof', |
|
| 215 | - 'xh' => 'Xhosa', |
|
| 216 | - 'yi' => 'Yiddish', |
|
| 217 | - 'yo' => 'Yoruba', |
|
| 218 | - 'za' => 'Zhuang', |
|
| 219 | - 'zh' => '中文', // chinois (ecriture simplifiee) |
|
| 220 | - 'zh_tw' => '台灣中文', // chinois taiwan (ecr. traditionnelle) |
|
| 221 | - 'zu' => 'Zulu' |
|
| 25 | + 'aa' => 'Afar', |
|
| 26 | + 'ab' => 'Abkhazian', |
|
| 27 | + 'af' => 'Afrikaans', |
|
| 28 | + 'am' => 'Amharic', |
|
| 29 | + 'an' => 'Aragonés', |
|
| 30 | + 'ar' => 'عربي', |
|
| 31 | + 'as' => 'Assamese', |
|
| 32 | + 'ast' => 'asturianu', |
|
| 33 | + 'ay' => 'Aymara', |
|
| 34 | + 'az' => 'Azərbaycan dili', |
|
| 35 | + 'ba' => 'Bashkir', |
|
| 36 | + 'be' => 'Беларуская', |
|
| 37 | + 'ber_tam' => 'Tamazigh', |
|
| 38 | + 'ber_tam_tfng' => 'Tamazigh tifinagh', |
|
| 39 | + 'bg' => 'български', |
|
| 40 | + 'bh' => 'Bihari', |
|
| 41 | + 'bi' => 'Bislama', |
|
| 42 | + 'bm' => 'Bambara', |
|
| 43 | + 'bn' => 'Bengali; Bangla', |
|
| 44 | + 'bo' => 'Tibetan', |
|
| 45 | + 'br' => 'brezhoneg', |
|
| 46 | + 'bs' => 'bosanski', |
|
| 47 | + 'ca' => 'català', |
|
| 48 | + 'co' => 'corsu', |
|
| 49 | + 'cpf' => 'Kréol réyoné', |
|
| 50 | + 'cpf_dom' => 'Kreyòl', |
|
| 51 | + 'cpf_hat' => 'Kreyòl (Peyi Dayiti)', |
|
| 52 | + 'cs' => 'čeština', |
|
| 53 | + 'cy' => 'Cymraeg', # welsh, gallois |
|
| 54 | + 'da' => 'dansk', |
|
| 55 | + 'de' => 'Deutsch', |
|
| 56 | + 'dz' => 'Bhutani', |
|
| 57 | + 'el' => 'ελληνικά', |
|
| 58 | + 'en' => 'English', |
|
| 59 | + 'en_hx' => 'H4ck3R', |
|
| 60 | + 'en_sm' => 'Smurf', |
|
| 61 | + 'eo' => 'Esperanto', |
|
| 62 | + 'es' => 'Español', |
|
| 63 | + 'es_co' => 'Colombiano', |
|
| 64 | + 'es_mx_pop' => 'Mexicano a lo güey', |
|
| 65 | + 'et' => 'eesti', |
|
| 66 | + 'eu' => 'euskara', |
|
| 67 | + 'fa' => 'فارسى', |
|
| 68 | + 'ff' => 'Fulah', // peul |
|
| 69 | + 'fi' => 'suomi', |
|
| 70 | + 'fj' => 'Fiji', |
|
| 71 | + 'fo' => 'føroyskt', |
|
| 72 | + 'fon' => 'fongbè', |
|
| 73 | + 'fr' => 'français', |
|
| 74 | + 'fr_fem' => 'français féminin', |
|
| 75 | + 'fr_sc' => 'schtroumpf', |
|
| 76 | + 'fr_lpc' => 'langue parlée complétée', |
|
| 77 | + 'fr_lsf' => 'langue des signes française', |
|
| 78 | + 'fr_spl' => 'français simplifié', |
|
| 79 | + 'fr_tu' => 'français copain', |
|
| 80 | + 'fy' => 'Frisian', |
|
| 81 | + 'ga' => 'Irish', |
|
| 82 | + 'gd' => 'Scots Gaelic', |
|
| 83 | + 'gl' => 'galego', |
|
| 84 | + 'gn' => 'Guarani', |
|
| 85 | + 'grc' => 'Ἀρχαία Ἑλληνική', // grec ancien |
|
| 86 | + 'gu' => 'Gujarati', |
|
| 87 | + 'ha' => 'Hausa', |
|
| 88 | + 'hac' => 'ک-هۆرامی', //"Kurdish-Horami" |
|
| 89 | + 'hbo' => 'עברית־התנך', // hebreu classique ou biblique |
|
| 90 | + 'haz' => 'هزاره گی', |
|
| 91 | + 'he' => 'עברית', |
|
| 92 | + 'hi' => 'हिंदी', |
|
| 93 | + 'hr' => 'hrvatski', |
|
| 94 | + 'hu' => 'magyar', |
|
| 95 | + 'hy' => 'Հայերեն',// Arménien |
|
| 96 | + 'ia' => 'Interlingua', |
|
| 97 | + 'id' => 'Indonesia', |
|
| 98 | + 'ie' => 'Interlingue', |
|
| 99 | + 'ik' => 'Inupiak', |
|
| 100 | + 'is' => 'íslenska', |
|
| 101 | + 'it' => 'italiano', |
|
| 102 | + 'it_fem' => 'italiana', |
|
| 103 | + 'iu' => 'Inuktitut', |
|
| 104 | + 'ja' => '日本語', |
|
| 105 | + 'jv' => 'Javanese', |
|
| 106 | + 'ka' => 'ქართული', |
|
| 107 | + 'kk' => 'қазақ тілі', // Kazakh |
|
| 108 | + 'kl' => 'kalaallisut', |
|
| 109 | + 'km' => 'ភាសាខ្មែរ',// Khmer |
|
| 110 | + 'kn' => 'Kannada', |
|
| 111 | + 'ko' => '한국어', |
|
| 112 | + 'kok' => 'कोंकणी', |
|
| 113 | + 'ks' => 'Kashmiri', |
|
| 114 | + 'ku' => 'کوردی', |
|
| 115 | + 'ky' => 'Kirghiz', |
|
| 116 | + 'la' => 'lingua latina', |
|
| 117 | + 'lb' => 'Lëtzebuergesch', |
|
| 118 | + 'ln' => 'Lingala', |
|
| 119 | + 'lo' => 'ພາສາລາວ', # lao |
|
| 120 | + 'lt' => 'lietuvių', |
|
| 121 | + 'lu' => 'luba-katanga', |
|
| 122 | + 'lv' => 'latviešu', |
|
| 123 | + 'man' => 'mandingue', # a traduire en mandingue |
|
| 124 | + 'mfv' => 'manjak', # ISO-639-3 |
|
| 125 | + 'mg' => 'Malagasy', |
|
| 126 | + 'mi' => 'Maori', |
|
| 127 | + 'mk' => 'македонски јазик', |
|
| 128 | + 'ml' => 'Malayalam', |
|
| 129 | + 'mn' => 'Монгол хэл', |
|
| 130 | + 'mo' => 'Moldavian', |
|
| 131 | + 'mos' => 'Moré', |
|
| 132 | + 'mr' => 'मराठी', |
|
| 133 | + 'ms' => 'Bahasa Malaysia', |
|
| 134 | + 'mt' => 'Maltese', |
|
| 135 | + 'my' => 'Burmese', |
|
| 136 | + 'na' => 'Nauru', |
|
| 137 | + 'nap' => 'napulitano', |
|
| 138 | + 'ne' => 'Nepali', |
|
| 139 | + 'nqo' => "N'ko", // www.manden.org |
|
| 140 | + 'nl' => 'Nederlands', |
|
| 141 | + 'no' => 'norsk', |
|
| 142 | + 'nb' => 'norsk bokmål', |
|
| 143 | + 'nn' => 'norsk nynorsk', |
|
| 144 | + 'oc' => 'òc', |
|
| 145 | + 'oc_lnc' => 'òc lengadocian', |
|
| 146 | + 'oc_ni' => 'òc niçard', |
|
| 147 | + 'oc_ni_la' => 'òc niçard (larg)', |
|
| 148 | + 'oc_ni_mis' => 'òc nissart (mistralenc)', |
|
| 149 | + 'oc_prv' => 'òc provençau', |
|
| 150 | + 'oc_gsc' => 'òc gascon', |
|
| 151 | + 'oc_lms' => 'òc lemosin', |
|
| 152 | + 'oc_auv' => 'òc auvernhat', |
|
| 153 | + 'oc_va' => 'òc vivaroaupenc', |
|
| 154 | + 'om' => '(Afan) Oromo', |
|
| 155 | + 'or' => 'Oriya', |
|
| 156 | + 'pa' => 'Punjabi', |
|
| 157 | + 'pbb' => 'Nasa Yuwe', |
|
| 158 | + 'pl' => 'polski', |
|
| 159 | + 'prs' => 'دری', // ISO-639-3 Dari (Afghanistan) |
|
| 160 | + 'ps' => 'پښتو', |
|
| 161 | + 'pt' => 'Português', |
|
| 162 | + 'pt_br' => 'Português do Brasil', |
|
| 163 | + 'qu' => 'Quechua', |
|
| 164 | + 'rm' => 'Rhaeto-Romance', |
|
| 165 | + 'rn' => 'Kirundi', |
|
| 166 | + 'ro' => 'română', |
|
| 167 | + 'roa' => "ch'ti", |
|
| 168 | + 'ru' => 'русский', |
|
| 169 | + 'rw' => 'Kinyarwanda', |
|
| 170 | + 'sa' => 'संस्कृत', |
|
| 171 | + 'sc' => 'sardu', |
|
| 172 | + 'scn' => 'sicilianu', |
|
| 173 | + 'sd' => 'Sindhi', |
|
| 174 | + 'sg' => 'Sangho', |
|
| 175 | + 'sh' => 'srpskohrvastski', |
|
| 176 | + 'sh_latn' => 'srpskohrvastski', |
|
| 177 | + 'sh_cyrl' => 'Српскохрватски', |
|
| 178 | + 'si' => 'Sinhalese', |
|
| 179 | + 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | + 'sl' => 'slovenščina', // (Slovenia) |
|
| 181 | + 'sm' => 'Samoan', |
|
| 182 | + 'sn' => 'Shona', |
|
| 183 | + 'so' => 'Somali', |
|
| 184 | + 'sq' => 'shqip', |
|
| 185 | + 'sr' => 'српски', |
|
| 186 | + 'src' => 'sardu logudorésu', // sarde cf 'sc' |
|
| 187 | + 'sro' => 'sardu campidanésu', |
|
| 188 | + 'ss' => 'Siswati', |
|
| 189 | + 'st' => 'Sesotho', |
|
| 190 | + 'su' => 'Sundanese', |
|
| 191 | + 'sv' => 'svenska', |
|
| 192 | + 'sw' => 'Kiswahili', |
|
| 193 | + 'ta' => 'தமிழ்', // Tamil |
|
| 194 | + 'te' => 'Telugu', |
|
| 195 | + 'tg' => 'Tajik', |
|
| 196 | + 'th' => 'ไทย', |
|
| 197 | + 'ti' => 'Tigrinya', |
|
| 198 | + 'tk' => 'Turkmen', |
|
| 199 | + 'tl' => 'Tagalog', |
|
| 200 | + 'tn' => 'Setswana', |
|
| 201 | + 'to' => 'Tonga', |
|
| 202 | + 'tr' => 'Türkçe', |
|
| 203 | + 'ts' => 'Tsonga', |
|
| 204 | + 'tt' => 'Татар', |
|
| 205 | + 'tw' => 'Twi', |
|
| 206 | + 'ty' => 'reo mā`ohi', // tahitien |
|
| 207 | + 'ug' => 'Uighur', |
|
| 208 | + 'uk' => 'українська', |
|
| 209 | + 'ur' => 'ٱردو', |
|
| 210 | + 'uz' => "O'zbekcha", |
|
| 211 | + 'vi' => 'Tiếng Việt', |
|
| 212 | + 'vo' => 'Volapuk', |
|
| 213 | + 'wa' => 'walon', |
|
| 214 | + 'wo' => 'Wolof', |
|
| 215 | + 'xh' => 'Xhosa', |
|
| 216 | + 'yi' => 'Yiddish', |
|
| 217 | + 'yo' => 'Yoruba', |
|
| 218 | + 'za' => 'Zhuang', |
|
| 219 | + 'zh' => '中文', // chinois (ecriture simplifiee) |
|
| 220 | + 'zh_tw' => '台灣中文', // chinois taiwan (ecr. traditionnelle) |
|
| 221 | + 'zu' => 'Zulu' |
|
| 222 | 222 | |
| 223 | 223 | ]; |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/filtres'); |
@@ -46,56 +46,56 @@ discard block |
||
| 46 | 46 | **/ |
| 47 | 47 | function inc_selectionner_dist($sel, $idom = '', $exclus = 0, $aff_racine = false, $recur = true, $do = 'aff') { |
| 48 | 48 | |
| 49 | - if ($recur) { |
|
| 50 | - $recur = mini_hier($sel); |
|
| 51 | - } else { |
|
| 52 | - $sel = 0; |
|
| 53 | - } |
|
| 54 | - |
|
| 55 | - if ($aff_racine) { |
|
| 56 | - $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
|
| 57 | - $idom3 = $idom . '_selection'; |
|
| 58 | - |
|
| 59 | - $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
|
| 60 | - |
|
| 61 | - $ondbClick = strtr( |
|
| 62 | - str_replace( |
|
| 63 | - "'", |
|
| 64 | - '’', |
|
| 65 | - str_replace( |
|
| 66 | - '"', |
|
| 67 | - '"', |
|
| 68 | - textebrut(_T('info_racine_site')) |
|
| 69 | - ) |
|
| 70 | - ), |
|
| 71 | - "\n\r", |
|
| 72 | - ' ' |
|
| 73 | - ); |
|
| 74 | - |
|
| 75 | - $js_func = $do . '_selection_titre'; |
|
| 76 | - $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
|
| 77 | - |
|
| 78 | - $aff_racine = "<div class='petit-item petite-racine item'>" |
|
| 79 | - . "<a href='#'" |
|
| 80 | - . 'onclick="' |
|
| 81 | - . $onClick |
|
| 82 | - . "\"\nondbclick=\"" |
|
| 83 | - . $ondbClick |
|
| 84 | - . $onClick |
|
| 85 | - . '">' |
|
| 86 | - . _T('info_racine_site') |
|
| 87 | - . '</a></div>'; |
|
| 88 | - } |
|
| 89 | - |
|
| 90 | - $url_init = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclus&id=0&col=1&do=$do"); |
|
| 91 | - |
|
| 92 | - $plonger = charger_fonction('plonger', 'inc'); |
|
| 93 | - $plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do); |
|
| 94 | - |
|
| 95 | - // url completee par la fonction JS onkeypress_rechercher |
|
| 96 | - $url = generer_url_ecrire('rechercher', "exclus=$exclus&rac=$idom&do=$do&type="); |
|
| 97 | - |
|
| 98 | - return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init); |
|
| 49 | + if ($recur) { |
|
| 50 | + $recur = mini_hier($sel); |
|
| 51 | + } else { |
|
| 52 | + $sel = 0; |
|
| 53 | + } |
|
| 54 | + |
|
| 55 | + if ($aff_racine) { |
|
| 56 | + $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
|
| 57 | + $idom3 = $idom . '_selection'; |
|
| 58 | + |
|
| 59 | + $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
|
| 60 | + |
|
| 61 | + $ondbClick = strtr( |
|
| 62 | + str_replace( |
|
| 63 | + "'", |
|
| 64 | + '’', |
|
| 65 | + str_replace( |
|
| 66 | + '"', |
|
| 67 | + '"', |
|
| 68 | + textebrut(_T('info_racine_site')) |
|
| 69 | + ) |
|
| 70 | + ), |
|
| 71 | + "\n\r", |
|
| 72 | + ' ' |
|
| 73 | + ); |
|
| 74 | + |
|
| 75 | + $js_func = $do . '_selection_titre'; |
|
| 76 | + $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
|
| 77 | + |
|
| 78 | + $aff_racine = "<div class='petit-item petite-racine item'>" |
|
| 79 | + . "<a href='#'" |
|
| 80 | + . 'onclick="' |
|
| 81 | + . $onClick |
|
| 82 | + . "\"\nondbclick=\"" |
|
| 83 | + . $ondbClick |
|
| 84 | + . $onClick |
|
| 85 | + . '">' |
|
| 86 | + . _T('info_racine_site') |
|
| 87 | + . '</a></div>'; |
|
| 88 | + } |
|
| 89 | + |
|
| 90 | + $url_init = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclus&id=0&col=1&do=$do"); |
|
| 91 | + |
|
| 92 | + $plonger = charger_fonction('plonger', 'inc'); |
|
| 93 | + $plonger_r = $plonger($sel, $idom, $recur, 1, $exclus, $do); |
|
| 94 | + |
|
| 95 | + // url completee par la fonction JS onkeypress_rechercher |
|
| 96 | + $url = generer_url_ecrire('rechercher', "exclus=$exclus&rac=$idom&do=$do&type="); |
|
| 97 | + |
|
| 98 | + return construire_selectionner_hierarchie($idom, $plonger_r, $aff_racine, $url, 'id_parent', $url_init); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -113,58 +113,58 @@ discard block |
||
| 113 | 113 | **/ |
| 114 | 114 | function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') { |
| 115 | 115 | |
| 116 | - $idom1 = $idom . '_champ_recherche'; |
|
| 117 | - $idom2 = $idom . '_principal'; |
|
| 118 | - $idom3 = $idom . '_selection'; |
|
| 119 | - $idom4 = $idom . '_col_1'; |
|
| 120 | - $idom5 = 'img_' . $idom4; |
|
| 121 | - $idom6 = $idom . '_fonc'; |
|
| 122 | - |
|
| 123 | - return "<div id='$idom'>" |
|
| 124 | - . "<a id='$idom6' style='visibility: hidden;'" |
|
| 125 | - . ($url_init ? "\nhref='$url_init'" : '') |
|
| 126 | - . '></a>' |
|
| 127 | - . "<div class='recherche_rapide_parent formulaire_recherche'>" |
|
| 128 | - . http_img_pack( |
|
| 129 | - 'loader.svg', |
|
| 130 | - '', |
|
| 131 | - "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'" |
|
| 132 | - ) |
|
| 133 | - . '' |
|
| 134 | - . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 135 | - // eliminer Return car il provoque la soumission (balise unique) |
|
| 136 | - // et eliminer Tab pour la navigation au clavier |
|
| 137 | - // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
|
| 138 | - // resultats retournes par la recherche |
|
| 139 | - . "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3 || k==9){return false;}\"" |
|
| 140 | - // lancer la recherche apres le filtrage ci-dessus sauf sur le tab (navigation au clavier) |
|
| 141 | - . "\nonkeyup=\"if(event.keyCode==9){return false;};return onkey_rechercher(this.value," |
|
| 142 | - // la destination de la recherche |
|
| 143 | - . "'$idom4'" |
|
| 116 | + $idom1 = $idom . '_champ_recherche'; |
|
| 117 | + $idom2 = $idom . '_principal'; |
|
| 118 | + $idom3 = $idom . '_selection'; |
|
| 119 | + $idom4 = $idom . '_col_1'; |
|
| 120 | + $idom5 = 'img_' . $idom4; |
|
| 121 | + $idom6 = $idom . '_fonc'; |
|
| 122 | + |
|
| 123 | + return "<div id='$idom'>" |
|
| 124 | + . "<a id='$idom6' style='visibility: hidden;'" |
|
| 125 | + . ($url_init ? "\nhref='$url_init'" : '') |
|
| 126 | + . '></a>' |
|
| 127 | + . "<div class='recherche_rapide_parent formulaire_recherche'>" |
|
| 128 | + . http_img_pack( |
|
| 129 | + 'loader.svg', |
|
| 130 | + '', |
|
| 131 | + "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'" |
|
| 132 | + ) |
|
| 133 | + . '' |
|
| 134 | + . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 135 | + // eliminer Return car il provoque la soumission (balise unique) |
|
| 136 | + // et eliminer Tab pour la navigation au clavier |
|
| 137 | + // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
|
| 138 | + // resultats retournes par la recherche |
|
| 139 | + . "\nonkeypress=\"k=event.keyCode;if (k==13 || k==3 || k==9){return false;}\"" |
|
| 140 | + // lancer la recherche apres le filtrage ci-dessus sauf sur le tab (navigation au clavier) |
|
| 141 | + . "\nonkeyup=\"if(event.keyCode==9){return false;};return onkey_rechercher(this.value," |
|
| 142 | + // la destination de la recherche |
|
| 143 | + . "'$idom4'" |
|
| 144 | 144 | # . "this.parentNode.parentNode.parentNode.parentNode.nextSibling.firstChild.id" |
| 145 | - . ",'" |
|
| 146 | - // l'url effectuant la recherche |
|
| 147 | - . $url |
|
| 148 | - . "'," |
|
| 149 | - // le noeud contenant un gif anime |
|
| 150 | - // . "'idom5'" |
|
| 151 | - . 'this.parentNode.previousSibling.firstChild' |
|
| 152 | - . ",'" |
|
| 153 | - // la valeur de l'attribut Name a remplir |
|
| 154 | - . $name |
|
| 155 | - . "','" |
|
| 156 | - // noeud invisible memorisant l'URL initiale (pour re-initialisation) |
|
| 157 | - . $idom6 |
|
| 158 | - . "')\"" |
|
| 159 | - . ' />' |
|
| 160 | - . "\n</div>" |
|
| 161 | - . ($racine ? "<div>$racine</div>" : '') |
|
| 162 | - . "<div id='" |
|
| 163 | - . $idom2 |
|
| 164 | - . "'><div id='$idom4'" |
|
| 165 | - . " class=''>" |
|
| 166 | - . $liste |
|
| 167 | - . "</div></div>\n<div id='$idom3'></div></div>\n"; |
|
| 145 | + . ",'" |
|
| 146 | + // l'url effectuant la recherche |
|
| 147 | + . $url |
|
| 148 | + . "'," |
|
| 149 | + // le noeud contenant un gif anime |
|
| 150 | + // . "'idom5'" |
|
| 151 | + . 'this.parentNode.previousSibling.firstChild' |
|
| 152 | + . ",'" |
|
| 153 | + // la valeur de l'attribut Name a remplir |
|
| 154 | + . $name |
|
| 155 | + . "','" |
|
| 156 | + // noeud invisible memorisant l'URL initiale (pour re-initialisation) |
|
| 157 | + . $idom6 |
|
| 158 | + . "')\"" |
|
| 159 | + . ' />' |
|
| 160 | + . "\n</div>" |
|
| 161 | + . ($racine ? "<div>$racine</div>" : '') |
|
| 162 | + . "<div id='" |
|
| 163 | + . $idom2 |
|
| 164 | + . "'><div id='$idom4'" |
|
| 165 | + . " class=''>" |
|
| 166 | + . $liste |
|
| 167 | + . "</div></div>\n<div id='$idom3'></div></div>\n"; |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -176,11 +176,11 @@ discard block |
||
| 176 | 176 | **/ |
| 177 | 177 | function mini_hier($id_rubrique) { |
| 178 | 178 | |
| 179 | - $liste = $id_rubrique; |
|
| 180 | - $id_rubrique = intval($id_rubrique); |
|
| 181 | - while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) { |
|
| 182 | - $liste = $id_rubrique . ",$liste"; |
|
| 183 | - } |
|
| 179 | + $liste = $id_rubrique; |
|
| 180 | + $id_rubrique = intval($id_rubrique); |
|
| 181 | + while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) { |
|
| 182 | + $liste = $id_rubrique . ",$liste"; |
|
| 183 | + } |
|
| 184 | 184 | |
| 185 | - return explode(',', "0,$liste"); |
|
| 185 | + return explode(',', "0,$liste"); |
|
| 186 | 186 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Mail |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | |
@@ -31,27 +31,27 @@ discard block |
||
| 31 | 31 | * - la normalisation de la dernière adresse donnée sinon |
| 32 | 32 | **/ |
| 33 | 33 | function inc_email_valide_dist($adresses) { |
| 34 | - // eviter d'injecter n'importe quoi dans preg_match |
|
| 35 | - if (!is_string($adresses)) { |
|
| 36 | - return false; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - // Si c'est un spammeur autant arreter tout de suite |
|
| 40 | - if (preg_match(",[\n\r].*(MIME|multipart|Content-),i", $adresses)) { |
|
| 41 | - spip_log("Tentative d'injection de mail : $adresses"); |
|
| 42 | - |
|
| 43 | - return false; |
|
| 44 | - } |
|
| 45 | - |
|
| 46 | - foreach (explode(',', $adresses) as $v) { |
|
| 47 | - // nettoyer certains formats |
|
| 48 | - // "Marie Toto <[email protected]>" |
|
| 49 | - $adresse = trim(preg_replace(',^[^<>"]*<([^<>"]+)>$,i', "\\1", $v)); |
|
| 50 | - // RFC 822 |
|
| 51 | - if (!preg_match('#^[^()<>@,;:\\"/[:space:]]+(@([-_0-9a-z]+\.)*[-_0-9a-z]+)$#i', $adresse)) { |
|
| 52 | - return false; |
|
| 53 | - } |
|
| 54 | - } |
|
| 55 | - |
|
| 56 | - return $adresse; |
|
| 34 | + // eviter d'injecter n'importe quoi dans preg_match |
|
| 35 | + if (!is_string($adresses)) { |
|
| 36 | + return false; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + // Si c'est un spammeur autant arreter tout de suite |
|
| 40 | + if (preg_match(",[\n\r].*(MIME|multipart|Content-),i", $adresses)) { |
|
| 41 | + spip_log("Tentative d'injection de mail : $adresses"); |
|
| 42 | + |
|
| 43 | + return false; |
|
| 44 | + } |
|
| 45 | + |
|
| 46 | + foreach (explode(',', $adresses) as $v) { |
|
| 47 | + // nettoyer certains formats |
|
| 48 | + // "Marie Toto <[email protected]>" |
|
| 49 | + $adresse = trim(preg_replace(',^[^<>"]*<([^<>"]+)>$,i', "\\1", $v)); |
|
| 50 | + // RFC 822 |
|
| 51 | + if (!preg_match('#^[^()<>@,;:\\"/[:space:]]+(@([-_0-9a-z]+\.)*[-_0-9a-z]+)$#i', $adresse)) { |
|
| 52 | + return false; |
|
| 53 | + } |
|
| 54 | + } |
|
| 55 | + |
|
| 56 | + return $adresse; |
|
| 57 | 57 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -29,51 +29,51 @@ discard block |
||
| 29 | 29 | * @return string Erreur éventuelle |
| 30 | 30 | */ |
| 31 | 31 | function inc_completer_traduction_dist($objet, $id_objet, $id_trad) { |
| 32 | - // dupliquer tous les liens sauf les auteurs : le nouvel auteur est celui qui traduit |
|
| 33 | - // cf API editer_liens |
|
| 34 | - include_spip('action/editer_liens'); |
|
| 35 | - objet_dupliquer_liens($objet, $id_trad, $id_objet, null, ['auteur']); |
|
| 36 | - $_id_table = id_table_objet($objet); |
|
| 32 | + // dupliquer tous les liens sauf les auteurs : le nouvel auteur est celui qui traduit |
|
| 33 | + // cf API editer_liens |
|
| 34 | + include_spip('action/editer_liens'); |
|
| 35 | + objet_dupliquer_liens($objet, $id_trad, $id_objet, null, ['auteur']); |
|
| 36 | + $_id_table = id_table_objet($objet); |
|
| 37 | 37 | |
| 38 | - // recuperer le logo |
|
| 39 | - $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 40 | - include_spip('action/editer_logo'); |
|
| 41 | - foreach (['on', 'off'] as $etat) { |
|
| 42 | - $logo = $chercher_logo($id_trad, $_id_table, $etat); |
|
| 43 | - if ($logo and $file = reset($logo)) { |
|
| 44 | - logo_modifier($objet, $id_objet, $etat, $file); |
|
| 45 | - } |
|
| 46 | - } |
|
| 38 | + // recuperer le logo |
|
| 39 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 40 | + include_spip('action/editer_logo'); |
|
| 41 | + foreach (['on', 'off'] as $etat) { |
|
| 42 | + $logo = $chercher_logo($id_trad, $_id_table, $etat); |
|
| 43 | + if ($logo and $file = reset($logo)) { |
|
| 44 | + logo_modifier($objet, $id_objet, $etat, $file); |
|
| 45 | + } |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - // dupliquer certains champs |
|
| 49 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 50 | - $desc = $trouver_table(table_objet_sql($objet)); |
|
| 51 | - $champs = $set = []; |
|
| 48 | + // dupliquer certains champs |
|
| 49 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 50 | + $desc = $trouver_table(table_objet_sql($objet)); |
|
| 51 | + $champs = $set = []; |
|
| 52 | 52 | |
| 53 | - // un éventuel champ 'virtuel' (redirections) |
|
| 54 | - if (!empty($desc['field']['virtuel'])) { |
|
| 55 | - $champs[] = 'virtuel'; |
|
| 56 | - } |
|
| 53 | + // un éventuel champ 'virtuel' (redirections) |
|
| 54 | + if (!empty($desc['field']['virtuel'])) { |
|
| 55 | + $champs[] = 'virtuel'; |
|
| 56 | + } |
|
| 57 | 57 | |
| 58 | - $data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad)); |
|
| 58 | + $data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad)); |
|
| 59 | 59 | |
| 60 | - foreach ($champs as $c) { |
|
| 61 | - $set[$c] = $data[$c]; |
|
| 62 | - } |
|
| 60 | + foreach ($champs as $c) { |
|
| 61 | + $set[$c] = $data[$c]; |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - /* |
|
| 64 | + /* |
|
| 65 | 65 | * Le pipeline 'pre_edition' sera appelé avec l'action 'completer_traduction'. |
| 66 | 66 | * Des plugins pourront ainsi compléter les champs d'un objet traduit lors d'une nouvelle traduction. |
| 67 | 67 | */ |
| 68 | - $err = objet_modifier_champs( |
|
| 69 | - $objet, |
|
| 70 | - $id_objet, |
|
| 71 | - [ |
|
| 72 | - 'data' => $data, |
|
| 73 | - 'action' => 'completer_traduction', |
|
| 74 | - ], |
|
| 75 | - $set |
|
| 76 | - ); |
|
| 68 | + $err = objet_modifier_champs( |
|
| 69 | + $objet, |
|
| 70 | + $id_objet, |
|
| 71 | + [ |
|
| 72 | + 'data' => $data, |
|
| 73 | + 'action' => 'completer_traduction', |
|
| 74 | + ], |
|
| 75 | + $set |
|
| 76 | + ); |
|
| 77 | 77 | |
| 78 | - return $err; |
|
| 78 | + return $err; |
|
| 79 | 79 | } |