mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-25 02:02:57 +01:00
Always set correct page language
This commit is contained in:
parent
413fbc13c5
commit
5fc85651ae
@ -433,6 +433,11 @@ class Pages extends AbstractController
|
|||||||
// Update page with the new data
|
// Update page with the new data
|
||||||
$page->reload();
|
$page->reload();
|
||||||
|
|
||||||
|
// Set correct page language if it has changed
|
||||||
|
if ($language !== $page->language()) {
|
||||||
|
$page->setLanguage($language);
|
||||||
|
}
|
||||||
|
|
||||||
// Check if page number has to change
|
// Check if page number has to change
|
||||||
if (!empty($page->date()) && $page->template()->scheme()->get('num') === 'date') {
|
if (!empty($page->date()) && $page->template()->scheme()->get('num') === 'date') {
|
||||||
if ($page->num() !== (int) $page->date(self::DATE_NUM_FORMAT)) {
|
if ($page->num() !== (int) $page->date(self::DATE_NUM_FORMAT)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user