Overview
Comment: | Fix: erreur quand le fichier de fond d'écran a déjà été supprimé (race condition) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
41baaae90be2e7e4f587f46e1ccb82c8 |
User & Date: | bohwaz on 2020-09-08 18:42:03 |
Other Links: | manifest | tags |
Context
2020-09-08
| ||
18:53 | Limiter la longueur du champ de recherche check-in: 0277842dc6 user: bohwaz tags: trunk, stable | |
18:42 | Fix: erreur quand le fichier de fond d'écran a déjà été supprimé (race condition) check-in: 41baaae90b user: bohwaz tags: trunk, stable | |
18:36 | Exiger que le code OTP fasse 6 caractères check-in: 14198574ed user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Config.php from [9e09070cbb] to [c889a0eda3].
︙ | ︙ | |||
122 123 124 125 126 127 128 | $values = []; $db = DB::getInstance(); if (isset($this->modified['image_fond'])) { if ($current = $db->firstColumn('SELECT valeur FROM config WHERE cle = \'image_fond\';')) { | > | | > > > > | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | $values = []; $db = DB::getInstance(); if (isset($this->modified['image_fond'])) { if ($current = $db->firstColumn('SELECT valeur FROM config WHERE cle = \'image_fond\';')) { try { $f = new Fichiers($current); $f->remove(); } catch (\InvalidArgumentException $e) { // Ignore: the file has already been deleted } } if (strlen($this->config['image_fond']) > 0) { $f = Fichiers::storeFromBase64('Image_fond_admin.png', $this->config['image_fond']); $this->config['image_fond'] = $f->id; unset($f); |
︙ | ︙ |