Overview
Comment:Fix exists for sqlite
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable | 1.1.1
Files: files | file ages | folders
SHA3-256: 75cd77fc8b5eebea1479285c1ab3e8d1f35bc93854054a3fe3dda35b6f213610
User & Date: bohwaz on 2021-04-10 12:20:59
Other Links: manifest | tags
Context
2021-04-10
13:32
Restore old behaviour where last article is shown in full on front page check-in: 77387d2a6e user: bohwaz tags: trunk, stable
12:20
Fix exists for sqlite check-in: 75cd77fc8b user: bohwaz tags: trunk, stable, 1.1.1
12:04
Make sure session is started before anything is sent to browser check-in: 6a2aec70c7 user: bohwaz tags: trunk, stable, 1.1.1
Changes

Modified src/include/lib/Garradin/Files/Storage/SQLite.php from [1733617c6f] to [0ae2ccbb40].

123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
	static public function list(string $path): array
	{
		return EM::getInstance(File::class)->all('SELECT * FROM @TABLE WHERE parent = ? ORDER BY type DESC, name COLLATE NOCASE ASC;', $path);
	}

	static public function exists(string $path): bool
	{
		return DB::getInstance()->test('files', 'path = ? AND name = ?', Utils::dirname($path), Utils::basename($path));
	}

	static public function delete(File $file): bool
	{
		$db = DB::getInstance();

		$cache_id = 'files.' . $file->pathHash();







|







123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
	static public function list(string $path): array
	{
		return EM::getInstance(File::class)->all('SELECT * FROM @TABLE WHERE parent = ? ORDER BY type DESC, name COLLATE NOCASE ASC;', $path);
	}

	static public function exists(string $path): bool
	{
		return DB::getInstance()->test('files', 'path = ?', $path);
	}

	static public function delete(File $file): bool
	{
		$db = DB::getInstance();

		$cache_id = 'files.' . $file->pathHash();