mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
fix first array value detection
This commit is contained in:
parent
335424a8c3
commit
aa2a290615
1 changed files with 10 additions and 5 deletions
|
|
@ -550,8 +550,9 @@ class Page
|
||||||
|
|
||||||
if ($h1 = $body->getH1())
|
if ($h1 = $body->getH1())
|
||||||
{
|
{
|
||||||
$title = $h1[0] .
|
$title = reset(
|
||||||
$this->app->config->header->title->postfix;
|
$h1
|
||||||
|
) . $this->app->config->header->title->postfix;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -608,7 +609,7 @@ class Page
|
||||||
// Ignore history record on same URL stored
|
// Ignore history record on same URL stored
|
||||||
if ($result = $this->app->database->getHistory('', 0, 1))
|
if ($result = $this->app->database->getHistory('', 0, 1))
|
||||||
{
|
{
|
||||||
if ($url == $result[0]->url)
|
if ($url == reset($result)->url)
|
||||||
{
|
{
|
||||||
$history = false;
|
$history = false;
|
||||||
}
|
}
|
||||||
|
|
@ -649,12 +650,16 @@ class Page
|
||||||
|
|
||||||
if ($h1 = $body->getH1())
|
if ($h1 = $body->getH1())
|
||||||
{
|
{
|
||||||
|
$title = reset(
|
||||||
|
$h1
|
||||||
|
);
|
||||||
|
|
||||||
$this->app->setTitle(
|
$this->app->setTitle(
|
||||||
$h1[0]
|
$title
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->setTitle(
|
$this->setTitle(
|
||||||
$h1[0]
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue