Prepare combo list reload with revisions and fix box/storage in webgui

This commit is contained in:
thooge committed 2026-10-18 10:35:35 +02:00
1 parent ee947b772f
commit aee50ecb4f
17 files changed
+128 -43

No files matched your search

+7 -4
View File
@@ -33,6 +33,7 @@ switch ($submit = form_get_action()) {
$p[':sname'] = gpc_get_string($_POST, 'sname');
$p[':stype'] = gpc_get_int($_POST, 'stype');
$id = db_exec_insert('storage', $p);
db_set_revision('table', TBL_STORAGE);
$action = ACT_VIEW;
break;
@@ -157,10 +158,12 @@ form_add_button($g_scriptname);
// Boxes
echo "<h1>", _('Box'), "</h1>\n";
$sql = "SELECT boxid, sid, label, color, content, remarks "
. "FROM box "
. "ORDER BY label";
$sth = $pdo->query($sql);
$sql = "SELECT b.boxid, b.sid, b.label, b.color, b.content, b.remarks "
. "FROM box AS b JOIN storage AS s USING (sid) "
. "WHERE s.vid=? "
. "ORDER BY b.label";
$sth = $pdo->prepare($sql);
$sth->execute([$user->vid]);
$res = $sth->fetchAll();
echo '<table class="table table-striped">', "\n";
echo "<thead>\n";