@@ -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 | } |
@@ -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 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * @return string |
| 28 | 28 | */ |
| 29 | 29 | function autosave_clean_value($val) { |
| 30 | - return stripslashes(urldecode($val)); |
|
| 30 | + return stripslashes(urldecode($val)); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -38,58 +38,58 @@ discard block |
||
| 38 | 38 | * @return array |
| 39 | 39 | */ |
| 40 | 40 | function cvtautosave_formulaire_charger($flux) { |
| 41 | - if ( |
|
| 42 | - is_array($flux['data']) |
|
| 43 | - and isset($flux['data']['_autosave_id']) |
|
| 44 | - and $cle_autosave = $flux['data']['_autosave_id'] |
|
| 45 | - ) { |
|
| 46 | - $form = $flux['args']['form']; |
|
| 47 | - $je_suis_poste = $flux['args']['je_suis_poste']; |
|
| 41 | + if ( |
|
| 42 | + is_array($flux['data']) |
|
| 43 | + and isset($flux['data']['_autosave_id']) |
|
| 44 | + and $cle_autosave = $flux['data']['_autosave_id'] |
|
| 45 | + ) { |
|
| 46 | + $form = $flux['args']['form']; |
|
| 47 | + $je_suis_poste = $flux['args']['je_suis_poste']; |
|
| 48 | 48 | |
| 49 | - $cle_autosave = serialize($cle_autosave); |
|
| 50 | - $cle_autosave = $form . '_' . md5($cle_autosave); |
|
| 49 | + $cle_autosave = serialize($cle_autosave); |
|
| 50 | + $cle_autosave = $form . '_' . md5($cle_autosave); |
|
| 51 | 51 | |
| 52 | - // si on a un backup en session et qu'on est au premier chargement, non poste |
|
| 53 | - // on restitue les donnees |
|
| 54 | - if ( |
|
| 55 | - isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave]) |
|
| 56 | - and !$je_suis_poste |
|
| 57 | - ) { |
|
| 58 | - parse_str($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars); |
|
| 59 | - foreach ($vars as $key => $val) { |
|
| 60 | - if (isset($flux['data'][$key])) { |
|
| 61 | - $flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map( |
|
| 62 | - 'autosave_clean_value', |
|
| 63 | - $val |
|
| 64 | - )); |
|
| 65 | - } |
|
| 66 | - } |
|
| 67 | - } |
|
| 52 | + // si on a un backup en session et qu'on est au premier chargement, non poste |
|
| 53 | + // on restitue les donnees |
|
| 54 | + if ( |
|
| 55 | + isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave]) |
|
| 56 | + and !$je_suis_poste |
|
| 57 | + ) { |
|
| 58 | + parse_str($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars); |
|
| 59 | + foreach ($vars as $key => $val) { |
|
| 60 | + if (isset($flux['data'][$key])) { |
|
| 61 | + $flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map( |
|
| 62 | + 'autosave_clean_value', |
|
| 63 | + $val |
|
| 64 | + )); |
|
| 65 | + } |
|
| 66 | + } |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | - // si on est dans le charger() qui suit le traiter(), l'autosave a normalement ete vide |
|
| 70 | - // mais si il y a plusieurs sessions il peut y avoir concurrence et un retour de l'autosave |
|
| 71 | - if ($je_suis_poste and _request('autosave') === $cle_autosave and function_exists('terminer_actualiser_sessions')) { |
|
| 72 | - terminer_actualiser_sessions(); |
|
| 73 | - // et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide |
|
| 74 | - if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) { |
|
| 75 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 76 | - // en court sleep pour etre certain que la concurrence est finie |
|
| 77 | - sleep(1); |
|
| 78 | - terminer_actualiser_sessions(); |
|
| 79 | - } |
|
| 80 | - } |
|
| 69 | + // si on est dans le charger() qui suit le traiter(), l'autosave a normalement ete vide |
|
| 70 | + // mais si il y a plusieurs sessions il peut y avoir concurrence et un retour de l'autosave |
|
| 71 | + if ($je_suis_poste and _request('autosave') === $cle_autosave and function_exists('terminer_actualiser_sessions')) { |
|
| 72 | + terminer_actualiser_sessions(); |
|
| 73 | + // et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide |
|
| 74 | + if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) { |
|
| 75 | + session_set('session_autosave_' . $cle_autosave, null); |
|
| 76 | + // en court sleep pour etre certain que la concurrence est finie |
|
| 77 | + sleep(1); |
|
| 78 | + terminer_actualiser_sessions(); |
|
| 79 | + } |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * Envoyer le input hidden et le bout de js qui l'utilisera |
|
| 85 | - */ |
|
| 86 | - $flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />" |
|
| 87 | - . '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){ |
|
| 83 | + /** |
|
| 84 | + * Envoyer le input hidden et le bout de js qui l'utilisera |
|
| 85 | + */ |
|
| 86 | + $flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />" |
|
| 87 | + . '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){ |
|
| 88 | 88 | $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'] . '/"}).addClass("autosaveon"); |
| 89 | 89 | });/*]]>*/</script>'; |
| 90 | - } |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | - return $flux; |
|
| 92 | + return $flux; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -103,33 +103,33 @@ discard block |
||
| 103 | 103 | * @return array |
| 104 | 104 | */ |
| 105 | 105 | function cvtautosave_formulaire_traiter($flux) { |
| 106 | - // si on poste 'autosave' c'est qu'on n'a plus besoin de sauvegarder : |
|
| 107 | - // on elimine les donnees de la session |
|
| 108 | - if ($cle_autosave = _request('autosave')) { |
|
| 109 | - include_spip('inc/session'); |
|
| 110 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 111 | - } |
|
| 106 | + // si on poste 'autosave' c'est qu'on n'a plus besoin de sauvegarder : |
|
| 107 | + // on elimine les donnees de la session |
|
| 108 | + if ($cle_autosave = _request('autosave')) { |
|
| 109 | + include_spip('inc/session'); |
|
| 110 | + session_set('session_autosave_' . $cle_autosave, null); |
|
| 111 | + } |
|
| 112 | 112 | |
| 113 | - if (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']) { |
|
| 114 | - // delai par defaut avant purge d'un backup de form : 72H |
|
| 115 | - if (!defined('_AUTOSAVE_GB_DELAY')) { |
|
| 116 | - define('_AUTOSAVE_GB_DELAY', 72 * 3600); |
|
| 117 | - } |
|
| 118 | - $time_too_old = time() - _AUTOSAVE_GB_DELAY; |
|
| 119 | - // purger aussi toutes les vieilles autosave |
|
| 120 | - $session = $GLOBALS['visiteur_session']; |
|
| 121 | - foreach ($session as $k => $v) { |
|
| 122 | - if (strncmp($k, 'session_autosave_', 17) == 0) { |
|
| 123 | - $timestamp = 0; |
|
| 124 | - if (preg_match(',&__timestamp=(\d+)$,', $v, $m)) { |
|
| 125 | - $timestamp = intval($m[1]); |
|
| 126 | - } |
|
| 127 | - if ($timestamp < $time_too_old) { |
|
| 128 | - session_set($k, null); |
|
| 129 | - } |
|
| 130 | - } |
|
| 131 | - } |
|
| 132 | - } |
|
| 113 | + if (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']) { |
|
| 114 | + // delai par defaut avant purge d'un backup de form : 72H |
|
| 115 | + if (!defined('_AUTOSAVE_GB_DELAY')) { |
|
| 116 | + define('_AUTOSAVE_GB_DELAY', 72 * 3600); |
|
| 117 | + } |
|
| 118 | + $time_too_old = time() - _AUTOSAVE_GB_DELAY; |
|
| 119 | + // purger aussi toutes les vieilles autosave |
|
| 120 | + $session = $GLOBALS['visiteur_session']; |
|
| 121 | + foreach ($session as $k => $v) { |
|
| 122 | + if (strncmp($k, 'session_autosave_', 17) == 0) { |
|
| 123 | + $timestamp = 0; |
|
| 124 | + if (preg_match(',&__timestamp=(\d+)$,', $v, $m)) { |
|
| 125 | + $timestamp = intval($m[1]); |
|
| 126 | + } |
|
| 127 | + if ($timestamp < $time_too_old) { |
|
| 128 | + session_set($k, null); |
|
| 129 | + } |
|
| 130 | + } |
|
| 131 | + } |
|
| 132 | + } |
|
| 133 | 133 | |
| 134 | - return $flux; |
|
| 134 | + return $flux; |
|
| 135 | 135 | } |
@@ -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('base/abstract_sql'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * Pile complétée du code compilé |
| 42 | 42 | **/ |
| 43 | 43 | function balise_FORMULAIRE_ECRIRE_AUTEUR($p) { |
| 44 | - return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', ['id_auteur', 'id_article', 'email']); |
|
| 44 | + return calculer_balise_dynamique($p, 'FORMULAIRE_ECRIRE_AUTEUR', ['id_auteur', 'id_article', 'email']); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -59,44 +59,44 @@ discard block |
||
| 59 | 59 | * - chaîne vide sinon (erreur ou non affichage). |
| 60 | 60 | */ |
| 61 | 61 | function balise_FORMULAIRE_ECRIRE_AUTEUR_stat($args, $context_compil) { |
| 62 | - include_spip('inc/filtres'); |
|
| 63 | - // Pas d'id_auteur ni d'id_article ? Erreur de contexte |
|
| 64 | - $id = intval($args[1]); |
|
| 65 | - if (!$args[0] and !$id) { |
|
| 66 | - $msg = [ |
|
| 67 | - 'zbug_champ_hors_motif', |
|
| 68 | - [ |
|
| 69 | - 'champ' => 'FORMULAIRE_ECRIRE_AUTEUR', |
|
| 70 | - 'motif' => 'AUTEURS/ARTICLES' |
|
| 71 | - ] |
|
| 72 | - ]; |
|
| 62 | + include_spip('inc/filtres'); |
|
| 63 | + // Pas d'id_auteur ni d'id_article ? Erreur de contexte |
|
| 64 | + $id = intval($args[1]); |
|
| 65 | + if (!$args[0] and !$id) { |
|
| 66 | + $msg = [ |
|
| 67 | + 'zbug_champ_hors_motif', |
|
| 68 | + [ |
|
| 69 | + 'champ' => 'FORMULAIRE_ECRIRE_AUTEUR', |
|
| 70 | + 'motif' => 'AUTEURS/ARTICLES' |
|
| 71 | + ] |
|
| 72 | + ]; |
|
| 73 | 73 | |
| 74 | - erreur_squelette($msg, $context_compil); |
|
| 74 | + erreur_squelette($msg, $context_compil); |
|
| 75 | 75 | |
| 76 | - return ''; |
|
| 77 | - } |
|
| 78 | - // Si on est dans un contexte article, |
|
| 79 | - // sortir tous les mails des auteurs de l'article |
|
| 80 | - if (!$args[0] and $id) { |
|
| 81 | - $r = ''; |
|
| 82 | - $s = sql_allfetsel( |
|
| 83 | - 'email', |
|
| 84 | - 'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')', |
|
| 85 | - "A.email != '' AND L.id_objet=$id" |
|
| 86 | - ); |
|
| 87 | - foreach ($s as $row) { |
|
| 88 | - if (email_valide($row['email'])) { |
|
| 89 | - $r .= ', ' . $row['email']; |
|
| 90 | - } |
|
| 91 | - } |
|
| 92 | - $args[2] = substr($r, 2); |
|
| 93 | - } |
|
| 76 | + return ''; |
|
| 77 | + } |
|
| 78 | + // Si on est dans un contexte article, |
|
| 79 | + // sortir tous les mails des auteurs de l'article |
|
| 80 | + if (!$args[0] and $id) { |
|
| 81 | + $r = ''; |
|
| 82 | + $s = sql_allfetsel( |
|
| 83 | + 'email', |
|
| 84 | + 'spip_auteurs AS A LEFT JOIN spip_auteurs_liens AS L ON (A.id_auteur=L.id_auteur AND L.objet=\'article\')', |
|
| 85 | + "A.email != '' AND L.id_objet=$id" |
|
| 86 | + ); |
|
| 87 | + foreach ($s as $row) { |
|
| 88 | + if (email_valide($row['email'])) { |
|
| 89 | + $r .= ', ' . $row['email']; |
|
| 90 | + } |
|
| 91 | + } |
|
| 92 | + $args[2] = substr($r, 2); |
|
| 93 | + } |
|
| 94 | 94 | |
| 95 | - // On ne peut pas ecrire a un auteur dont le mail n'est pas valide |
|
| 96 | - if (!$args[2] or !email_valide($args[2])) { |
|
| 97 | - return ''; |
|
| 98 | - } |
|
| 95 | + // On ne peut pas ecrire a un auteur dont le mail n'est pas valide |
|
| 96 | + if (!$args[2] or !email_valide($args[2])) { |
|
| 97 | + return ''; |
|
| 98 | + } |
|
| 99 | 99 | |
| 100 | - // OK |
|
| 101 | - return $args; |
|
| 100 | + // OK |
|
| 101 | + return $args; |
|
| 102 | 102 | } |
@@ -11,134 +11,134 @@ |
||
| 11 | 11 | // plage invalide en iso-8859-1 mais souvent utilisee quand meme (windows) |
| 12 | 12 | // cf. http://openweb.eu.org/articles/caracteres_illegaux/ |
| 13 | 13 | // voir aussi copie de ces valeurs dans inc/charsets.php |
| 14 | - 128 => 8364, |
|
| 15 | - 129 => 129 /* ?? */, |
|
| 16 | - 130 => 8218, |
|
| 17 | - 131 => 402, |
|
| 18 | - 132 => 8222, |
|
| 19 | - 133 => 8230, |
|
| 20 | - 134 => 8224, |
|
| 21 | - 135 => 8225, |
|
| 22 | - 136 => 710, |
|
| 23 | - 137 => 8240, |
|
| 24 | - 138 => 352, |
|
| 25 | - 139 => 8249, |
|
| 26 | - 140 => 338, |
|
| 27 | - 141 => 141 /* ?? */, |
|
| 28 | - 142 => 381, |
|
| 29 | - 143 => 143 /* ?? */, |
|
| 30 | - 144 => 144 /* ?? */, |
|
| 31 | - 145 => 8216, |
|
| 32 | - 146 => 8217, |
|
| 33 | - 147 => 8220, |
|
| 34 | - 148 => 8221, |
|
| 35 | - 149 => 8226, |
|
| 36 | - 150 => 8211, |
|
| 37 | - 151 => 8212, |
|
| 38 | - 152 => 732, |
|
| 39 | - 153 => 8482, |
|
| 40 | - 154 => 353, |
|
| 41 | - 155 => 8250, |
|
| 42 | - 156 => 339, |
|
| 43 | - 157 => 157 /* ?? */, |
|
| 44 | - 158 => 382, |
|
| 45 | - 159 => 376, |
|
| 14 | + 128 => 8364, |
|
| 15 | + 129 => 129 /* ?? */, |
|
| 16 | + 130 => 8218, |
|
| 17 | + 131 => 402, |
|
| 18 | + 132 => 8222, |
|
| 19 | + 133 => 8230, |
|
| 20 | + 134 => 8224, |
|
| 21 | + 135 => 8225, |
|
| 22 | + 136 => 710, |
|
| 23 | + 137 => 8240, |
|
| 24 | + 138 => 352, |
|
| 25 | + 139 => 8249, |
|
| 26 | + 140 => 338, |
|
| 27 | + 141 => 141 /* ?? */, |
|
| 28 | + 142 => 381, |
|
| 29 | + 143 => 143 /* ?? */, |
|
| 30 | + 144 => 144 /* ?? */, |
|
| 31 | + 145 => 8216, |
|
| 32 | + 146 => 8217, |
|
| 33 | + 147 => 8220, |
|
| 34 | + 148 => 8221, |
|
| 35 | + 149 => 8226, |
|
| 36 | + 150 => 8211, |
|
| 37 | + 151 => 8212, |
|
| 38 | + 152 => 732, |
|
| 39 | + 153 => 8482, |
|
| 40 | + 154 => 353, |
|
| 41 | + 155 => 8250, |
|
| 42 | + 156 => 339, |
|
| 43 | + 157 => 157 /* ?? */, |
|
| 44 | + 158 => 382, |
|
| 45 | + 159 => 376, |
|
| 46 | 46 | |
| 47 | - 160 => 160, |
|
| 48 | - 161 => 161, |
|
| 49 | - 162 => 162, |
|
| 50 | - 163 => 163, |
|
| 51 | - 164 => 164, |
|
| 52 | - 165 => 165, |
|
| 53 | - 166 => 166, |
|
| 54 | - 167 => 167, |
|
| 55 | - 168 => 168, |
|
| 56 | - 169 => 169, |
|
| 57 | - 170 => 170, |
|
| 58 | - 171 => 171, |
|
| 59 | - 172 => 172, |
|
| 60 | - 173 => 173, |
|
| 61 | - 174 => 174, |
|
| 62 | - 175 => 175, |
|
| 63 | - 176 => 176, |
|
| 64 | - 177 => 177, |
|
| 65 | - 178 => 178, |
|
| 66 | - 179 => 179, |
|
| 67 | - 180 => 180, |
|
| 68 | - 181 => 181, |
|
| 69 | - 182 => 182, |
|
| 70 | - 183 => 183, |
|
| 71 | - 184 => 184, |
|
| 72 | - 185 => 185, |
|
| 73 | - 186 => 186, |
|
| 74 | - 187 => 187, |
|
| 75 | - 188 => 188, |
|
| 76 | - 189 => 189, |
|
| 77 | - 190 => 190, |
|
| 78 | - 191 => 191, |
|
| 79 | - 192 => 192, |
|
| 80 | - 193 => 193, |
|
| 81 | - 194 => 194, |
|
| 82 | - 195 => 195, |
|
| 83 | - 196 => 196, |
|
| 84 | - 197 => 197, |
|
| 85 | - 198 => 198, |
|
| 86 | - 199 => 199, |
|
| 87 | - 200 => 200, |
|
| 88 | - 201 => 201, |
|
| 89 | - 202 => 202, |
|
| 90 | - 203 => 203, |
|
| 91 | - 204 => 204, |
|
| 92 | - 205 => 205, |
|
| 93 | - 206 => 206, |
|
| 94 | - 207 => 207, |
|
| 95 | - 208 => 208, |
|
| 96 | - 209 => 209, |
|
| 97 | - 210 => 210, |
|
| 98 | - 211 => 211, |
|
| 99 | - 212 => 212, |
|
| 100 | - 213 => 213, |
|
| 101 | - 214 => 214, |
|
| 102 | - 215 => 215, |
|
| 103 | - 216 => 216, |
|
| 104 | - 217 => 217, |
|
| 105 | - 218 => 218, |
|
| 106 | - 219 => 219, |
|
| 107 | - 220 => 220, |
|
| 108 | - 221 => 221, |
|
| 109 | - 222 => 222, |
|
| 110 | - 223 => 223, |
|
| 111 | - 224 => 224, |
|
| 112 | - 225 => 225, |
|
| 113 | - 226 => 226, |
|
| 114 | - 227 => 227, |
|
| 115 | - 228 => 228, |
|
| 116 | - 229 => 229, |
|
| 117 | - 230 => 230, |
|
| 118 | - 231 => 231, |
|
| 119 | - 232 => 232, |
|
| 120 | - 233 => 233, |
|
| 121 | - 234 => 234, |
|
| 122 | - 235 => 235, |
|
| 123 | - 236 => 236, |
|
| 124 | - 237 => 237, |
|
| 125 | - 238 => 238, |
|
| 126 | - 239 => 239, |
|
| 127 | - 240 => 240, |
|
| 128 | - 241 => 241, |
|
| 129 | - 242 => 242, |
|
| 130 | - 243 => 243, |
|
| 131 | - 244 => 244, |
|
| 132 | - 245 => 245, |
|
| 133 | - 246 => 246, |
|
| 134 | - 247 => 247, |
|
| 135 | - 248 => 248, |
|
| 136 | - 249 => 249, |
|
| 137 | - 250 => 250, |
|
| 138 | - 251 => 251, |
|
| 139 | - 252 => 252, |
|
| 140 | - 253 => 253, |
|
| 141 | - 254 => 254, |
|
| 142 | - 255 => 255 |
|
| 47 | + 160 => 160, |
|
| 48 | + 161 => 161, |
|
| 49 | + 162 => 162, |
|
| 50 | + 163 => 163, |
|
| 51 | + 164 => 164, |
|
| 52 | + 165 => 165, |
|
| 53 | + 166 => 166, |
|
| 54 | + 167 => 167, |
|
| 55 | + 168 => 168, |
|
| 56 | + 169 => 169, |
|
| 57 | + 170 => 170, |
|
| 58 | + 171 => 171, |
|
| 59 | + 172 => 172, |
|
| 60 | + 173 => 173, |
|
| 61 | + 174 => 174, |
|
| 62 | + 175 => 175, |
|
| 63 | + 176 => 176, |
|
| 64 | + 177 => 177, |
|
| 65 | + 178 => 178, |
|
| 66 | + 179 => 179, |
|
| 67 | + 180 => 180, |
|
| 68 | + 181 => 181, |
|
| 69 | + 182 => 182, |
|
| 70 | + 183 => 183, |
|
| 71 | + 184 => 184, |
|
| 72 | + 185 => 185, |
|
| 73 | + 186 => 186, |
|
| 74 | + 187 => 187, |
|
| 75 | + 188 => 188, |
|
| 76 | + 189 => 189, |
|
| 77 | + 190 => 190, |
|
| 78 | + 191 => 191, |
|
| 79 | + 192 => 192, |
|
| 80 | + 193 => 193, |
|
| 81 | + 194 => 194, |
|
| 82 | + 195 => 195, |
|
| 83 | + 196 => 196, |
|
| 84 | + 197 => 197, |
|
| 85 | + 198 => 198, |
|
| 86 | + 199 => 199, |
|
| 87 | + 200 => 200, |
|
| 88 | + 201 => 201, |
|
| 89 | + 202 => 202, |
|
| 90 | + 203 => 203, |
|
| 91 | + 204 => 204, |
|
| 92 | + 205 => 205, |
|
| 93 | + 206 => 206, |
|
| 94 | + 207 => 207, |
|
| 95 | + 208 => 208, |
|
| 96 | + 209 => 209, |
|
| 97 | + 210 => 210, |
|
| 98 | + 211 => 211, |
|
| 99 | + 212 => 212, |
|
| 100 | + 213 => 213, |
|
| 101 | + 214 => 214, |
|
| 102 | + 215 => 215, |
|
| 103 | + 216 => 216, |
|
| 104 | + 217 => 217, |
|
| 105 | + 218 => 218, |
|
| 106 | + 219 => 219, |
|
| 107 | + 220 => 220, |
|
| 108 | + 221 => 221, |
|
| 109 | + 222 => 222, |
|
| 110 | + 223 => 223, |
|
| 111 | + 224 => 224, |
|
| 112 | + 225 => 225, |
|
| 113 | + 226 => 226, |
|
| 114 | + 227 => 227, |
|
| 115 | + 228 => 228, |
|
| 116 | + 229 => 229, |
|
| 117 | + 230 => 230, |
|
| 118 | + 231 => 231, |
|
| 119 | + 232 => 232, |
|
| 120 | + 233 => 233, |
|
| 121 | + 234 => 234, |
|
| 122 | + 235 => 235, |
|
| 123 | + 236 => 236, |
|
| 124 | + 237 => 237, |
|
| 125 | + 238 => 238, |
|
| 126 | + 239 => 239, |
|
| 127 | + 240 => 240, |
|
| 128 | + 241 => 241, |
|
| 129 | + 242 => 242, |
|
| 130 | + 243 => 243, |
|
| 131 | + 244 => 244, |
|
| 132 | + 245 => 245, |
|
| 133 | + 246 => 246, |
|
| 134 | + 247 => 247, |
|
| 135 | + 248 => 248, |
|
| 136 | + 249 => 249, |
|
| 137 | + 250 => 250, |
|
| 138 | + 251 => 251, |
|
| 139 | + 252 => 252, |
|
| 140 | + 253 => 253, |
|
| 141 | + 254 => 254, |
|
| 142 | + 255 => 255 |
|
| 143 | 143 | |
| 144 | 144 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | **/ |
| 20 | 20 | |
| 21 | 21 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 22 | - return; |
|
| 22 | + return; |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | load_charset('iso-8859-1'); |
@@ -27,61 +27,61 @@ discard block |
||
| 27 | 27 | $trans = $GLOBALS['CHARSET']['iso-8859-1']; |
| 28 | 28 | |
| 29 | 29 | $mod = [ |
| 30 | - 0xA0 => 0x00A0, |
|
| 31 | - 0xA4 => 0x00A4, |
|
| 32 | - 0xAC => 0x060C, |
|
| 33 | - 0xAD => 0x00AD, |
|
| 34 | - 0xBB => 0x061B, |
|
| 35 | - 0xBF => 0x061F, |
|
| 36 | - 0xC1 => 0x0621, |
|
| 37 | - 0xC2 => 0x0622, |
|
| 38 | - 0xC3 => 0x0623, |
|
| 39 | - 0xC4 => 0x0624, |
|
| 40 | - 0xC5 => 0x0625, |
|
| 41 | - 0xC6 => 0x0626, |
|
| 42 | - 0xC7 => 0x0627, |
|
| 43 | - 0xC8 => 0x0628, |
|
| 44 | - 0xC9 => 0x0629, |
|
| 45 | - 0xCA => 0x062A, |
|
| 46 | - 0xCB => 0x062B, |
|
| 47 | - 0xCC => 0x062C, |
|
| 48 | - 0xCD => 0x062D, |
|
| 49 | - 0xCE => 0x062E, |
|
| 50 | - 0xCF => 0x062F, |
|
| 51 | - 0xD0 => 0x0630, |
|
| 52 | - 0xD1 => 0x0631, |
|
| 53 | - 0xD2 => 0x0632, |
|
| 54 | - 0xD3 => 0x0633, |
|
| 55 | - 0xD4 => 0x0634, |
|
| 56 | - 0xD5 => 0x0635, |
|
| 57 | - 0xD6 => 0x0636, |
|
| 58 | - 0xD7 => 0x0637, |
|
| 59 | - 0xD8 => 0x0638, |
|
| 60 | - 0xD9 => 0x0639, |
|
| 61 | - 0xDA => 0x063A, |
|
| 62 | - 0xE0 => 0x0640, |
|
| 63 | - 0xE1 => 0x0641, |
|
| 64 | - 0xE2 => 0x0642, |
|
| 65 | - 0xE3 => 0x0643, |
|
| 66 | - 0xE4 => 0x0644, |
|
| 67 | - 0xE5 => 0x0645, |
|
| 68 | - 0xE6 => 0x0646, |
|
| 69 | - 0xE7 => 0x0647, |
|
| 70 | - 0xE8 => 0x0648, |
|
| 71 | - 0xE9 => 0x0649, |
|
| 72 | - 0xEA => 0x064A, |
|
| 73 | - 0xEB => 0x064B, |
|
| 74 | - 0xEC => 0x064C, |
|
| 75 | - 0xED => 0x064D, |
|
| 76 | - 0xEE => 0x064E, |
|
| 77 | - 0xEF => 0x064F, |
|
| 78 | - 0xF0 => 0x0650, |
|
| 79 | - 0xF1 => 0x0651, |
|
| 80 | - 0xF2 => 0x0652 |
|
| 30 | + 0xA0 => 0x00A0, |
|
| 31 | + 0xA4 => 0x00A4, |
|
| 32 | + 0xAC => 0x060C, |
|
| 33 | + 0xAD => 0x00AD, |
|
| 34 | + 0xBB => 0x061B, |
|
| 35 | + 0xBF => 0x061F, |
|
| 36 | + 0xC1 => 0x0621, |
|
| 37 | + 0xC2 => 0x0622, |
|
| 38 | + 0xC3 => 0x0623, |
|
| 39 | + 0xC4 => 0x0624, |
|
| 40 | + 0xC5 => 0x0625, |
|
| 41 | + 0xC6 => 0x0626, |
|
| 42 | + 0xC7 => 0x0627, |
|
| 43 | + 0xC8 => 0x0628, |
|
| 44 | + 0xC9 => 0x0629, |
|
| 45 | + 0xCA => 0x062A, |
|
| 46 | + 0xCB => 0x062B, |
|
| 47 | + 0xCC => 0x062C, |
|
| 48 | + 0xCD => 0x062D, |
|
| 49 | + 0xCE => 0x062E, |
|
| 50 | + 0xCF => 0x062F, |
|
| 51 | + 0xD0 => 0x0630, |
|
| 52 | + 0xD1 => 0x0631, |
|
| 53 | + 0xD2 => 0x0632, |
|
| 54 | + 0xD3 => 0x0633, |
|
| 55 | + 0xD4 => 0x0634, |
|
| 56 | + 0xD5 => 0x0635, |
|
| 57 | + 0xD6 => 0x0636, |
|
| 58 | + 0xD7 => 0x0637, |
|
| 59 | + 0xD8 => 0x0638, |
|
| 60 | + 0xD9 => 0x0639, |
|
| 61 | + 0xDA => 0x063A, |
|
| 62 | + 0xE0 => 0x0640, |
|
| 63 | + 0xE1 => 0x0641, |
|
| 64 | + 0xE2 => 0x0642, |
|
| 65 | + 0xE3 => 0x0643, |
|
| 66 | + 0xE4 => 0x0644, |
|
| 67 | + 0xE5 => 0x0645, |
|
| 68 | + 0xE6 => 0x0646, |
|
| 69 | + 0xE7 => 0x0647, |
|
| 70 | + 0xE8 => 0x0648, |
|
| 71 | + 0xE9 => 0x0649, |
|
| 72 | + 0xEA => 0x064A, |
|
| 73 | + 0xEB => 0x064B, |
|
| 74 | + 0xEC => 0x064C, |
|
| 75 | + 0xED => 0x064D, |
|
| 76 | + 0xEE => 0x064E, |
|
| 77 | + 0xEF => 0x064F, |
|
| 78 | + 0xF0 => 0x0650, |
|
| 79 | + 0xF1 => 0x0651, |
|
| 80 | + 0xF2 => 0x0652 |
|
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | 83 | foreach ($mod as $num => $val) { |
| 84 | - $trans[$num] = $val; |
|
| 84 | + $trans[$num] = $val; |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $GLOBALS['CHARSET']['iso-8859-6'] = $trans; |