Overview
Comment: | Fix file datetime in touch for SQLite storage backend |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
3813b1894e9c67b42dafeb35b306abb5 |
User & Date: | bohwaz on 2022-11-28 16:28:47 |
Other Links: | branch diff | manifest | tags |
Context
2022-11-28
| ||
16:33 | Fix creator/user transactions lists check-in: 6c04af81b1 user: bohwaz tags: dev | |
16:28 | Fix file datetime in touch for SQLite storage backend check-in: 3813b1894e user: bohwaz tags: dev | |
2022-11-27
| ||
21:57 | NextCloud: Use new method signature check-in: 2347e7a3d3 user: bohwaz tags: dev | |
Changes
Modified src/include/lib/Garradin/Files/Storage/SQLite.php from [919557dad8] to [8bb888c492].
︙ | ︙ | |||
229 230 231 232 233 234 235 | } return true; } static public function touch(string $path, $date = null): bool { | > > > | | > > | > | | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 | } return true; } static public function touch(string $path, $date = null): bool { if (null === $date) { $date = new \DateTime; } elseif (!($date instanceof \DateTimeInterface) && ctype_digit($date)) { $date = new \DateTime('@' . $date); } elseif (!($date instanceof \DateTimeInterface)) { throw new \InvalidArgumentException('Invalid date string: ' . $date); } return DB::getInstance()->preparedQuery('UPDATE files SET modified = ? WHERE path = ?;', $date, $path); } static public function mkdir(File $file): bool { $file->save(); if ($file->parent) { |
︙ | ︙ |