]> BookStack Code Mirror - bookstack/commitdiff
Merge branch 'v0.14'
authorDan Brown <redacted>
Wed, 1 Feb 2017 22:28:38 +0000 (22:28 +0000)
committerDan Brown <redacted>
Wed, 1 Feb 2017 22:28:38 +0000 (22:28 +0000)
app/Repos/EntityRepo.php
app/User.php
composer.json
resources/assets/sass/_text.scss

index f1428735cc340149a3c33d0d3ed76e298cfe7f63..8a8740d76cf6cf18faf5a9163e2f75bb0b4d5a79 100644 (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);
index afcd9af70c4f8094cea9fa52c9bfc0eaefa43068..8033557e4cb9a0a048c1d7112c90f84dc4e4bf70 100644 (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;
         }
index c0543a4cad4b896cb17aa3af357c07a4b1ebf09a..f0cf9c4ae03b9b81a514e101c43fff3ee79a7f97 100644 (file)
@@ -49,7 +49,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",
index 74eb6875af6e23ff092c5296507b73b4dc71d5ff..aac4298ea96384d2367616f86309e2c6b8b929a7 100644 (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;