mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 07:16:51 +02:00
Fix issue processwire/processwire-issues#1999
This commit is contained in:
@@ -193,8 +193,8 @@ abstract class AdminThemeFramework extends AdminTheme {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function getHeadline() {
|
public function getHeadline() {
|
||||||
$headline = $this->wire('processHeadline');
|
$headline = (string) $this->wire('processHeadline');
|
||||||
if(!$headline) $headline = $this->wire()->page->get('title|name');
|
if(!strlen($headline)) $headline = $this->wire()->page->get('title|name');
|
||||||
if($headline !== 'en' && $this->wire()->languages) $headline = $this->_($headline);
|
if($headline !== 'en' && $this->wire()->languages) $headline = $this->_($headline);
|
||||||
return $this->sanitizer->entities1($headline);
|
return $this->sanitizer->entities1($headline);
|
||||||
}
|
}
|
||||||
|
@@ -3345,14 +3345,14 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
|
|||||||
} else {
|
} else {
|
||||||
$title = (string) $title;
|
$title = (string) $title;
|
||||||
}
|
}
|
||||||
if(empty($title)) {
|
if(!strlen("$title")) {
|
||||||
if($this->pages->names()->isUntitledPageName($page->name)) {
|
if($this->pages->names()->isUntitledPageName($page->name)) {
|
||||||
$title = $page->template->getLabel();
|
$title = $page->template->getLabel();
|
||||||
} else {
|
} else {
|
||||||
$title = $page->get('name');
|
$title = $page->get('name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(empty($title)) $title = $page->name;
|
if(!strlen("$title")) $title = $page->name;
|
||||||
} else if($this->parent && $this->parent->id) {
|
} else if($this->parent && $this->parent->id) {
|
||||||
$titlePage = $this->parent;
|
$titlePage = $this->parent;
|
||||||
$title = rtrim($this->parent->path, '/') . '/[...]';
|
$title = rtrim($this->parent->path, '/') . '/[...]';
|
||||||
@@ -3380,7 +3380,7 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
|
|||||||
$headline = $titlePage->get('title|name');
|
$headline = $titlePage->get('title|name');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(empty($headline)) $headline = $title;
|
if(!strlen("$headline")) $headline = $title;
|
||||||
|
|
||||||
$this->headline($headline);
|
$this->headline($headline);
|
||||||
$this->browserTitle($browserTitle);
|
$this->browserTitle($browserTitle);
|
||||||
|
Reference in New Issue
Block a user