/**
* Get any editor clash warning messages to show for the given draft revision.
+ *
* @param PageRevision|Page $draft
+ *
* @return string[]
*/
public function getWarningMessagesForDraft($draft): array
use BookStack\Actions\View;
use BookStack\Entities\Models\Page;
-use BookStack\Entities\Models\PageRevision;
use BookStack\Entities\Repos\PageRepo;
use BookStack\Entities\Tools\BookContents;
use BookStack\Entities\Tools\NextPreviousContentLocator;
namespace BookStack\Http;
-use BookStack\Http\Middleware\PreventAuthenticatedResponseCaching;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
/**
* Handle an incoming request.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
+ *
* @return mixed
*/
public function handle($request, Closure $next)
/**
* Store a new attachment upon user upload.
+ *
* @throws FileUploadException
*/
public function saveNewUpload(UploadedFile $uploadedFile, int $page_id): Attachment
/**
* Delete a File from the database and storage.
+ *
* @throws Exception
*/
public function deleteFile(Attachment $attachment)
/**
* Store a file in storage with the given filename.
+ *
* @throws FileUploadException
*/
protected function putFileInStorage(UploadedFile $uploadedFile): string
public function getImageData(Image $image): string
{
$storage = $this->getStorage();
+
return $storage->get($this->adjustPathForStorageDisk($image->path, $image->type));
}
]);
}
-
-
public function test_draft_pages_show_on_homepage()
{
/** @var Book $book */