Changed to suggestings (back to original) + fixed typo in scalar type

This commit is contained in:
Roland Häder 2022-06-18 23:30:13 +02:00
parent 6f1d52cf71
commit 39f2d197ea
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77
2 changed files with 4 additions and 4 deletions

View File

@ -84,7 +84,7 @@ class OpenWebAuthToken
*/ */
public static function purge(string $type, string $interval) public static function purge(string $type, string $interval)
{ {
$condition = ['`type` = ? AND `created` < ?', $type, DateTimeFormat::utcNow() . ' - INTERVAL ' . $interval]; $condition = ["`type` = ? AND `created` < ?", $type, DateTimeFormat::utcNow() . ' - INTERVAL ' . $interval];
DBA::delete('openwebauth-token', $condition); DBA::delete('openwebauth-token', $condition);
} }

View File

@ -167,7 +167,7 @@ class Photo
$sql_acl = Security::getPermissionsSQLByUserId($uid, $accessible); $sql_acl = Security::getPermissionsSQLByUserId($uid, $accessible);
$conditions = ['`resource-id` = ? AND `scale` <= ? ' . $sql_acl, $resourceid, $scale]; $conditions = ["`resource-id` = ? AND `scale` <= ? " . $sql_acl, $resourceid, $scale];
$params = ['order' => ['scale' => true]]; $params = ['order' => ['scale' => true]];
$photo = self::selectFirst([], $conditions, $params); $photo = self::selectFirst([], $conditions, $params);
@ -333,7 +333,7 @@ class Photo
*/ */
public static function store(Image $image, int $uid, int $cid, string $rid, string $filename, string $album, int $scale, int $type = self::DEFAULT, string $allow_cid = '', string $allow_gid = '', string $deny_cid = '', string $deny_gid = '', string $desc = ''): bool public static function store(Image $image, int $uid, int $cid, string $rid, string $filename, string $album, int $scale, int $type = self::DEFAULT, string $allow_cid = '', string $allow_gid = '', string $deny_cid = '', string $deny_gid = '', string $desc = ''): bool
{ {
$photo = self::selectFirst(['guid'], ['`resource-id` = ? AND `guid` != ?', $rid, '']); $photo = self::selectFirst(['guid'], ["`resource-id` = ? AND `guid` != ?", $rid, '']);
if (DBA::isResult($photo)) { if (DBA::isResult($photo)) {
$guid = $photo['guid']; $guid = $photo['guid'];
} else { } else {
@ -590,7 +590,7 @@ class Photo
* @param string $hemi hemi * @param string $hemi hemi
* @return float * @return float
*/ */
public static function getGps(array $exifCoord, strinf $hemi): float public static function getGps(array $exifCoord, string $hemi): float
{ {
$degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0; $degrees = count($exifCoord) > 0 ? self::gps2Num($exifCoord[0]) : 0;
$minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0; $minutes = count($exifCoord) > 1 ? self::gps2Num($exifCoord[1]) : 0;