1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-09 10:22:51 +03:00

Updated existing image tests to reflect changes

- Also added some new tests
This commit is contained in:
Dan Brown
2019-05-04 18:11:00 +01:00
parent 79f6dc00a3
commit 8c190324ac
7 changed files with 146 additions and 92 deletions

View File

@@ -762,7 +762,7 @@ class EntityRepo
*/
public function searchForImage($imageString)
{
$pages = $this->entityQuery('page')->where('html', 'like', '%' . $imageString . '%')->get();
$pages = $this->entityQuery('page')->where('html', 'like', '%' . $imageString . '%')->get(['id', 'name', 'slug', 'book_id']);
foreach ($pages as $page) {
$page->url = $page->getUrl();
$page->html = '';