Overview
Comment:Fix reference to $name in Skeleton
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | templates
Files: files | file ages | folders
SHA3-256: d89a6e3c34f9a6f550fb6bf298dda5f0e18faf41c57b898c1430dbd290dde919
User & Date: bohwaz on 2022-08-12 15:18:05
Other Links: branch diff | manifest | tags
Context
2022-08-12
15:20
Missing use statement check-in: 95210003ca user: bohwaz tags: templates
15:18
Fix reference to $name in Skeleton check-in: d89a6e3c34 user: bohwaz tags: templates
2022-08-09
01:57
Fix missing constant check-in: ac5e0cff29 user: bohwaz tags: templates
Changes

Modified src/include/lib/Garradin/Web/Skeleton.php from [bd3e31e44c] to [abe059df2e].

44
45
46
47
48
49
50
51
52
53
54
55
56
57





58
59
60
61
62
63
64

		return null;
	}

	public function error_404(): void
	{
		// Detect loop if 404.html does not exist
		if ($this->name == '404.html') {
			throw new UserException('Cette page n\'existe pas.');
		}

		header('Content-Type: text/html;charset=utf-8', true);
		header('HTTP/1.1 404 Not Found', true);
		$tpl = new self('404.html');





		$tpl->serve();
	}

	public function serve(array $params = []): void
	{
		if (Plugin::fireSignal('http.request.skeleton.before', $params)) {
			return;







|






>
>
>
>
>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

		return null;
	}

	public function error_404(): void
	{
		// Detect loop if 404.html does not exist
		if (Utils::basename($this->path) == '404.html') {
			throw new UserException('Cette page n\'existe pas.');
		}

		header('Content-Type: text/html;charset=utf-8', true);
		header('HTTP/1.1 404 Not Found', true);
		$tpl = new self('404.html');

		if (!$tpl->exists()) {
			throw new UserException('Cette page n\'existe pas.');
		}

		$tpl->serve();
	}

	public function serve(array $params = []): void
	{
		if (Plugin::fireSignal('http.request.skeleton.before', $params)) {
			return;