Enhance the search to have a different output depending on the current page. re #34
這個提交存在於:
父節點
a4002e28ae
當前提交
6a9646bf15
共有 2 個檔案被更改,包括 11 行新增 和 2 行删除
10
base.php
10
base.php
|
@ -499,7 +499,15 @@ class PageQueryResult extends Page
|
|||
public function InitializeContent ()
|
||||
{
|
||||
$this->title = "Search result for query *" . $this->query . "*"; // TODO I18N
|
||||
list ($this->entryArray, $this->totalNumber) = Book::getBooksByQuery ($this->query, $this->n);
|
||||
$currentPage = getURLParam ("current", NULL);
|
||||
switch ($currentPage) {
|
||||
case Base::PAGE_ALL_AUTHORS :
|
||||
case Base::PAGE_AUTHORS_FIRST_LETTER :
|
||||
$this->entryArray = Author::getAuthorsByStartingLetter ('%' . $this->query);
|
||||
break;
|
||||
default:
|
||||
list ($this->entryArray, $this->totalNumber) = Book::getBooksByQuery ($this->query, $this->n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
載入中…
新增表格
Add a link
新增問題並參考