Skip to content

Commit 4f29056

Browse files
committedAug 22, 2011
Changed urls sent to the asset indexer from using getUrl which prepends the gateway to them. Fixes bug #12229.
1 parent 8ed3eba commit 4f29056

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed
 

‎docs/changelog/7.x.x.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
7.10.23
22
- fixed #12225: Stock asset, multiple instances on a page
3+
- fixed #12229: Indexed thingy data has gateway url prepended to it
34

45
7.10.22
56
- rfe #12223: Add date type to content profiling (metadata)

‎lib/WebGUI/Asset/Wobject/Thingy.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -1611,11 +1611,11 @@ sub indexThing {
16111611
return unless $thing;
16121612
my $index = WebGUI::Search::Index->new($self);
16131613
$index->addRecord(
1614-
url => $self->getUrl($self->getThingUrl($thing)),
16151614
groupIdView => $thing->{groupIdView},
16161615
title => $thing->{label},
16171616
subId => $thing->{thingId},
16181617
keywords => join(' ', @{$thing}{qw/label editScreenTitle editInstructions searchScreenTitle searchDescription/}),
1618+
url => $self->session->url->append($self->get('url'), $self->getThingUrl($thing)),
16191619
);
16201620
##Easy update of all thingData fields for this thing. This is in lieu of deleting all records
16211621
##And rebuilding them all.
@@ -1687,7 +1687,7 @@ sub indexThingData {
16871687
|| $self->getTitle;
16881688
$index->addRecord(
16891689
assetId => $self->getId,
1690-
url => $self->getUrl('func=viewThingData;thingId='. $thing->{thingId} . ';thingDataId='. $thingData->{thingDataId}),
1690+
url => $session->url->append($self->get('url'), 'func=viewThingData;thingId='. $thing->{thingId} . ';thingDataId='. $thingData->{thingDataId}),
16911691
groupIdView => $thing->{groupIdView},
16921692
title => $title,
16931693
subId => $thing->{thingId} . '-' . $thingData->{thingDataId},

‎t/Asset/Wobject/Thingy/indexing.t

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ is $session->db->quickScalar('select count(*) from assetIndex where assetId=?',[
7575

7676
my $record;
7777

78-
$record = $session->db->quickHashRef('select * from assetIndex where assetId=?',[$thingy->getId]);
78+
$record = $session->db->quickHashRef('select * from assetIndex where assetId=? AND subId IS NOT NULL',[$thingy->getId]);
7979
cmp_deeply(
8080
$record,
8181
superhashof({
8282
subId => 'THING_RECORD',
83-
url => $thingy->getUrl('func=search;thingId=THING_RECORD'),
83+
url => $session->url->append($thingy->get('url'), 'func=search;thingId=THING_RECORD'),
8484
title => 'Label',
8585
groupIdView => 2,
8686
keywords => all(
@@ -165,7 +165,7 @@ cmp_deeply(
165165
score => ignore(),
166166
synopsis => ignore(),
167167
title => 'Label', ##From the Thing's label
168-
url => $thingy->getUrl('func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
168+
url => $session->url->append($thingy->get('url'), 'func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
169169
}
170170
],
171171
'Checking indexed data for the thingData'
@@ -214,7 +214,7 @@ cmp_deeply(
214214
score => ignore(),
215215
synopsis => ignore(),
216216
title => '8/16/2001', ##From viewScreenTitle, which is $birthday in user's preferred date format
217-
url => $thingy->getUrl('func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
217+
url => $session->url->append($thingy->get('url'), 'func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
218218
}
219219
],
220220
'Checking indexed data for the thingData'

0 commit comments

Comments
 (0)
Please sign in to comment.