Simplify a little the code to get the title of the search page. re #127
This commit is contained in:
parent
8fac662f4b
commit
90cfeb57c1
28
base.php
28
base.php
|
@ -724,24 +724,16 @@ class PageQueryResult extends Page
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
$scope = getURLParam ("scope");
|
$scope = getURLParam ("scope");
|
||||||
switch ($scope) {
|
if (empty ($scope)) {
|
||||||
case self::SCOPE_AUTHOR :
|
$this->title = str_format (localize ("search.result"), $this->query);
|
||||||
$this->title = str_format (localize ("search.result.author"), $this->query);
|
} else {
|
||||||
break;
|
// Comment to help the perl i18n script
|
||||||
case self::SCOPE_TAG :
|
// str_format (localize ("search.result.author"), $this->query)
|
||||||
$this->title = str_format (localize ("search.result.tag"), $this->query);
|
// str_format (localize ("search.result.tag"), $this->query)
|
||||||
break;
|
// str_format (localize ("search.result.series"), $this->query)
|
||||||
case self::SCOPE_SERIES :
|
// str_format (localize ("search.result.book"), $this->query)
|
||||||
$this->title = str_format (localize ("search.result.series"), $this->query);
|
// str_format (localize ("search.result.publisher"), $this->query)
|
||||||
break;
|
$this->title = str_format (localize ("search.result.{$scope}"), $this->query);
|
||||||
case self::SCOPE_BOOK :
|
|
||||||
$this->title = str_format (localize ("search.result.book"), $this->query);
|
|
||||||
break;
|
|
||||||
case self::SCOPE_PUBLISHER :
|
|
||||||
$this->title = str_format (localize ("search.result.publisher"), $this->query);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
$this->title = str_format (localize ("search.result"), $this->query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$crit = "%" . $this->query . "%";
|
$crit = "%" . $this->query . "%";
|
||||||
|
|
Loading…
Reference in a new issue