Skip to content

Commit

Permalink
Speed up main view with project main data
Browse files Browse the repository at this point in the history
Adding a class to get only project main data for main view
  • Loading branch information
rldhont committed Dec 4, 2024
1 parent 47bbcff commit 34d78c5
Show file tree
Hide file tree
Showing 8 changed files with 708 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getData($form)
if ($criteria && array_key_exists($criteria, $this->data)) {
$rep = lizmap::getRepository($criteria);
// Get projects metadata
$metadata = $rep->getProjectsMetadata();
$metadata = $rep->getProjectsMainData();
foreach ($metadata as $meta) {
if ($meta->getHidden()) {
continue;
Expand Down
5 changes: 5 additions & 0 deletions lizmap/modules/lizmap/classes/lizmapRepository.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ public function getProjectsMetadata()
return $this->repo->getProjectsMetadata();
}

public function getProjectsMainData()
{
return $this->repo->getProjectsMainData();
}

/**
* Return the value of the Access-Control-Allow-Origin HTTP header.
*
Expand Down
Loading

0 comments on commit 34d78c5

Please sign in to comment.