From 3f7cbc93fe00a5bd44c1608dd48ed853ed25e0bf Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Tue, 28 Apr 2020 19:40:49 +0200 Subject: Fix broken SQL in Repository::create - There were values missing - Use PREFIX_ --- ratatoeskr/sys/models.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ratatoeskr') diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php index d1ba911..626b237 100644 --- a/ratatoeskr/sys/models.php +++ b/ratatoeskr/sys/models.php @@ -2518,7 +2518,14 @@ class Repository extends BySQLRowEnabled try { global $db_con; - qdb("INSERT INTO `ratatoeskr_repositories` () VALUES ()"); + qdb( + "INSERT INTO PREFIX_repositories (baseurl, name, description, pkgcache, lastrefresh) VALUES (?, ?, ?, ?, ?)", + $obj->baseurl, + $obj->name, + $obj->description, + base64_encode(serialize($obj->packages)), + $obj->lastrefresh + ); $obj->id = $db_con->lastInsertId(); $obj->save(); $tx->commit(); @@ -2946,7 +2953,6 @@ class Article extends BySQLRowEnabled $subqueries[] = "`c`.`tag` = ?"; $subparams[] = $v->get_id(); break; - default: continue; } } -- cgit v1.2.3-54-g00ecf