Skip to content

Commit

Permalink
Fix for returning to default locale from other locale via localeswitcher
Browse files Browse the repository at this point in the history
  • Loading branch information
SvanteRichter committed Mar 18, 2016
1 parent 83ac106 commit 0c09b7c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ public function getSlugFromLocale($content, $locale)
if(isset($slug['value'])){
return $slug['value'];
}
if(isset($content->delocalizedValues['slug'])){
return $content->delocalizedValues['slug'];
if(isset($content->values['delocalizedValues']['slug'])){
return $content->values['delocalizedValues']['slug'];
}
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Content/LocalizedContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function ($e) use ($currentLocale) {
$stmt->execute();
$values['delocalizedValues'] = array();
while ($row = $stmt->fetch()) {
$values['delocalizedValues'][$row['field']] = $this->values[$row['field']];
$this->values['delocalizedValues'][$row['field']] = $values[$row['field']];
$values[$row['field']] = $row['value'];
}
}
Expand Down

0 comments on commit 0c09b7c

Please sign in to comment.