Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nczirjak-acdh committed Sep 21, 2020
2 parents 5475c18 + 83a96b9 commit 73f141e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
5 changes: 2 additions & 3 deletions src/Controller/SearchViewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct()

/**
* Create the search view content
*
*
* @param int $limit
* @param int $page
* @param string $order
Expand Down Expand Up @@ -80,7 +80,7 @@ public function fulltext_search(string $metavalue = "root", string $limit = "10"
((int)$page == 1) ? (int)$page = 0: $page = (int)$page;
$data = $this->model->getViewData_V2($limit, $page, $order, $metaobj);

if(count($data) > 0) {
if (count($data) > 0) {
$numPage = ceil((int)$data['count'] / (int)$limit);
/// for the gui pager we need 1 for the first page
((int)$page == 0) ? (int)$page = 1: $page = (int)$page;
Expand All @@ -93,7 +93,6 @@ public function fulltext_search(string $metavalue = "root", string $limit = "10"
);

$guiData = array('data' => $this->helper->createView($data['data']), 'pagination' => $pagination);

} else {
$guiData['data'] = array();
$guiData['pagination'][0] = $this->pagingHelper->createView(
Expand Down
22 changes: 11 additions & 11 deletions src/Model/SearchViewModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ public function getViewData_V2(int $limit = 10, int $page = 0, string $order = "
} else {
$sqlWords = (string)"*";
}
/*
echo "<pre>";
var_dump("years: ".(string)$sqlYears);
var_dump("types: ".$sqlTypes);
var_dump("words: ".$sqlWords);
var_dump("limit: ".$this->limit);
var_dump("offset: ".$this->offset);
var_dump("order: ".$this->orderby);
var_dump("order prop:".$this->orderby_column);
echo "</pre>";
*/
/*
echo "<pre>";
var_dump("years: ".(string)$sqlYears);
var_dump("types: ".$sqlTypes);
var_dump("words: ".$sqlWords);
var_dump("limit: ".$this->limit);
var_dump("offset: ".$this->offset);
var_dump("order: ".$this->orderby);
var_dump("order prop:".$this->orderby_column);
echo "</pre>";
*/
try {
$this->setSqlTimeout('30000');
//"select * from gui.search_full_func('Wollmilchsau', ARRAY [ 'https://vocabs.acdh.oeaw.ac.at/schema#Collection'], '%(2020|1997)%', 'en', '10', '0', 'desc', 'https://vocabs.acdh.oeaw.ac.at/schema#hasTitle');"
Expand Down

0 comments on commit 73f141e

Please sign in to comment.