Skip to content

Commit 1573677

Browse files
committed
Merge branch 'master' into release
2 parents 75915e8 + 0c4ddf1 commit 1573677

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1739
-97
lines changed

app/Http/Controllers/PageController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ public function show($bookSlug, $pageSlug)
158158

159159
$this->checkOwnablePermission('page-view', $page);
160160

161-
$pageContent = $this->entityRepo->renderPage($page);
161+
$page->html = $this->entityRepo->renderPage($page);
162162
$sidebarTree = $this->entityRepo->getBookChildren($page->book);
163-
$pageNav = $this->entityRepo->getPageNav($pageContent);
163+
$pageNav = $this->entityRepo->getPageNav($page->html);
164164
$page->load(['comments.createdBy']);
165165

166166
Views::add($page);
@@ -441,6 +441,7 @@ public function restoreRevision($bookSlug, $pageSlug, $revisionId)
441441
public function exportPdf($bookSlug, $pageSlug)
442442
{
443443
$page = $this->entityRepo->getBySlug('page', $pageSlug, $bookSlug);
444+
$page->html = $this->entityRepo->renderPage($page);
444445
$pdfContent = $this->exportService->pageToPdf($page);
445446
return response()->make($pdfContent, 200, [
446447
'Content-Type' => 'application/octet-stream',
@@ -457,6 +458,7 @@ public function exportPdf($bookSlug, $pageSlug)
457458
public function exportHtml($bookSlug, $pageSlug)
458459
{
459460
$page = $this->entityRepo->getBySlug('page', $pageSlug, $bookSlug);
461+
$page->html = $this->entityRepo->renderPage($page);
460462
$containedHtml = $this->exportService->pageToContainedHtml($page);
461463
return response()->make($containedHtml, 200, [
462464
'Content-Type' => 'application/octet-stream',

app/Repos/EntityRepo.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,6 @@ public function renderPage(Page $page, $ignorePermissions = false)
716716
$content = str_replace($matches[0][$index], trim($innerContent), $content);
717717
}
718718

719-
$page->setAttribute('renderedHTML', $content);
720719
return $content;
721720
}
722721

app/Services/SocialAuthService.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public function handleLoginCallback($socialDriver)
104104
// When a user is not logged in and a matching SocialAccount exists,
105105
// Simply log the user into the application.
106106
if (!$isLoggedIn && $socialAccount !== null) {
107-
return $this->logUserIn($socialAccount->user);
107+
auth()->login($socialAccount->user);
108+
return redirect()->intended('/');
108109
}
109110

110111
// When a user is logged in but the social account does not exist,
@@ -137,13 +138,6 @@ public function handleLoginCallback($socialDriver)
137138
throw new SocialSignInException($message . '.', '/login');
138139
}
139140

140-
141-
private function logUserIn($user)
142-
{
143-
auth()->login($user);
144-
return redirect('/');
145-
}
146-
147141
/**
148142
* Ensure the social driver is correct and supported.
149143
*

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
*/
5959

6060
'locale' => env('APP_LANG', 'en'),
61-
'locales' => ['en', 'de', 'es', 'fr', 'nl', 'pt_BR', 'sk', 'ja', 'pl', 'it'],
61+
'locales' => ['en', 'de', 'es', 'es_AR', 'fr', 'nl', 'pt_BR', 'sk', 'ja', 'pl', 'it', 'ru'],
6262

6363
/*
6464
|--------------------------------------------------------------------------

public/libs/tinymce/plugins/advlist/plugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/libs/tinymce/plugins/autolink/plugin.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)