mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Ran phpcbf
This commit is contained in:
parent
adc866cb3d
commit
3f83c548f8
@ -37,7 +37,6 @@ class EntityContextManager
|
|||||||
if ($shelf && $shelf->contains($book)) {
|
if ($shelf && $shelf->contains($book)) {
|
||||||
return $shelf;
|
return $shelf;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -58,5 +57,4 @@ class EntityContextManager
|
|||||||
{
|
{
|
||||||
$this->session->forget($this->KEY_SHELF_CONTEXT_ID);
|
$this->session->forget($this->KEY_SHELF_CONTEXT_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -62,5 +62,4 @@ class PageRevision extends Model
|
|||||||
{
|
{
|
||||||
return $type === 'revision';
|
return $type === 'revision';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,5 +85,4 @@ class DrawioImageController extends Controller
|
|||||||
'content' => base64_encode($imageData)
|
'content' => base64_encode($imageData)
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,5 +61,4 @@ class GalleryImageController extends Controller
|
|||||||
|
|
||||||
return response()->json($image);
|
return response()->json($image);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -368,5 +368,4 @@ class UserController extends Controller
|
|||||||
|
|
||||||
return redirect()->back(302, [], "/settings/users/$userId");
|
return redirect()->back(302, [], "/settings/users/$userId");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,7 @@ class ImageRepo
|
|||||||
ImageService $imageService,
|
ImageService $imageService,
|
||||||
PermissionService $permissionService,
|
PermissionService $permissionService,
|
||||||
Page $page
|
Page $page
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$this->image = $image;
|
$this->image = $image;
|
||||||
$this->imageService = $imageService;
|
$this->imageService = $imageService;
|
||||||
$this->restrictionService = $permissionService;
|
$this->restrictionService = $permissionService;
|
||||||
@ -87,8 +86,7 @@ class ImageRepo
|
|||||||
int $uploadedTo = null,
|
int $uploadedTo = null,
|
||||||
string $search = null,
|
string $search = null,
|
||||||
callable $whereClause = null
|
callable $whereClause = null
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$imageQuery = $this->image->newQuery()->where('type', '=', strtolower($type));
|
$imageQuery = $this->image->newQuery()->where('type', '=', strtolower($type));
|
||||||
|
|
||||||
if ($uploadedTo !== null) {
|
if ($uploadedTo !== null) {
|
||||||
@ -126,8 +124,7 @@ class ImageRepo
|
|||||||
int $pageSize = 24,
|
int $pageSize = 24,
|
||||||
int $uploadedTo = null,
|
int $uploadedTo = null,
|
||||||
string $search = null
|
string $search = null
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$contextPage = $this->page->findOrFail($uploadedTo);
|
$contextPage = $this->page->findOrFail($uploadedTo);
|
||||||
$parentFilter = null;
|
$parentFilter = null;
|
||||||
|
|
||||||
|
@ -73,8 +73,7 @@ class ImageService extends UploadService
|
|||||||
int $resizeWidth = null,
|
int $resizeWidth = null,
|
||||||
int $resizeHeight = null,
|
int $resizeHeight = null,
|
||||||
bool $keepRatio = true
|
bool $keepRatio = true
|
||||||
)
|
) {
|
||||||
{
|
|
||||||
$imageName = $uploadedFile->getClientOriginalName();
|
$imageName = $uploadedFile->getClientOriginalName();
|
||||||
$imageData = file_get_contents($uploadedFile->getRealPath());
|
$imageData = file_get_contents($uploadedFile->getRealPath());
|
||||||
|
|
||||||
|
@ -52,7 +52,8 @@ function signedInUser() : bool
|
|||||||
* Check if the current user has general access.
|
* Check if the current user has general access.
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function hasAppAccess() : bool {
|
function hasAppAccess() : bool
|
||||||
|
{
|
||||||
return !auth()->guest() || setting('app-public');
|
return !auth()->guest() || setting('app-public');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user