Overview
Comment:Fix breadcrumbs urls
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: 50cef412b0c108cfb0bc7d9c1897b19cfbea258b084bc376c237fac85cc65ae6
User & Date: bohwaz on 2021-06-03 22:23:34
Other Links: manifest | tags
Context
2021-06-07
16:50
Fix link to user details in user files list check-in: 389176277b user: bohwaz tags: trunk, stable
2021-06-03
22:23
Fix breadcrumbs urls check-in: 50cef412b0 user: bohwaz tags: trunk, stable
22:01
Fix path/parent rename when changing parent URI check-in: bcab29e518 user: bohwaz tags: trunk, stable
Changes

Modified src/include/lib/Garradin/UserTemplate/Sections.php from [edc615ff84] to [9a0667f343].

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
		$db = DB::getInstance();
		$sql = sprintf('SELECT path, title FROM web_pages WHERE %s ORDER BY path ASC;', $db->where('path', array_keys($paths)));

		$result = $db->preparedQuery($sql);

		while ($row = $result->fetchArray(\SQLITE3_ASSOC))
		{
			$row['url'] = WWW_URL . $row['path'];
			yield $row;
		}
	}

	static public function categories(array $params, UserTemplate $tpl, int $line): \Generator
	{
		if (!array_key_exists('where', $params)) {







|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
		$db = DB::getInstance();
		$sql = sprintf('SELECT path, title FROM web_pages WHERE %s ORDER BY path ASC;', $db->where('path', array_keys($paths)));

		$result = $db->preparedQuery($sql);

		while ($row = $result->fetchArray(\SQLITE3_ASSOC))
		{
			$row['url'] = WWW_URL . Utils::basename($row['path']);
			yield $row;
		}
	}

	static public function categories(array $params, UserTemplate $tpl, int $line): \Generator
	{
		if (!array_key_exists('where', $params)) {