Compare commits

..

7 Commits

Author SHA1 Message Date
Dan Brown
5d3264bc63 Updated assets for release v0.14.2 2017-02-01 22:27:04 +00:00
Dan Brown
d71f819f95 Merge branch 'v0.14' into release 2017-02-01 22:22:38 +00:00
Dan Brown
80f844139c Fixed missing subscript styling
Closes #284
2017-02-01 22:20:44 +00:00
Dan Brown
9eecaea31a Attempt to fix bookchildren and user getThumb
Hopefully Fixes #292 and #294 and #287
2017-02-01 22:16:32 +00:00
Dan Brown
ee13509760 Updated version number 2017-01-23 22:28:31 +00:00
Dan Brown
82d7bb1f32 Merge branch 'master' into release 2017-01-23 22:28:02 +00:00
Dan Brown
492e2f173e Fixed error causing permissions to be deleted on book sort
Closes #282
2017-01-23 22:27:11 +00:00
9 changed files with 22 additions and 14 deletions

View File

@@ -208,7 +208,7 @@ class BookController extends Controller
}
// Update permissions on changed models
$this->entityRepo->buildJointPermissions($updatedModels);
if (count($updatedModels) === 0) $this->entityRepo->buildJointPermissions($updatedModels);
return redirect($book->getUrl());
}

View File

@@ -332,12 +332,12 @@ class EntityRepo
$parents[$key] = $entities[$index];
$parents[$key]->setAttribute('pages', collect());
}
if ($entities[$index]->chapter_id === 0) $tree[] = $entities[$index];
if ($entities[$index]->chapter_id === 0 || $entities[$index]->chapter_id === '0') $tree[] = $entities[$index];
$entities[$index]->book = $book;
}
foreach ($entities as $entity) {
if ($entity->chapter_id === 0) continue;
if ($entity->chapter_id === 0 || $entity->chapter_id === '0') continue;
$parentKey = 'BookStack\\Chapter:' . $entity->chapter_id;
$chapter = $parents[$parentKey];
$chapter->pages->push($entity);

View File

@@ -243,13 +243,14 @@ class PermissionService
*/
protected function deleteManyJointPermissionsForEntities($entities)
{
if (count($entities) === 0) return;
$query = $this->jointPermission->newQuery();
foreach ($entities as $entity) {
$query->orWhere(function($query) use ($entity) {
$query->where('entity_id', '=', $entity->id)
->where('entity_type', '=', $entity->getMorphClass());
});
}
foreach ($entities as $entity) {
$query->orWhere(function($query) use ($entity) {
$query->where('entity_id', '=', $entity->id)
->where('entity_type', '=', $entity->getMorphClass());
});
}
$query->delete();
}

View File

@@ -165,7 +165,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
if ($imageId === 0 || $imageId === '0' || $imageId === null) return $default;
try {
$avatar = baseUrl($this->avatar->getThumb($size, $size, false));
$avatar = $this->avatar ? baseUrl($this->avatar->getThumb($size, $size, false)) : $default;
} catch (\Exception $err) {
$avatar = $default;
}

View File

@@ -47,7 +47,9 @@
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
"php artisan optimize",
"php artisan cache:clear",
"php artisan view:clear"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -119,6 +119,11 @@ sup, .superscript {
font-size: 0.8em;
}
sub, .subscript {
vertical-align: sub;
font-size: 0.8em;
}
pre {
font-family: monospace;
white-space:pre;

View File

@@ -1 +1 @@
v0.14.0
v0.14.2