fix: Thingy shows things from other Thingies
This commit is contained in:
parent
ee59ef42e9
commit
e6e89b16ef
1 changed files with 3 additions and 4 deletions
|
|
@ -383,8 +383,7 @@ sub getEditFieldForm {
|
||||||
"file" => "file",
|
"file" => "file",
|
||||||
);
|
);
|
||||||
|
|
||||||
$things = $self->session->db->read('select thingId, label from Thingy_things left join asset using(assetId)
|
$things = $self->session->db->read('select thingId, label from Thingy_things where assetId =?',[$self->getId]);
|
||||||
where asset.state = "published"');
|
|
||||||
while (my $thing = $things->hashRef) {
|
while (my $thing = $things->hashRef) {
|
||||||
my $fieldType = "otherThing_".$thing->{thingId};
|
my $fieldType = "otherThing_".$thing->{thingId};
|
||||||
$fieldTypes{$fieldType} = $thing->{label};
|
$fieldTypes{$fieldType} = $thing->{label};
|
||||||
|
|
@ -1286,8 +1285,8 @@ sub www_editThing {
|
||||||
"addThing" => $i18n->get('add thing label'),
|
"addThing" => $i18n->get('add thing label'),
|
||||||
"thingyDefault" => $i18n->get('view thingy default label'),
|
"thingyDefault" => $i18n->get('view thingy default label'),
|
||||||
);
|
);
|
||||||
my $otherThings = $session->db->read("select thingId, label from Thingy_things left join asset using(assetId)
|
my $otherThings = $session->db->read("select thingId, label from Thingy_things where thingId != ? and assetId =?",
|
||||||
where thingId != ? and asset.state = 'published'",[$thingId]);
|
[$thingId,$self->getId]);
|
||||||
while (my $otherThing = $otherThings->hashRef) {
|
while (my $otherThing = $otherThings->hashRef) {
|
||||||
$afterSave{'searchOther_'.$otherThing->{thingId}} = $i18n->get('search other thing label').$otherThing->{label};
|
$afterSave{'searchOther_'.$otherThing->{thingId}} = $i18n->get('search other thing label').$otherThing->{label};
|
||||||
$afterSave{'addOther_'.$otherThing->{thingId}} = $i18n->get('add other thing label').$otherThing->{label};
|
$afterSave{'addOther_'.$otherThing->{thingId}} = $i18n->get('add other thing label').$otherThing->{label};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue