@@ -10,127 +10,127 @@ |
||
| 10 | 10 | **/ |
| 11 | 11 | |
| 12 | 12 | $GLOBALS['CHARSET']['cp1250'] = [ |
| 13 | - 0x80 => 0x20AC, |
|
| 14 | - 0x82 => 0x201A, |
|
| 15 | - 0x84 => 0x201E, |
|
| 16 | - 0x85 => 0x2026, |
|
| 17 | - 0x86 => 0x2020, |
|
| 18 | - 0x87 => 0x2021, |
|
| 19 | - 0x89 => 0x2030, |
|
| 20 | - 0x8A => 0x0160, |
|
| 21 | - 0x8B => 0x2039, |
|
| 22 | - 0x8C => 0x015A, |
|
| 23 | - 0x8D => 0x0164, |
|
| 24 | - 0x8E => 0x017D, |
|
| 25 | - 0x8F => 0x0179, |
|
| 26 | - 0x91 => 0x2018, |
|
| 27 | - 0x92 => 0x2019, |
|
| 28 | - 0x93 => 0x201C, |
|
| 29 | - 0x94 => 0x201D, |
|
| 30 | - 0x95 => 0x2022, |
|
| 31 | - 0x96 => 0x2013, |
|
| 32 | - 0x97 => 0x2014, |
|
| 33 | - 0x99 => 0x2122, |
|
| 34 | - 0x9A => 0x0161, |
|
| 35 | - 0x9B => 0x203A, |
|
| 36 | - 0x9C => 0x015B, |
|
| 37 | - 0x9D => 0x0165, |
|
| 38 | - 0x9E => 0x017E, |
|
| 39 | - 0x9F => 0x017A, |
|
| 40 | - 0xA0 => 0x00A0, |
|
| 41 | - 0xA1 => 0x02C7, |
|
| 42 | - 0xA2 => 0x02D8, |
|
| 43 | - 0xA3 => 0x0141, |
|
| 44 | - 0xA4 => 0x00A4, |
|
| 45 | - 0xA5 => 0x0104, |
|
| 46 | - 0xA6 => 0x00A6, |
|
| 47 | - 0xA7 => 0x00A7, |
|
| 48 | - 0xA8 => 0x00A8, |
|
| 49 | - 0xA9 => 0x00A9, |
|
| 50 | - 0xAA => 0x015E, |
|
| 51 | - 0xAB => 0x00AB, |
|
| 52 | - 0xAC => 0x00AC, |
|
| 53 | - 0xAD => 0x00AD, |
|
| 54 | - 0xAE => 0x00AE, |
|
| 55 | - 0xAF => 0x017B, |
|
| 56 | - 0xB0 => 0x00B0, |
|
| 57 | - 0xB1 => 0x00B1, |
|
| 58 | - 0xB2 => 0x02DB, |
|
| 59 | - 0xB3 => 0x0142, |
|
| 60 | - 0xB4 => 0x00B4, |
|
| 61 | - 0xB5 => 0x00B5, |
|
| 62 | - 0xB6 => 0x00B6, |
|
| 63 | - 0xB7 => 0x00B7, |
|
| 64 | - 0xB8 => 0x00B8, |
|
| 65 | - 0xB9 => 0x0105, |
|
| 66 | - 0xBA => 0x015F, |
|
| 67 | - 0xBB => 0x00BB, |
|
| 68 | - 0xBC => 0x013D, |
|
| 69 | - 0xBD => 0x02DD, |
|
| 70 | - 0xBE => 0x013E, |
|
| 71 | - 0xBF => 0x017C, |
|
| 72 | - 0xC0 => 0x0154, |
|
| 73 | - 0xC1 => 0x00C1, |
|
| 74 | - 0xC2 => 0x00C2, |
|
| 75 | - 0xC3 => 0x0102, |
|
| 76 | - 0xC4 => 0x00C4, |
|
| 77 | - 0xC5 => 0x0139, |
|
| 78 | - 0xC6 => 0x0106, |
|
| 79 | - 0xC7 => 0x00C7, |
|
| 80 | - 0xC8 => 0x010C, |
|
| 81 | - 0xC9 => 0x00C9, |
|
| 82 | - 0xCA => 0x0118, |
|
| 83 | - 0xCB => 0x00CB, |
|
| 84 | - 0xCC => 0x011A, |
|
| 85 | - 0xCD => 0x00CD, |
|
| 86 | - 0xCE => 0x00CE, |
|
| 87 | - 0xCF => 0x010E, |
|
| 88 | - 0xD0 => 0x0110, |
|
| 89 | - 0xD1 => 0x0143, |
|
| 90 | - 0xD2 => 0x0147, |
|
| 91 | - 0xD3 => 0x00D3, |
|
| 92 | - 0xD4 => 0x00D4, |
|
| 93 | - 0xD5 => 0x0150, |
|
| 94 | - 0xD6 => 0x00D6, |
|
| 95 | - 0xD7 => 0x00D7, |
|
| 96 | - 0xD8 => 0x0158, |
|
| 97 | - 0xD9 => 0x016E, |
|
| 98 | - 0xDA => 0x00DA, |
|
| 99 | - 0xDB => 0x0170, |
|
| 100 | - 0xDC => 0x00DC, |
|
| 101 | - 0xDD => 0x00DD, |
|
| 102 | - 0xDE => 0x0162, |
|
| 103 | - 0xDF => 0x00DF, |
|
| 104 | - 0xE0 => 0x0155, |
|
| 105 | - 0xE1 => 0x00E1, |
|
| 106 | - 0xE2 => 0x00E2, |
|
| 107 | - 0xE3 => 0x0103, |
|
| 108 | - 0xE4 => 0x00E4, |
|
| 109 | - 0xE5 => 0x013A, |
|
| 110 | - 0xE6 => 0x0107, |
|
| 111 | - 0xE7 => 0x00E7, |
|
| 112 | - 0xE8 => 0x010D, |
|
| 113 | - 0xE9 => 0x00E9, |
|
| 114 | - 0xEA => 0x0119, |
|
| 115 | - 0xEB => 0x00EB, |
|
| 116 | - 0xEC => 0x011B, |
|
| 117 | - 0xED => 0x00ED, |
|
| 118 | - 0xEE => 0x00EE, |
|
| 119 | - 0xEF => 0x010F, |
|
| 120 | - 0xF0 => 0x0111, |
|
| 121 | - 0xF1 => 0x0144, |
|
| 122 | - 0xF2 => 0x0148, |
|
| 123 | - 0xF3 => 0x00F3, |
|
| 124 | - 0xF4 => 0x00F4, |
|
| 125 | - 0xF5 => 0x0151, |
|
| 126 | - 0xF6 => 0x00F6, |
|
| 127 | - 0xF7 => 0x00F7, |
|
| 128 | - 0xF8 => 0x0159, |
|
| 129 | - 0xF9 => 0x016F, |
|
| 130 | - 0xFA => 0x00FA, |
|
| 131 | - 0xFB => 0x0171, |
|
| 132 | - 0xFC => 0x00FC, |
|
| 133 | - 0xFD => 0x00FD, |
|
| 134 | - 0xFE => 0x0163, |
|
| 135 | - 0xFF => 0x02D9 |
|
| 13 | + 0x80 => 0x20AC, |
|
| 14 | + 0x82 => 0x201A, |
|
| 15 | + 0x84 => 0x201E, |
|
| 16 | + 0x85 => 0x2026, |
|
| 17 | + 0x86 => 0x2020, |
|
| 18 | + 0x87 => 0x2021, |
|
| 19 | + 0x89 => 0x2030, |
|
| 20 | + 0x8A => 0x0160, |
|
| 21 | + 0x8B => 0x2039, |
|
| 22 | + 0x8C => 0x015A, |
|
| 23 | + 0x8D => 0x0164, |
|
| 24 | + 0x8E => 0x017D, |
|
| 25 | + 0x8F => 0x0179, |
|
| 26 | + 0x91 => 0x2018, |
|
| 27 | + 0x92 => 0x2019, |
|
| 28 | + 0x93 => 0x201C, |
|
| 29 | + 0x94 => 0x201D, |
|
| 30 | + 0x95 => 0x2022, |
|
| 31 | + 0x96 => 0x2013, |
|
| 32 | + 0x97 => 0x2014, |
|
| 33 | + 0x99 => 0x2122, |
|
| 34 | + 0x9A => 0x0161, |
|
| 35 | + 0x9B => 0x203A, |
|
| 36 | + 0x9C => 0x015B, |
|
| 37 | + 0x9D => 0x0165, |
|
| 38 | + 0x9E => 0x017E, |
|
| 39 | + 0x9F => 0x017A, |
|
| 40 | + 0xA0 => 0x00A0, |
|
| 41 | + 0xA1 => 0x02C7, |
|
| 42 | + 0xA2 => 0x02D8, |
|
| 43 | + 0xA3 => 0x0141, |
|
| 44 | + 0xA4 => 0x00A4, |
|
| 45 | + 0xA5 => 0x0104, |
|
| 46 | + 0xA6 => 0x00A6, |
|
| 47 | + 0xA7 => 0x00A7, |
|
| 48 | + 0xA8 => 0x00A8, |
|
| 49 | + 0xA9 => 0x00A9, |
|
| 50 | + 0xAA => 0x015E, |
|
| 51 | + 0xAB => 0x00AB, |
|
| 52 | + 0xAC => 0x00AC, |
|
| 53 | + 0xAD => 0x00AD, |
|
| 54 | + 0xAE => 0x00AE, |
|
| 55 | + 0xAF => 0x017B, |
|
| 56 | + 0xB0 => 0x00B0, |
|
| 57 | + 0xB1 => 0x00B1, |
|
| 58 | + 0xB2 => 0x02DB, |
|
| 59 | + 0xB3 => 0x0142, |
|
| 60 | + 0xB4 => 0x00B4, |
|
| 61 | + 0xB5 => 0x00B5, |
|
| 62 | + 0xB6 => 0x00B6, |
|
| 63 | + 0xB7 => 0x00B7, |
|
| 64 | + 0xB8 => 0x00B8, |
|
| 65 | + 0xB9 => 0x0105, |
|
| 66 | + 0xBA => 0x015F, |
|
| 67 | + 0xBB => 0x00BB, |
|
| 68 | + 0xBC => 0x013D, |
|
| 69 | + 0xBD => 0x02DD, |
|
| 70 | + 0xBE => 0x013E, |
|
| 71 | + 0xBF => 0x017C, |
|
| 72 | + 0xC0 => 0x0154, |
|
| 73 | + 0xC1 => 0x00C1, |
|
| 74 | + 0xC2 => 0x00C2, |
|
| 75 | + 0xC3 => 0x0102, |
|
| 76 | + 0xC4 => 0x00C4, |
|
| 77 | + 0xC5 => 0x0139, |
|
| 78 | + 0xC6 => 0x0106, |
|
| 79 | + 0xC7 => 0x00C7, |
|
| 80 | + 0xC8 => 0x010C, |
|
| 81 | + 0xC9 => 0x00C9, |
|
| 82 | + 0xCA => 0x0118, |
|
| 83 | + 0xCB => 0x00CB, |
|
| 84 | + 0xCC => 0x011A, |
|
| 85 | + 0xCD => 0x00CD, |
|
| 86 | + 0xCE => 0x00CE, |
|
| 87 | + 0xCF => 0x010E, |
|
| 88 | + 0xD0 => 0x0110, |
|
| 89 | + 0xD1 => 0x0143, |
|
| 90 | + 0xD2 => 0x0147, |
|
| 91 | + 0xD3 => 0x00D3, |
|
| 92 | + 0xD4 => 0x00D4, |
|
| 93 | + 0xD5 => 0x0150, |
|
| 94 | + 0xD6 => 0x00D6, |
|
| 95 | + 0xD7 => 0x00D7, |
|
| 96 | + 0xD8 => 0x0158, |
|
| 97 | + 0xD9 => 0x016E, |
|
| 98 | + 0xDA => 0x00DA, |
|
| 99 | + 0xDB => 0x0170, |
|
| 100 | + 0xDC => 0x00DC, |
|
| 101 | + 0xDD => 0x00DD, |
|
| 102 | + 0xDE => 0x0162, |
|
| 103 | + 0xDF => 0x00DF, |
|
| 104 | + 0xE0 => 0x0155, |
|
| 105 | + 0xE1 => 0x00E1, |
|
| 106 | + 0xE2 => 0x00E2, |
|
| 107 | + 0xE3 => 0x0103, |
|
| 108 | + 0xE4 => 0x00E4, |
|
| 109 | + 0xE5 => 0x013A, |
|
| 110 | + 0xE6 => 0x0107, |
|
| 111 | + 0xE7 => 0x00E7, |
|
| 112 | + 0xE8 => 0x010D, |
|
| 113 | + 0xE9 => 0x00E9, |
|
| 114 | + 0xEA => 0x0119, |
|
| 115 | + 0xEB => 0x00EB, |
|
| 116 | + 0xEC => 0x011B, |
|
| 117 | + 0xED => 0x00ED, |
|
| 118 | + 0xEE => 0x00EE, |
|
| 119 | + 0xEF => 0x010F, |
|
| 120 | + 0xF0 => 0x0111, |
|
| 121 | + 0xF1 => 0x0144, |
|
| 122 | + 0xF2 => 0x0148, |
|
| 123 | + 0xF3 => 0x00F3, |
|
| 124 | + 0xF4 => 0x00F4, |
|
| 125 | + 0xF5 => 0x0151, |
|
| 126 | + 0xF6 => 0x00F6, |
|
| 127 | + 0xF7 => 0x00F7, |
|
| 128 | + 0xF8 => 0x0159, |
|
| 129 | + 0xF9 => 0x016F, |
|
| 130 | + 0xFA => 0x00FA, |
|
| 131 | + 0xFB => 0x0171, |
|
| 132 | + 0xFC => 0x00FC, |
|
| 133 | + 0xFD => 0x00FD, |
|
| 134 | + 0xFE => 0x0163, |
|
| 135 | + 0xFF => 0x02D9 |
|
| 136 | 136 | ]; |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 10 | - return; |
|
| 10 | + return; |
|
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | include_spip('inc/actions'); |
@@ -21,23 +21,23 @@ discard block |
||
| 21 | 21 | * @uses ajax_retour() |
| 22 | 22 | */ |
| 23 | 23 | function exec_info_plugin_dist() { |
| 24 | - if (!autoriser('configurer', '_plugins')) { |
|
| 25 | - include_spip('inc/minipres'); |
|
| 26 | - echo minipres(); |
|
| 27 | - } else { |
|
| 28 | - $plug = _DIR_RACINE . htmlspecialchars(_request('plugin')); |
|
| 29 | - $get_infos = charger_fonction('get_infos', 'plugins'); |
|
| 30 | - $dir = ''; |
|
| 31 | - if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0) { |
|
| 32 | - $dir = _DIR_PLUGINS; |
|
| 33 | - } elseif (strncmp($plug, _DIR_PLUGINS_DIST, strlen(_DIR_PLUGINS_DIST)) == 0) { |
|
| 34 | - $dir = _DIR_PLUGINS_DIST; |
|
| 35 | - } |
|
| 36 | - if ($dir) { |
|
| 37 | - $plug = substr($plug, strlen($dir)); |
|
| 38 | - } |
|
| 39 | - $info = $get_infos($plug, false, $dir); |
|
| 40 | - $afficher_plugin = charger_fonction('afficher_plugin', 'plugins'); |
|
| 41 | - ajax_retour(affiche_bloc_plugin($plug, $info, $dir)); |
|
| 42 | - } |
|
| 24 | + if (!autoriser('configurer', '_plugins')) { |
|
| 25 | + include_spip('inc/minipres'); |
|
| 26 | + echo minipres(); |
|
| 27 | + } else { |
|
| 28 | + $plug = _DIR_RACINE . htmlspecialchars(_request('plugin')); |
|
| 29 | + $get_infos = charger_fonction('get_infos', 'plugins'); |
|
| 30 | + $dir = ''; |
|
| 31 | + if (strncmp($plug, _DIR_PLUGINS, strlen(_DIR_PLUGINS)) == 0) { |
|
| 32 | + $dir = _DIR_PLUGINS; |
|
| 33 | + } elseif (strncmp($plug, _DIR_PLUGINS_DIST, strlen(_DIR_PLUGINS_DIST)) == 0) { |
|
| 34 | + $dir = _DIR_PLUGINS_DIST; |
|
| 35 | + } |
|
| 36 | + if ($dir) { |
|
| 37 | + $plug = substr($plug, strlen($dir)); |
|
| 38 | + } |
|
| 39 | + $info = $get_infos($plug, false, $dir); |
|
| 40 | + $afficher_plugin = charger_fonction('afficher_plugin', 'plugins'); |
|
| 41 | + ajax_retour(affiche_bloc_plugin($plug, $info, $dir)); |
|
| 42 | + } |
|
| 43 | 43 | } |
@@ -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,23 +27,23 @@ discard block |
||
| 27 | 27 | * @uses ajax_retour() |
| 28 | 28 | **/ |
| 29 | 29 | function exec_plonger_dist() { |
| 30 | - include_spip('inc/actions'); |
|
| 30 | + include_spip('inc/actions'); |
|
| 31 | 31 | |
| 32 | - $rac = preg_replace(',[^\w\,/#&;-]+,', ' ', _request('rac')); |
|
| 33 | - $id = intval(_request('id')); |
|
| 34 | - $exclus = intval(_request('exclus')); |
|
| 35 | - $col = intval(_request('col')); |
|
| 36 | - $do = _request('do'); |
|
| 37 | - if (preg_match('/^\w*$/', $do)) { |
|
| 38 | - if (!$do) { |
|
| 39 | - $do = 'aff'; |
|
| 40 | - } |
|
| 32 | + $rac = preg_replace(',[^\w\,/#&;-]+,', ' ', _request('rac')); |
|
| 33 | + $id = intval(_request('id')); |
|
| 34 | + $exclus = intval(_request('exclus')); |
|
| 35 | + $col = intval(_request('col')); |
|
| 36 | + $do = _request('do'); |
|
| 37 | + if (preg_match('/^\w*$/', $do)) { |
|
| 38 | + if (!$do) { |
|
| 39 | + $do = 'aff'; |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - $plonger = charger_fonction('plonger', 'inc'); |
|
| 43 | - $r = $plonger($id, spip_htmlentities($rac), [], $col, $exclus, $do); |
|
| 44 | - } else { |
|
| 45 | - $r = ''; |
|
| 46 | - } |
|
| 42 | + $plonger = charger_fonction('plonger', 'inc'); |
|
| 43 | + $r = $plonger($id, spip_htmlentities($rac), [], $col, $exclus, $do); |
|
| 44 | + } else { |
|
| 45 | + $r = ''; |
|
| 46 | + } |
|
| 47 | 47 | |
| 48 | - ajax_retour($r); |
|
| 48 | + ajax_retour($r); |
|
| 49 | 49 | } |
@@ -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/presentation'); |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @return string Code HTML |
| 33 | 33 | **/ |
| 34 | 34 | function exec_puce_statut_dist() { |
| 35 | - exec_puce_statut_args(_request('id'), _request('type')); |
|
| 35 | + exec_puce_statut_args(_request('id'), _request('type')); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -52,26 +52,26 @@ discard block |
||
| 52 | 52 | * @return string Code HTML |
| 53 | 53 | **/ |
| 54 | 54 | function exec_puce_statut_args($id, $type) { |
| 55 | - $id = intval($id); |
|
| 56 | - if ( |
|
| 57 | - $table_objet_sql = table_objet_sql($type) |
|
| 58 | - and $d = lister_tables_objets_sql($table_objet_sql) |
|
| 59 | - and isset($d['statut_textes_instituer']) |
|
| 60 | - and $d['statut_textes_instituer'] |
|
| 61 | - ) { |
|
| 62 | - $prim = id_table_objet($type); |
|
| 63 | - if (isset($d['field']['id_rubrique'])) { |
|
| 64 | - $select = 'id_rubrique,statut'; |
|
| 65 | - } else { |
|
| 66 | - $select = '0 as id_rubrique,statut'; |
|
| 67 | - } |
|
| 68 | - $r = sql_fetsel($select, $table_objet_sql, "$prim=$id"); |
|
| 69 | - $statut = $r['statut']; |
|
| 70 | - $id_rubrique = $r['id_rubrique']; |
|
| 71 | - } else { |
|
| 72 | - $id_rubrique = $id; |
|
| 73 | - $statut = 'prop'; // arbitraire |
|
| 74 | - } |
|
| 75 | - $puce_statut = charger_fonction('puce_statut', 'inc'); |
|
| 76 | - ajax_retour($puce_statut($id, $statut, $id_rubrique, $type, true)); |
|
| 55 | + $id = intval($id); |
|
| 56 | + if ( |
|
| 57 | + $table_objet_sql = table_objet_sql($type) |
|
| 58 | + and $d = lister_tables_objets_sql($table_objet_sql) |
|
| 59 | + and isset($d['statut_textes_instituer']) |
|
| 60 | + and $d['statut_textes_instituer'] |
|
| 61 | + ) { |
|
| 62 | + $prim = id_table_objet($type); |
|
| 63 | + if (isset($d['field']['id_rubrique'])) { |
|
| 64 | + $select = 'id_rubrique,statut'; |
|
| 65 | + } else { |
|
| 66 | + $select = '0 as id_rubrique,statut'; |
|
| 67 | + } |
|
| 68 | + $r = sql_fetsel($select, $table_objet_sql, "$prim=$id"); |
|
| 69 | + $statut = $r['statut']; |
|
| 70 | + $id_rubrique = $r['id_rubrique']; |
|
| 71 | + } else { |
|
| 72 | + $id_rubrique = $id; |
|
| 73 | + $statut = 'prop'; // arbitraire |
|
| 74 | + } |
|
| 75 | + $puce_statut = charger_fonction('puce_statut', 'inc'); |
|
| 76 | + ajax_retour($puce_statut($id, $statut, $id_rubrique, $type, true)); |
|
| 77 | 77 | } |
@@ -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/minipres'); |
@@ -42,27 +42,27 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | **/ |
| 44 | 44 | function exec_install_dist() { |
| 45 | - $etape = _request('etape'); |
|
| 46 | - $deja = (_FILE_CONNECT and analyse_fichier_connection(_FILE_CONNECT)); |
|
| 45 | + $etape = _request('etape'); |
|
| 46 | + $deja = (_FILE_CONNECT and analyse_fichier_connection(_FILE_CONNECT)); |
|
| 47 | 47 | |
| 48 | - // Si deja installe, on n'a plus le droit qu'a l'etape chmod |
|
| 49 | - // pour chgt post-install ou aux etapes supplementaires |
|
| 50 | - // de declaration de base externes. |
|
| 51 | - // Mais alors il faut authentifier car ecrire/index.php l'a omis |
|
| 48 | + // Si deja installe, on n'a plus le droit qu'a l'etape chmod |
|
| 49 | + // pour chgt post-install ou aux etapes supplementaires |
|
| 50 | + // de declaration de base externes. |
|
| 51 | + // Mais alors il faut authentifier car ecrire/index.php l'a omis |
|
| 52 | 52 | |
| 53 | - if ($deja and in_array($etape, ['chmod', 'sup1', 'sup2'])) { |
|
| 54 | - $auth = charger_fonction('auth', 'inc'); |
|
| 55 | - if (!$auth()) { |
|
| 56 | - verifier_visiteur(); |
|
| 57 | - $deja = (!autoriser('configurer')); |
|
| 58 | - } |
|
| 59 | - } |
|
| 60 | - if ($deja) { |
|
| 61 | - // Rien a faire ici |
|
| 62 | - echo minipres(); |
|
| 63 | - } else { |
|
| 64 | - include_spip('base/create'); |
|
| 65 | - $fonc = charger_fonction("etape_$etape", 'install'); |
|
| 66 | - $fonc(); |
|
| 67 | - } |
|
| 53 | + if ($deja and in_array($etape, ['chmod', 'sup1', 'sup2'])) { |
|
| 54 | + $auth = charger_fonction('auth', 'inc'); |
|
| 55 | + if (!$auth()) { |
|
| 56 | + verifier_visiteur(); |
|
| 57 | + $deja = (!autoriser('configurer')); |
|
| 58 | + } |
|
| 59 | + } |
|
| 60 | + if ($deja) { |
|
| 61 | + // Rien a faire ici |
|
| 62 | + echo minipres(); |
|
| 63 | + } else { |
|
| 64 | + include_spip('base/create'); |
|
| 65 | + $fonc = charger_fonction("etape_$etape", 'install'); |
|
| 66 | + $fonc(); |
|
| 67 | + } |
|
| 68 | 68 | } |
@@ -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'); |
@@ -30,70 +30,70 @@ discard block |
||
| 30 | 30 | **/ |
| 31 | 31 | function exec_upgrade_dist() { |
| 32 | 32 | |
| 33 | - if (!_FILE_CONNECT) { |
|
| 34 | - redirige_url_ecrire('install'); |
|
| 35 | - } |
|
| 33 | + if (!_FILE_CONNECT) { |
|
| 34 | + redirige_url_ecrire('install'); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - // Si reinstallation necessaire, message ad hoc |
|
| 38 | - if (_request('reinstall') == 'oui') { |
|
| 39 | - include_spip('inc/minipres'); |
|
| 40 | - $r = minipres( |
|
| 41 | - _T('titre_page_upgrade'), |
|
| 42 | - '<p><b>' |
|
| 43 | - . _T('texte_nouvelle_version_spip_1') |
|
| 44 | - . '</b><p> ' |
|
| 45 | - . _T( |
|
| 46 | - 'texte_nouvelle_version_spip_2', |
|
| 47 | - ['connect' => '<tt>' . _FILE_CONNECT . '</tt>'] |
|
| 48 | - ) |
|
| 49 | - . generer_form_ecrire( |
|
| 50 | - 'upgrade', |
|
| 51 | - "<input type='hidden' name='reinstall' value='non' />", |
|
| 52 | - '', |
|
| 53 | - _T('bouton_relancer_installation') |
|
| 54 | - ) |
|
| 55 | - ); |
|
| 56 | - echo $r; |
|
| 57 | - } elseif (_request('fin')) { |
|
| 58 | - include_spip('inc/plugin'); |
|
| 59 | - actualise_plugins_actifs(); |
|
| 60 | - include_spip('inc/headers'); |
|
| 61 | - $res = generer_url_ecrire('admin_plugin', 'var_mode=recalcul'); |
|
| 62 | - echo redirige_formulaire($res); |
|
| 63 | - } else { |
|
| 64 | - if (!isset($GLOBALS['meta']['version_installee'])) { |
|
| 65 | - $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 66 | - } else { |
|
| 67 | - $GLOBALS['meta']['version_installee'] = |
|
| 68 | - (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 69 | - } |
|
| 70 | - # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 71 | - # enregistree au format '1,812' et non '1.812' |
|
| 37 | + // Si reinstallation necessaire, message ad hoc |
|
| 38 | + if (_request('reinstall') == 'oui') { |
|
| 39 | + include_spip('inc/minipres'); |
|
| 40 | + $r = minipres( |
|
| 41 | + _T('titre_page_upgrade'), |
|
| 42 | + '<p><b>' |
|
| 43 | + . _T('texte_nouvelle_version_spip_1') |
|
| 44 | + . '</b><p> ' |
|
| 45 | + . _T( |
|
| 46 | + 'texte_nouvelle_version_spip_2', |
|
| 47 | + ['connect' => '<tt>' . _FILE_CONNECT . '</tt>'] |
|
| 48 | + ) |
|
| 49 | + . generer_form_ecrire( |
|
| 50 | + 'upgrade', |
|
| 51 | + "<input type='hidden' name='reinstall' value='non' />", |
|
| 52 | + '', |
|
| 53 | + _T('bouton_relancer_installation') |
|
| 54 | + ) |
|
| 55 | + ); |
|
| 56 | + echo $r; |
|
| 57 | + } elseif (_request('fin')) { |
|
| 58 | + include_spip('inc/plugin'); |
|
| 59 | + actualise_plugins_actifs(); |
|
| 60 | + include_spip('inc/headers'); |
|
| 61 | + $res = generer_url_ecrire('admin_plugin', 'var_mode=recalcul'); |
|
| 62 | + echo redirige_formulaire($res); |
|
| 63 | + } else { |
|
| 64 | + if (!isset($GLOBALS['meta']['version_installee'])) { |
|
| 65 | + $GLOBALS['meta']['version_installee'] = 0.0; |
|
| 66 | + } else { |
|
| 67 | + $GLOBALS['meta']['version_installee'] = |
|
| 68 | + (double)str_replace(',', '.', $GLOBALS['meta']['version_installee']); |
|
| 69 | + } |
|
| 70 | + # NB: str_replace car, sur club-internet, il semble que version_installe soit |
|
| 71 | + # enregistree au format '1,812' et non '1.812' |
|
| 72 | 72 | |
| 73 | - // Erreur downgrade |
|
| 74 | - // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 75 | - if ($GLOBALS['spip_version_base'] < $GLOBALS['meta']['version_installee']) { |
|
| 76 | - $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 77 | - } // Commentaire standard upgrade |
|
| 78 | - else { |
|
| 79 | - $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 80 | - } |
|
| 73 | + // Erreur downgrade |
|
| 74 | + // (cas de double installation de fichiers SPIP sur une meme base) |
|
| 75 | + if ($GLOBALS['spip_version_base'] < $GLOBALS['meta']['version_installee']) { |
|
| 76 | + $commentaire = _T('info_mise_a_niveau_base_2'); |
|
| 77 | + } // Commentaire standard upgrade |
|
| 78 | + else { |
|
| 79 | + $commentaire = _T('texte_mise_a_niveau_base_1'); |
|
| 80 | + } |
|
| 81 | 81 | |
| 82 | - $commentaire .= '<br />[' . $GLOBALS['meta']['version_installee'] . '/' . $GLOBALS['spip_version_base'] . ']'; |
|
| 82 | + $commentaire .= '<br />[' . $GLOBALS['meta']['version_installee'] . '/' . $GLOBALS['spip_version_base'] . ']'; |
|
| 83 | 83 | |
| 84 | - $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 85 | - include_spip('inc/headers'); |
|
| 86 | - $admin = charger_fonction('admin', 'inc'); |
|
| 87 | - $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 88 | - if ($res) { |
|
| 89 | - echo $res; |
|
| 90 | - } else { |
|
| 91 | - // effacer les alea pour forcer leur relecture |
|
| 92 | - // si jamais ils ont change pendant l'upgrade |
|
| 93 | - unset($GLOBALS['meta']['alea_ephemere']); |
|
| 94 | - unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 95 | - $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 96 | - echo redirige_formulaire($res); |
|
| 97 | - } |
|
| 98 | - } |
|
| 84 | + $_POST['reinstall'] = 'non'; // pour copy_request dans admin |
|
| 85 | + include_spip('inc/headers'); |
|
| 86 | + $admin = charger_fonction('admin', 'inc'); |
|
| 87 | + $res = $admin('upgrade', _T('info_mise_a_niveau_base'), $commentaire); |
|
| 88 | + if ($res) { |
|
| 89 | + echo $res; |
|
| 90 | + } else { |
|
| 91 | + // effacer les alea pour forcer leur relecture |
|
| 92 | + // si jamais ils ont change pendant l'upgrade |
|
| 93 | + unset($GLOBALS['meta']['alea_ephemere']); |
|
| 94 | + unset($GLOBALS['meta']['alea_ephemere_ancien']); |
|
| 95 | + $res = redirige_action_auteur('purger', 'cache', 'upgrade', 'fin=oui', true); |
|
| 96 | + echo redirige_formulaire($res); |
|
| 97 | + } |
|
| 98 | + } |
|
| 99 | 99 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Rubriques |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | include_spip('inc/actions'); |
@@ -28,21 +28,21 @@ discard block |
||
| 28 | 28 | * @uses ajax_retour() |
| 29 | 29 | **/ |
| 30 | 30 | function exec_selectionner_dist() { |
| 31 | - $id = intval(_request('id')); |
|
| 32 | - $exclus = intval(_request('exclus')); |
|
| 33 | - $type = _request('type'); |
|
| 34 | - $rac = _request('racine'); |
|
| 35 | - $do = _request('do'); |
|
| 36 | - if (preg_match('/^\w*$/', $do)) { |
|
| 37 | - if (!$do) { |
|
| 38 | - $do = 'aff'; |
|
| 39 | - } |
|
| 31 | + $id = intval(_request('id')); |
|
| 32 | + $exclus = intval(_request('exclus')); |
|
| 33 | + $type = _request('type'); |
|
| 34 | + $rac = _request('racine'); |
|
| 35 | + $do = _request('do'); |
|
| 36 | + if (preg_match('/^\w*$/', $do)) { |
|
| 37 | + if (!$do) { |
|
| 38 | + $do = 'aff'; |
|
| 39 | + } |
|
| 40 | 40 | |
| 41 | - $selectionner = charger_fonction('selectionner', 'inc'); |
|
| 41 | + $selectionner = charger_fonction('selectionner', 'inc'); |
|
| 42 | 42 | |
| 43 | - $r = $selectionner($id, 'choix_parent', $exclus, $rac, $type != 'breve', $do); |
|
| 44 | - } else { |
|
| 45 | - $r = ''; |
|
| 46 | - } |
|
| 47 | - ajax_retour($r); |
|
| 43 | + $r = $selectionner($id, 'choix_parent', $exclus, $rac, $type != 'breve', $do); |
|
| 44 | + } else { |
|
| 45 | + $r = ''; |
|
| 46 | + } |
|
| 47 | + ajax_retour($r); |
|
| 48 | 48 | } |
@@ -17,40 +17,40 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Exec de la page de destruction des tables de SPIP |
| 25 | 25 | **/ |
| 26 | 26 | function exec_base_delete_all_dist() { |
| 27 | - include_spip('inc/autoriser'); |
|
| 28 | - if (!autoriser('detruire')) { |
|
| 29 | - include_spip('inc/minipres'); |
|
| 30 | - echo minipres(); |
|
| 31 | - } else { |
|
| 32 | - include_spip('base/dump'); |
|
| 33 | - $res = base_lister_toutes_tables('', [], [], true); |
|
| 34 | - if (!$res) { |
|
| 35 | - include_spip('inc/minipres'); |
|
| 36 | - spip_log('Erreur base de donnees'); |
|
| 37 | - echo minipres( |
|
| 38 | - _T('info_travaux_titre'), |
|
| 39 | - _T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>' |
|
| 40 | - ); |
|
| 41 | - } else { |
|
| 42 | - $res = base_saisie_tables('delete', $res); |
|
| 43 | - include_spip('inc/headers'); |
|
| 44 | - $res = "\n<ol style='text-align:left'><li>\n" . |
|
| 45 | - join("</li>\n<li>", $res) . |
|
| 46 | - '</li></ol>'; |
|
| 47 | - $admin = charger_fonction('admin', 'inc'); |
|
| 48 | - $res = $admin('delete_all', _T('titre_page_delete_all'), $res); |
|
| 49 | - if (!$res) { |
|
| 50 | - redirige_url_ecrire('install', ''); |
|
| 51 | - } else { |
|
| 52 | - echo $res; |
|
| 53 | - } |
|
| 54 | - } |
|
| 55 | - } |
|
| 27 | + include_spip('inc/autoriser'); |
|
| 28 | + if (!autoriser('detruire')) { |
|
| 29 | + include_spip('inc/minipres'); |
|
| 30 | + echo minipres(); |
|
| 31 | + } else { |
|
| 32 | + include_spip('base/dump'); |
|
| 33 | + $res = base_lister_toutes_tables('', [], [], true); |
|
| 34 | + if (!$res) { |
|
| 35 | + include_spip('inc/minipres'); |
|
| 36 | + spip_log('Erreur base de donnees'); |
|
| 37 | + echo minipres( |
|
| 38 | + _T('info_travaux_titre'), |
|
| 39 | + _T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>' |
|
| 40 | + ); |
|
| 41 | + } else { |
|
| 42 | + $res = base_saisie_tables('delete', $res); |
|
| 43 | + include_spip('inc/headers'); |
|
| 44 | + $res = "\n<ol style='text-align:left'><li>\n" . |
|
| 45 | + join("</li>\n<li>", $res) . |
|
| 46 | + '</li></ol>'; |
|
| 47 | + $admin = charger_fonction('admin', 'inc'); |
|
| 48 | + $res = $admin('delete_all', _T('titre_page_delete_all'), $res); |
|
| 49 | + if (!$res) { |
|
| 50 | + redirige_url_ecrire('install', ''); |
|
| 51 | + } else { |
|
| 52 | + echo $res; |
|
| 53 | + } |
|
| 54 | + } |
|
| 55 | + } |
|
| 56 | 56 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | 23 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 24 | - return; |
|
| 24 | + return; |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | |
@@ -29,16 +29,16 @@ discard block |
||
| 29 | 29 | $GLOBALS['delais'] = 0;// pas de cache ! |
| 30 | 30 | // Securite |
| 31 | 31 | if (strstr($fond, '/')) { |
| 32 | - if ( |
|
| 33 | - !include_spip('inc/autoriser') |
|
| 34 | - or !autoriser('webmestre') |
|
| 35 | - ) { |
|
| 36 | - include_spip('inc/minipres'); |
|
| 37 | - echo minipres(); |
|
| 38 | - exit; |
|
| 39 | - } |
|
| 32 | + if ( |
|
| 33 | + !include_spip('inc/autoriser') |
|
| 34 | + or !autoriser('webmestre') |
|
| 35 | + ) { |
|
| 36 | + include_spip('inc/minipres'); |
|
| 37 | + echo minipres(); |
|
| 38 | + exit; |
|
| 39 | + } |
|
| 40 | 40 | } else { |
| 41 | - $fond = "prive/squelettes/$fond"; |
|
| 41 | + $fond = "prive/squelettes/$fond"; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | // quelques inclusions et ini prealables |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | * @todo supprimer cette fonction vide ? |
| 51 | 51 | **/ |
| 52 | 52 | function shutdown_error() { |
| 53 | - // si on arrive ici avec un tampon non ferme : erreur fatale |
|
| 54 | - /* if (ob_get_level()){ |
|
| 53 | + // si on arrive ici avec un tampon non ferme : erreur fatale |
|
| 54 | + /* if (ob_get_level()){ |
|
| 55 | 55 | // envoyer tous les tampons |
| 56 | 56 | while (ob_get_level()) |
| 57 | 57 | ob_end_flush(); |