Overview
Comment: | Correctif: édition de squelette vide |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
22c5cdcd731b271b8155eb10959c17f6 |
User & Date: | bohwaz on 2019-10-06 21:40:30 |
Other Links: | manifest | tags |
Context
2019-10-09
| ||
11:30 | Cohérence du retour des fonctions des filtres de squelettes check-in: 302a336a7c user: bohwaz tags: trunk | |
2019-10-06
| ||
21:40 | Correctif: édition de squelette vide check-in: 22c5cdcd73 user: bohwaz tags: trunk, stable | |
21:34 | Inclusion de l'identifiant de manifeste dans le version_hash check-in: 73748e7ed7 user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Squelette.php from [8be8c4d3e2] to [cb5267ae5a].
︙ | ︙ | |||
918 919 920 921 922 923 924 | { return null; } } static public function getSource($template) { | | | > | | > | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 | { return null; } } static public function getSource($template) { if (!preg_match('!^[\w\d_-]+(?:\.[\w\d_-]+)*$!i', $template)) { return null; } $path = file_exists(DATA_ROOT . '/www/squelettes/' . $template) ? DATA_ROOT . '/www/squelettes/' . $template : ROOT . '/www/squelettes-dist/' . $template; if (!file_exists($path)) { return null; } return file_get_contents($path); } static public function editSource($template, $content) { if (!preg_match('!^[\w\d_-]+(?:\.[\w\d_-]+)*$!i', $template)) |
︙ | ︙ |
Modified src/www/admin/config/site.php from [dd99638235] to [4b2ceec322].
︙ | ︙ | |||
36 37 38 39 40 41 42 | } if (qg('edit')) { $source = Squelette::getSource(qg('edit')); | | | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | } if (qg('edit')) { $source = Squelette::getSource(qg('edit')); if (null === $source) { throw new UserException("Ce squelette n'existe pas."); } $csrf_key = 'edit_skel_' . md5(qg('edit')); if (f('save') && $form->check($csrf_key)) |
︙ | ︙ |