From eec062a7fd3074b3a3bcc9527546e4fbb9b91a2e Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Mon, 2 Sep 2024 08:37:39 +0200 Subject: [PATCH] Simplify select category query in Rest::savePackage() --- src/Rest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rest.php b/src/Rest.php index 54d6221b..cb84b134 100644 --- a/src/Rest.php +++ b/src/Rest.php @@ -353,7 +353,7 @@ public function savePackage($package) @chmod($packageDir, 0777); } - $catinfo = $this->database->run('SELECT c.name AS category_name FROM packages, categories c WHERE + $catinfo = $this->database->run('SELECT c.name AS category_name FROM categories c WHERE c.id = ?', [$package['categoryid']])->fetch()['category_name']; if (isset($package['parent']) && $package['parent']) { $parent = '