summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cca1e1f)
Fix facebook texts merging
//Get doctrine
$doctrine = $this->getDoctrine();
//Get doctrine
$doctrine = $this->getDoctrine();
+ //Set locale
+ $locale = $request->getLocale();
+
- $session = $doctrine->getRepository(Session::class)->fetchOneById($id, $request->getLocale());
+ $session = $doctrine->getRepository(Session::class)->fetchOneById($id, $locale);
$this->context['page']['section'] = $this->translator->trans($session['l_title']);
//Set localization date formater
$this->context['page']['section'] = $this->translator->trans($session['l_title']);
//Set localization date formater
- $intlDate = new \IntlDateFormatter($this->locale, \IntlDateFormatter::TRADITIONAL, \IntlDateFormatter::NONE);
+ $intlDate = new \IntlDateFormatter($locale, \IntlDateFormatter::TRADITIONAL, \IntlDateFormatter::NONE);
//Set localization time formater
//Set localization time formater
- $intlTime = new \IntlDateFormatter($this->locale, \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT);
+ $intlTime = new \IntlDateFormatter($locale, \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT);
- $this->facebookImage = [
- //XXX: was facebook/<controller>/<action>/<id>.<locale>.jpeg
- //XXX: format facebook<pathinfo>.<locale>.jpeg
- #'destination' => 'facebook/session/view/'.$id.'.'.$locale.'.jpeg',
+ $this->context['facebook'] += [
'texts' => [
$session['au_pseudonym'] => [
'font' => 'irishgrover',
'texts' => [
$session['au_pseudonym'] => [
'font' => 'irishgrover',
//Fetch doctrine
$doctrine = $this->getDoctrine();
//Fetch doctrine
$doctrine = $this->getDoctrine();
+ //Set locale
+ $locale = $request->getLocale();
+
- if (empty($session = $doctrine->getRepository(Session::class)->fetchOneById($id, $this->locale))) {
+ if (empty($session = $doctrine->getRepository(Session::class)->fetchOneById($id, $locale))) {
throw $this->createNotFoundException($this->translator->trans('Unable to find session: %id%', ['%id%' => $id]));
}
throw $this->createNotFoundException($this->translator->trans('Unable to find session: %id%', ['%id%' => $id]));
}
}
//Set localization date formater
}
//Set localization date formater
- $intl = new \IntlDateFormatter($this->locale, \IntlDateFormatter::GREGORIAN, \IntlDateFormatter::SHORT);
+ $intl = new \IntlDateFormatter($locale, \IntlDateFormatter::GREGORIAN, \IntlDateFormatter::SHORT);
//Set section
$this->context['page']['section'] = $this->translator->trans($session['l_title']);
//Set section
$this->context['page']['section'] = $this->translator->trans($session['l_title']);
];
//Set localization date formater
];
//Set localization date formater
- $intlDate = new \IntlDateFormatter($this->locale, \IntlDateFormatter::TRADITIONAL, \IntlDateFormatter::NONE);
+ $intlDate = new \IntlDateFormatter($locale, \IntlDateFormatter::TRADITIONAL, \IntlDateFormatter::NONE);
//Set localization time formater
//Set localization time formater
- $intlTime = new \IntlDateFormatter($this->locale, \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT);
+ $intlTime = new \IntlDateFormatter($locale, \IntlDateFormatter::NONE, \IntlDateFormatter::SHORT);
- $this->facebookImage = [
- //XXX: was facebook/<controller>/<action>/<id>.<locale>.jpeg
- //XXX: format facebook<pathinfo>.<locale>.jpeg
- #'destination' => 'facebook/session/view/'.$id.'.'.$this->locale.'.jpeg',
+ $this->context['facebook'] = [
'texts' => [
$session['au_pseudonym'] => [
'font' => 'irishgrover',
'texts' => [
$session['au_pseudonym'] => [
'font' => 'irishgrover',
]
],
'updated' => $session['updated']->format('U')
]
],
'updated' => $session['updated']->format('U')
+ ]+$this->context['facebook'];
//With granted session
if (!empty($session['au_id'])) {
//With granted session
if (!empty($session['au_id'])) {