Overview
Comment:In next release, reset admin background file to NULL if file does not exist
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b351912a13ce1065afb932a9a69b164769ec5ba4232b09687af155dde025cc05
User & Date: bohwaz on 2021-04-09 00:26:40
Other Links: manifest | tags
Context
2021-04-09
00:27
Attempt to fix bugs in renaming web pages at creation check-in: 8b46a75845 user: bohwaz tags: trunk, stable
00:26
In next release, reset admin background file to NULL if file does not exist check-in: b351912a13 user: bohwaz tags: trunk
2021-04-08
23:31
Fix change of identifier field with collate nocase check-in: 9cb10c1a70 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/Upgrade.php from [e2ad1a6938] to [e75e1a1335].

178
179
180
181
182
183
184













185
186
187
188
189
190
191
				foreach ($pages as $data) {
					$page = new \Garradin\Entities\Web\Page;
					$page->exists(true);
					$page->load((array) $data);
					$page->syncSearch();
				}
			}














			// Vérification de la cohérence des clés étrangères
			$db->foreignKeyCheck();

			// Delete local cached files
			Utils::resetCache(USER_TEMPLATES_CACHE_ROOT);
			Utils::resetCache(STATIC_CACHE_ROOT);







>
>
>
>
>
>
>
>
>
>
>
>
>







178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
				foreach ($pages as $data) {
					$page = new \Garradin\Entities\Web\Page;
					$page->exists(true);
					$page->load((array) $data);
					$page->syncSearch();
				}
			}

			if (version_compare($v, '1.1.1', '<')) {
				// Reset admin_background if the file does not exist
				$bg = $db->firstColumn('SELECT value FROM config WHERE key = \'admin_background\';');

				if ($bg) {
					$file = Files::get($bg);

					if (!$file) {
						$db->exec('UPDATE config SET value = NULL WHERE key = \'admin_background\';');
					}
				}
			}

			// Vérification de la cohérence des clés étrangères
			$db->foreignKeyCheck();

			// Delete local cached files
			Utils::resetCache(USER_TEMPLATES_CACHE_ROOT);
			Utils::resetCache(STATIC_CACHE_ROOT);