diff options
author | Simon Rettberg | 2023-10-06 18:26:22 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-10-06 18:26:22 +0200 |
commit | e5be4e97ffc41ca3b0386651a626b781a3637a85 (patch) | |
tree | 20152d35607de272edae44725efba13f21da85a1 /inc/image.inc.php | |
parent | api: Hard-code bogus name/mail for read only (STUDENT) login (diff) | |
download | bwlp-webadmin-e5be4e97ffc41ca3b0386651a626b781a3637a85.tar.gz bwlp-webadmin-e5be4e97ffc41ca3b0386651a626b781a3637a85.tar.xz bwlp-webadmin-e5be4e97ffc41ca3b0386651a626b781a3637a85.zip |
Update for PHP 8.2
Diffstat (limited to 'inc/image.inc.php')
-rw-r--r-- | inc/image.inc.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/inc/image.inc.php b/inc/image.inc.php index 1bad04f..1ce95da 100644 --- a/inc/image.inc.php +++ b/inc/image.inc.php @@ -3,21 +3,22 @@ class Image { - public static function deleteOwnedBy($userid) + public static function deleteOwnedBy(string $userid): false { if ($userid === false || !is_numeric($userid)) return false; //return Database::exec('DELETE FROM image WHERE ownerid = :userid', array('userid' => $userid)); // TODO + return false; } - public static function getImageCount($login) + public static function getImageCount(string $login): int { $ret = Database::queryFirst('SELECT Count(*) AS cnt FROM imagebase ' . ' WHERE imagebase.ownerid = :userid', array('userid' => $login)); if ($ret === false) return 0; - return $ret['cnt']; + return (int)$ret['cnt']; } } |