Skip to content

Commit

Permalink
flatten qids array as expected by frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
splattater authored and white-gecko committed Jul 8, 2013
1 parent 6d0d013 commit 8731310
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions library/Erfurt/Cache/Backend/QueryCache/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,14 @@ public function invalidateWithModelIri($modelIri)
FROM ef_cache_query_rm JOIN ef_cache_query_model ON ef_cache_query_rm.mid = ef_cache_query_model.mid
WHERE (ef_cache_query_model.modelIri = \''.$modelIri.'\' OR ef_cache_query_model.modelIri IS NULL)';

$qids = $this->_query($query);
foreach ($qids as $qid) {
$qid = $qid['qid'];
$qidsResult = $this->_query($query);

$qids = array();
foreach ($qidsResult as $qid) {
$qids[] = $qid['qid'];
}

foreach ($qids as $qid) {
//delete entries in query_triple
$query = '
SELECT ef_cache_query_rt.tid tid
Expand Down

4 comments on commit 8731310

@seebi
Copy link
Member

@seebi seebi commented on 8731310 Jul 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MichaelMartin - can you verify this please?

@MichaelMartin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did, and will push a further version that remove the necessarity of a second loop

@seebi
Copy link
Member

@seebi seebi commented on 8731310 Jul 10, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@white-gecko
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a more detailed explanation for our commit to commit 870b9ea

Please sign in to comment.