Showing
69 changed files
with
195 additions
and
195 deletions
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -32,7 +32,7 @@ class Activity extends Model | ... | @@ -32,7 +32,7 @@ class Activity extends Model |
| 32 | */ | 32 | */ |
| 33 | public function user() | 33 | public function user() |
| 34 | { | 34 | { |
| 35 | - return $this->belongsTo('Oxbow\User'); | 35 | + return $this->belongsTo('BookStack\User'); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | /** | 38 | /** | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | class Book extends Entity | 5 | class Book extends Entity |
| 6 | { | 6 | { |
| ... | @@ -19,12 +19,12 @@ class Book extends Entity | ... | @@ -19,12 +19,12 @@ class Book extends Entity |
| 19 | 19 | ||
| 20 | public function pages() | 20 | public function pages() |
| 21 | { | 21 | { |
| 22 | - return $this->hasMany('Oxbow\Page'); | 22 | + return $this->hasMany('BookStack\Page'); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | public function chapters() | 25 | public function chapters() |
| 26 | { | 26 | { |
| 27 | - return $this->hasMany('Oxbow\Chapter'); | 27 | + return $this->hasMany('BookStack\Chapter'); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | public function children() | 30 | public function children() | ... | ... |
| 1 | -<?php namespace Oxbow; | 1 | +<?php namespace BookStack; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | class Chapter extends Entity | 4 | class Chapter extends Entity |
| ... | @@ -8,12 +8,12 @@ class Chapter extends Entity | ... | @@ -8,12 +8,12 @@ class Chapter extends Entity |
| 8 | 8 | ||
| 9 | public function book() | 9 | public function book() |
| 10 | { | 10 | { |
| 11 | - return $this->belongsTo('Oxbow\Book'); | 11 | + return $this->belongsTo('BookStack\Book'); |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | public function pages() | 14 | public function pages() |
| 15 | { | 15 | { |
| 16 | - return $this->hasMany('Oxbow\Page')->orderBy('priority', 'ASC'); | 16 | + return $this->hasMany('BookStack\Page')->orderBy('priority', 'ASC'); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | public function getUrl() | 19 | public function getUrl() | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Console; | 3 | +namespace BookStack\Console; |
| 4 | 4 | ||
| 5 | use Illuminate\Console\Scheduling\Schedule; | 5 | use Illuminate\Console\Scheduling\Schedule; |
| 6 | use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | 6 | use Illuminate\Foundation\Console\Kernel as ConsoleKernel; |
| ... | @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel | ... | @@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel |
| 13 | * @var array | 13 | * @var array |
| 14 | */ | 14 | */ |
| 15 | protected $commands = [ | 15 | protected $commands = [ |
| 16 | - \Oxbow\Console\Commands\Inspire::class, | 16 | + \BookStack\Console\Commands\Inspire::class, |
| 17 | ]; | 17 | ]; |
| 18 | 18 | ||
| 19 | /** | 19 | /** | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -10,6 +10,6 @@ class EmailConfirmation extends Model | ... | @@ -10,6 +10,6 @@ class EmailConfirmation extends Model |
| 10 | 10 | ||
| 11 | public function user() | 11 | public function user() |
| 12 | { | 12 | { |
| 13 | - return $this->belongsTo('Oxbow\User'); | 13 | + return $this->belongsTo('BookStack\User'); |
| 14 | } | 14 | } |
| 15 | } | 15 | } | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -12,7 +12,7 @@ abstract class Entity extends Model | ... | @@ -12,7 +12,7 @@ abstract class Entity extends Model |
| 12 | */ | 12 | */ |
| 13 | public function createdBy() | 13 | public function createdBy() |
| 14 | { | 14 | { |
| 15 | - return $this->belongsTo('Oxbow\User', 'created_by'); | 15 | + return $this->belongsTo('BookStack\User', 'created_by'); |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | /** | 18 | /** |
| ... | @@ -21,7 +21,7 @@ abstract class Entity extends Model | ... | @@ -21,7 +21,7 @@ abstract class Entity extends Model |
| 21 | */ | 21 | */ |
| 22 | public function updatedBy() | 22 | public function updatedBy() |
| 23 | { | 23 | { |
| 24 | - return $this->belongsTo('Oxbow\User', 'updated_by'); | 24 | + return $this->belongsTo('BookStack\User', 'updated_by'); |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | /** | 27 | /** |
| ... | @@ -41,7 +41,7 @@ abstract class Entity extends Model | ... | @@ -41,7 +41,7 @@ abstract class Entity extends Model |
| 41 | */ | 41 | */ |
| 42 | public function activity() | 42 | public function activity() |
| 43 | { | 43 | { |
| 44 | - return $this->morphMany('Oxbow\Activity', 'entity')->orderBy('created_at', 'desc'); | 44 | + return $this->morphMany('BookStack\Activity', 'entity')->orderBy('created_at', 'desc'); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | /** | 47 | /** | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers\Auth; | 3 | +namespace BookStack\Http\Controllers\Auth; |
| 4 | 4 | ||
| 5 | use Illuminate\Http\Request; | 5 | use Illuminate\Http\Request; |
| 6 | -use Oxbow\Exceptions\SocialSignInException; | 6 | +use BookStack\Exceptions\SocialSignInException; |
| 7 | -use Oxbow\Exceptions\UserRegistrationException; | 7 | +use BookStack\Exceptions\UserRegistrationException; |
| 8 | -use Oxbow\Repos\UserRepo; | 8 | +use BookStack\Repos\UserRepo; |
| 9 | -use Oxbow\Services\EmailConfirmationService; | 9 | +use BookStack\Services\EmailConfirmationService; |
| 10 | -use Oxbow\Services\SocialAuthService; | 10 | +use BookStack\Services\SocialAuthService; |
| 11 | -use Oxbow\SocialAccount; | 11 | +use BookStack\SocialAccount; |
| 12 | use Validator; | 12 | use Validator; |
| 13 | -use Oxbow\Http\Controllers\Controller; | 13 | +use BookStack\Http\Controllers\Controller; |
| 14 | use Illuminate\Foundation\Auth\ThrottlesLogins; | 14 | use Illuminate\Foundation\Auth\ThrottlesLogins; |
| 15 | use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; | 15 | use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; |
| 16 | 16 | ||
| ... | @@ -131,7 +131,7 @@ class AuthController extends Controller | ... | @@ -131,7 +131,7 @@ class AuthController extends Controller |
| 131 | * @param bool|false|SocialAccount $socialAccount | 131 | * @param bool|false|SocialAccount $socialAccount |
| 132 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector | 132 | * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector |
| 133 | * @throws UserRegistrationException | 133 | * @throws UserRegistrationException |
| 134 | - * @throws \Oxbow\Exceptions\ConfirmationEmailException | 134 | + * @throws \BookStack\Exceptions\ConfirmationEmailException |
| 135 | */ | 135 | */ |
| 136 | protected function registerUser(array $userData, $socialAccount = false) | 136 | protected function registerUser(array $userData, $socialAccount = false) |
| 137 | { | 137 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers\Auth; | 3 | +namespace BookStack\Http\Controllers\Auth; |
| 4 | 4 | ||
| 5 | -use Oxbow\Http\Controllers\Controller; | 5 | +use BookStack\Http\Controllers\Controller; |
| 6 | use Illuminate\Foundation\Auth\ResetsPasswords; | 6 | use Illuminate\Foundation\Auth\ResetsPasswords; |
| 7 | 7 | ||
| 8 | class PasswordController extends Controller | 8 | class PasswordController extends Controller | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Activity; | 5 | use Activity; |
| 6 | use Illuminate\Http\Request; | 6 | use Illuminate\Http\Request; |
| 7 | 7 | ||
| 8 | use Illuminate\Support\Facades\Auth; | 8 | use Illuminate\Support\Facades\Auth; |
| 9 | use Illuminate\Support\Str; | 9 | use Illuminate\Support\Str; |
| 10 | -use Oxbow\Http\Requests; | 10 | +use BookStack\Http\Requests; |
| 11 | -use Oxbow\Repos\BookRepo; | 11 | +use BookStack\Repos\BookRepo; |
| 12 | -use Oxbow\Repos\ChapterRepo; | 12 | +use BookStack\Repos\ChapterRepo; |
| 13 | -use Oxbow\Repos\PageRepo; | 13 | +use BookStack\Repos\PageRepo; |
| 14 | 14 | ||
| 15 | class BookController extends Controller | 15 | class BookController extends Controller |
| 16 | { | 16 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Activity; | 5 | use Activity; |
| 6 | use Illuminate\Http\Request; | 6 | use Illuminate\Http\Request; |
| 7 | 7 | ||
| 8 | use Illuminate\Support\Facades\Auth; | 8 | use Illuminate\Support\Facades\Auth; |
| 9 | -use Oxbow\Http\Requests; | 9 | +use BookStack\Http\Requests; |
| 10 | -use Oxbow\Http\Controllers\Controller; | 10 | +use BookStack\Http\Controllers\Controller; |
| 11 | -use Oxbow\Repos\BookRepo; | 11 | +use BookStack\Repos\BookRepo; |
| 12 | -use Oxbow\Repos\ChapterRepo; | 12 | +use BookStack\Repos\ChapterRepo; |
| 13 | 13 | ||
| 14 | class ChapterController extends Controller | 14 | class ChapterController extends Controller |
| 15 | { | 15 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use HttpRequestException; | 5 | use HttpRequestException; |
| 6 | use Illuminate\Foundation\Bus\DispatchesJobs; | 6 | use Illuminate\Foundation\Bus\DispatchesJobs; |
| ... | @@ -9,7 +9,7 @@ use Illuminate\Routing\Controller as BaseController; | ... | @@ -9,7 +9,7 @@ use Illuminate\Routing\Controller as BaseController; |
| 9 | use Illuminate\Foundation\Validation\ValidatesRequests; | 9 | use Illuminate\Foundation\Validation\ValidatesRequests; |
| 10 | use Illuminate\Support\Facades\Auth; | 10 | use Illuminate\Support\Facades\Auth; |
| 11 | use Illuminate\Support\Facades\Session; | 11 | use Illuminate\Support\Facades\Session; |
| 12 | -use Oxbow\User; | 12 | +use BookStack\User; |
| 13 | 13 | ||
| 14 | abstract class Controller extends BaseController | 14 | abstract class Controller extends BaseController |
| 15 | { | 15 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Illuminate\Http\Request; | 5 | use Illuminate\Http\Request; |
| 6 | 6 | ||
| 7 | -use Oxbow\Http\Requests; | 7 | +use BookStack\Http\Requests; |
| 8 | -use Oxbow\Http\Controllers\Controller; | 8 | +use BookStack\Http\Controllers\Controller; |
| 9 | -use Oxbow\Repos\BookRepo; | 9 | +use BookStack\Repos\BookRepo; |
| 10 | -use Oxbow\Services\ActivityService; | 10 | +use BookStack\Services\ActivityService; |
| 11 | -use Oxbow\Services\Facades\Activity; | 11 | +use BookStack\Services\Facades\Activity; |
| 12 | 12 | ||
| 13 | class HomeController extends Controller | 13 | class HomeController extends Controller |
| 14 | { | 14 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Illuminate\Filesystem\Filesystem as File; | 5 | use Illuminate\Filesystem\Filesystem as File; |
| 6 | use Illuminate\Http\Request; | 6 | use Illuminate\Http\Request; |
| 7 | use Illuminate\Support\Facades\Auth; | 7 | use Illuminate\Support\Facades\Auth; |
| 8 | use Intervention\Image\Facades\Image as ImageTool; | 8 | use Intervention\Image\Facades\Image as ImageTool; |
| 9 | use Illuminate\Support\Facades\DB; | 9 | use Illuminate\Support\Facades\DB; |
| 10 | -use Oxbow\Http\Requests; | 10 | +use BookStack\Http\Requests; |
| 11 | -use Oxbow\Image; | 11 | +use BookStack\Image; |
| 12 | -use Oxbow\Repos\PageRepo; | 12 | +use BookStack\Repos\PageRepo; |
| 13 | 13 | ||
| 14 | class ImageController extends Controller | 14 | class ImageController extends Controller |
| 15 | { | 15 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Activity; | 5 | use Activity; |
| 6 | use Illuminate\Http\Request; | 6 | use Illuminate\Http\Request; |
| 7 | 7 | ||
| 8 | use Illuminate\Support\Facades\Auth; | 8 | use Illuminate\Support\Facades\Auth; |
| 9 | -use Oxbow\Http\Requests; | 9 | +use BookStack\Http\Requests; |
| 10 | -use Oxbow\Repos\BookRepo; | 10 | +use BookStack\Repos\BookRepo; |
| 11 | -use Oxbow\Repos\ChapterRepo; | 11 | +use BookStack\Repos\ChapterRepo; |
| 12 | -use Oxbow\Repos\PageRepo; | 12 | +use BookStack\Repos\PageRepo; |
| 13 | 13 | ||
| 14 | class PageController extends Controller | 14 | class PageController extends Controller |
| 15 | { | 15 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Illuminate\Http\Request; | 5 | use Illuminate\Http\Request; |
| 6 | 6 | ||
| 7 | -use Oxbow\Http\Requests; | 7 | +use BookStack\Http\Requests; |
| 8 | -use Oxbow\Http\Controllers\Controller; | 8 | +use BookStack\Http\Controllers\Controller; |
| 9 | -use Oxbow\Repos\BookRepo; | 9 | +use BookStack\Repos\BookRepo; |
| 10 | -use Oxbow\Repos\ChapterRepo; | 10 | +use BookStack\Repos\ChapterRepo; |
| 11 | -use Oxbow\Repos\PageRepo; | 11 | +use BookStack\Repos\PageRepo; |
| 12 | 12 | ||
| 13 | class SearchController extends Controller | 13 | class SearchController extends Controller |
| 14 | { | 14 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Illuminate\Http\Request; | 5 | use Illuminate\Http\Request; |
| 6 | 6 | ||
| 7 | -use Oxbow\Http\Requests; | 7 | +use BookStack\Http\Requests; |
| 8 | -use Oxbow\Http\Controllers\Controller; | 8 | +use BookStack\Http\Controllers\Controller; |
| 9 | use Setting; | 9 | use Setting; |
| 10 | 10 | ||
| 11 | class SettingController extends Controller | 11 | class SettingController extends Controller | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Controllers; | 3 | +namespace BookStack\Http\Controllers; |
| 4 | 4 | ||
| 5 | use Illuminate\Http\Request; | 5 | use Illuminate\Http\Request; |
| 6 | 6 | ||
| 7 | use Illuminate\Support\Facades\Hash; | 7 | use Illuminate\Support\Facades\Hash; |
| 8 | -use Oxbow\Http\Requests; | 8 | +use BookStack\Http\Requests; |
| 9 | -use Oxbow\Repos\UserRepo; | 9 | +use BookStack\Repos\UserRepo; |
| 10 | -use Oxbow\Services\SocialAuthService; | 10 | +use BookStack\Services\SocialAuthService; |
| 11 | -use Oxbow\User; | 11 | +use BookStack\User; |
| 12 | 12 | ||
| 13 | class UserController extends Controller | 13 | class UserController extends Controller |
| 14 | { | 14 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http; | 3 | +namespace BookStack\Http; |
| 4 | 4 | ||
| 5 | use Illuminate\Foundation\Http\Kernel as HttpKernel; | 5 | use Illuminate\Foundation\Http\Kernel as HttpKernel; |
| 6 | 6 | ||
| ... | @@ -13,11 +13,11 @@ class Kernel extends HttpKernel | ... | @@ -13,11 +13,11 @@ class Kernel extends HttpKernel |
| 13 | */ | 13 | */ |
| 14 | protected $middleware = [ | 14 | protected $middleware = [ |
| 15 | \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, | 15 | \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, |
| 16 | - \Oxbow\Http\Middleware\EncryptCookies::class, | 16 | + \BookStack\Http\Middleware\EncryptCookies::class, |
| 17 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | 17 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
| 18 | \Illuminate\Session\Middleware\StartSession::class, | 18 | \Illuminate\Session\Middleware\StartSession::class, |
| 19 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, | 19 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, |
| 20 | - \Oxbow\Http\Middleware\VerifyCsrfToken::class, | 20 | + \BookStack\Http\Middleware\VerifyCsrfToken::class, |
| 21 | ]; | 21 | ]; |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| ... | @@ -26,9 +26,9 @@ class Kernel extends HttpKernel | ... | @@ -26,9 +26,9 @@ class Kernel extends HttpKernel |
| 26 | * @var array | 26 | * @var array |
| 27 | */ | 27 | */ |
| 28 | protected $routeMiddleware = [ | 28 | protected $routeMiddleware = [ |
| 29 | - 'auth' => \Oxbow\Http\Middleware\Authenticate::class, | 29 | + 'auth' => \BookStack\Http\Middleware\Authenticate::class, |
| 30 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, | 30 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, |
| 31 | - 'guest' => \Oxbow\Http\Middleware\RedirectIfAuthenticated::class, | 31 | + 'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class, |
| 32 | - 'perm' => \Oxbow\Http\Middleware\PermissionMiddleware::class | 32 | + 'perm' => \BookStack\Http\Middleware\PermissionMiddleware::class |
| 33 | ]; | 33 | ]; |
| 34 | } | 34 | } | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Http\Middleware; | 3 | +namespace BookStack\Http\Middleware; |
| 4 | 4 | ||
| 5 | use Closure; | 5 | use Closure; |
| 6 | use Illuminate\Contracts\Auth\Guard; | 6 | use Illuminate\Contracts\Auth\Guard; |
| 7 | -use Oxbow\Exceptions\UserRegistrationException; | 7 | +use BookStack\Exceptions\UserRegistrationException; |
| 8 | use Setting; | 8 | use Setting; |
| 9 | 9 | ||
| 10 | class Authenticate | 10 | class Authenticate | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -19,12 +19,12 @@ class Page extends Entity | ... | @@ -19,12 +19,12 @@ class Page extends Entity |
| 19 | 19 | ||
| 20 | public function book() | 20 | public function book() |
| 21 | { | 21 | { |
| 22 | - return $this->belongsTo('Oxbow\Book'); | 22 | + return $this->belongsTo('BookStack\Book'); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | public function chapter() | 25 | public function chapter() |
| 26 | { | 26 | { |
| 27 | - return $this->belongsTo('Oxbow\Chapter'); | 27 | + return $this->belongsTo('BookStack\Chapter'); |
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | public function hasChapter() | 30 | public function hasChapter() |
| ... | @@ -35,7 +35,7 @@ class Page extends Entity | ... | @@ -35,7 +35,7 @@ class Page extends Entity |
| 35 | 35 | ||
| 36 | public function revisions() | 36 | public function revisions() |
| 37 | { | 37 | { |
| 38 | - return $this->hasMany('Oxbow\PageRevision')->orderBy('created_at', 'desc'); | 38 | + return $this->hasMany('BookStack\PageRevision')->orderBy('created_at', 'desc'); |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | public function getUrl() | 41 | public function getUrl() | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -10,12 +10,12 @@ class PageRevision extends Model | ... | @@ -10,12 +10,12 @@ class PageRevision extends Model |
| 10 | 10 | ||
| 11 | public function createdBy() | 11 | public function createdBy() |
| 12 | { | 12 | { |
| 13 | - return $this->belongsTo('Oxbow\User', 'created_by'); | 13 | + return $this->belongsTo('BookStack\User', 'created_by'); |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | public function page() | 16 | public function page() |
| 17 | { | 17 | { |
| 18 | - return $this->belongsTo('Oxbow\Page'); | 18 | + return $this->belongsTo('BookStack\Page'); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | public function getUrl() | 21 | public function getUrl() | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -11,6 +11,6 @@ class Permission extends Model | ... | @@ -11,6 +11,6 @@ class Permission extends Model |
| 11 | */ | 11 | */ |
| 12 | public function roles() | 12 | public function roles() |
| 13 | { | 13 | { |
| 14 | - return $this->belongsToMany('Oxbow\Permissions'); | 14 | + return $this->belongsToMany('BookStack\Permissions'); |
| 15 | } | 15 | } |
| 16 | } | 16 | } | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Providers; | 3 | +namespace BookStack\Providers; |
| 4 | 4 | ||
| 5 | use Illuminate\Support\Facades\Auth; | 5 | use Illuminate\Support\Facades\Auth; |
| 6 | use Illuminate\Support\ServiceProvider; | 6 | use Illuminate\Support\ServiceProvider; |
| 7 | -use Oxbow\User; | 7 | +use BookStack\User; |
| 8 | 8 | ||
| 9 | class AppServiceProvider extends ServiceProvider | 9 | class AppServiceProvider extends ServiceProvider |
| 10 | { | 10 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Providers; | 3 | +namespace BookStack\Providers; |
| 4 | 4 | ||
| 5 | use Illuminate\Support\ServiceProvider; | 5 | use Illuminate\Support\ServiceProvider; |
| 6 | -use Oxbow\Services\ActivityService; | 6 | +use BookStack\Services\ActivityService; |
| 7 | -use Oxbow\Services\SettingService; | 7 | +use BookStack\Services\SettingService; |
| 8 | 8 | ||
| 9 | class CustomFacadeProvider extends ServiceProvider | 9 | class CustomFacadeProvider extends ServiceProvider |
| 10 | { | 10 | { |
| ... | @@ -26,12 +26,12 @@ class CustomFacadeProvider extends ServiceProvider | ... | @@ -26,12 +26,12 @@ class CustomFacadeProvider extends ServiceProvider |
| 26 | public function register() | 26 | public function register() |
| 27 | { | 27 | { |
| 28 | $this->app->bind('activity', function() { | 28 | $this->app->bind('activity', function() { |
| 29 | - return new ActivityService($this->app->make('Oxbow\Activity')); | 29 | + return new ActivityService($this->app->make('BookStack\Activity')); |
| 30 | }); | 30 | }); |
| 31 | 31 | ||
| 32 | $this->app->bind('setting', function() { | 32 | $this->app->bind('setting', function() { |
| 33 | return new SettingService( | 33 | return new SettingService( |
| 34 | - $this->app->make('Oxbow\Setting'), | 34 | + $this->app->make('BookStack\Setting'), |
| 35 | $this->app->make('Illuminate\Contracts\Cache\Repository') | 35 | $this->app->make('Illuminate\Contracts\Cache\Repository') |
| 36 | ); | 36 | ); |
| 37 | }); | 37 | }); | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Providers; | 3 | +namespace BookStack\Providers; |
| 4 | 4 | ||
| 5 | use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; | 5 | use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; |
| 6 | use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | 6 | use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
| ... | @@ -13,8 +13,8 @@ class EventServiceProvider extends ServiceProvider | ... | @@ -13,8 +13,8 @@ class EventServiceProvider extends ServiceProvider |
| 13 | * @var array | 13 | * @var array |
| 14 | */ | 14 | */ |
| 15 | protected $listen = [ | 15 | protected $listen = [ |
| 16 | - 'Oxbow\Events\SomeEvent' => [ | 16 | + 'BookStack\Events\SomeEvent' => [ |
| 17 | - 'Oxbow\Listeners\EventListener', | 17 | + 'BookStack\Listeners\EventListener', |
| 18 | ], | 18 | ], |
| 19 | ]; | 19 | ]; |
| 20 | 20 | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow\Providers; | 3 | +namespace BookStack\Providers; |
| 4 | 4 | ||
| 5 | use Illuminate\Routing\Router; | 5 | use Illuminate\Routing\Router; |
| 6 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; | 6 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
| ... | @@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider | ... | @@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider |
| 14 | * | 14 | * |
| 15 | * @var string | 15 | * @var string |
| 16 | */ | 16 | */ |
| 17 | - protected $namespace = 'Oxbow\Http\Controllers'; | 17 | + protected $namespace = 'BookStack\Http\Controllers'; |
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | * Define your route model bindings, pattern filters, etc. | 20 | * Define your route model bindings, pattern filters, etc. | ... | ... |
| 1 | -<?php namespace Oxbow\Repos; | 1 | +<?php namespace BookStack\Repos; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | use Illuminate\Support\Facades\Auth; | 4 | use Illuminate\Support\Facades\Auth; |
| 5 | use Illuminate\Support\Str; | 5 | use Illuminate\Support\Str; |
| 6 | -use Oxbow\Page; | 6 | +use BookStack\Page; |
| 7 | -use Oxbow\PageRevision; | 7 | +use BookStack\PageRevision; |
| 8 | 8 | ||
| 9 | class PageRepo | 9 | class PageRepo |
| 10 | { | 10 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -17,7 +17,7 @@ class Role extends Model | ... | @@ -17,7 +17,7 @@ class Role extends Model |
| 17 | */ | 17 | */ |
| 18 | public function users() | 18 | public function users() |
| 19 | { | 19 | { |
| 20 | - return $this->belongsToMany('Oxbow\User'); | 20 | + return $this->belongsToMany('BookStack\User'); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | /** | 23 | /** |
| ... | @@ -25,7 +25,7 @@ class Role extends Model | ... | @@ -25,7 +25,7 @@ class Role extends Model |
| 25 | */ | 25 | */ |
| 26 | public function permissions() | 26 | public function permissions() |
| 27 | { | 27 | { |
| 28 | - return $this->belongsToMany('Oxbow\Permission'); | 28 | + return $this->belongsToMany('BookStack\Permission'); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | /** | 31 | /** | ... | ... |
| 1 | -<?php namespace Oxbow\Services; | 1 | +<?php namespace BookStack\Services; |
| 2 | 2 | ||
| 3 | use Illuminate\Support\Facades\Auth; | 3 | use Illuminate\Support\Facades\Auth; |
| 4 | -use Oxbow\Activity; | 4 | +use BookStack\Activity; |
| 5 | -use Oxbow\Entity; | 5 | +use BookStack\Entity; |
| 6 | use Session; | 6 | use Session; |
| 7 | 7 | ||
| 8 | class ActivityService | 8 | class ActivityService |
| ... | @@ -100,7 +100,7 @@ class ActivityService | ... | @@ -100,7 +100,7 @@ class ActivityService |
| 100 | */ | 100 | */ |
| 101 | function entityActivity($entity, $count = 20, $page = 0) | 101 | function entityActivity($entity, $count = 20, $page = 0) |
| 102 | { | 102 | { |
| 103 | - $activity = $entity->hasMany('Oxbow\Activity')->orderBy('created_at', 'desc') | 103 | + $activity = $entity->hasMany('BookStack\Activity')->orderBy('created_at', 'desc') |
| 104 | ->skip($count * $page)->take($count)->get(); | 104 | ->skip($count * $page)->take($count)->get(); |
| 105 | 105 | ||
| 106 | return $this->filterSimilar($activity); | 106 | return $this->filterSimilar($activity); | ... | ... |
| 1 | -<?php namespace Oxbow\Services; | 1 | +<?php namespace BookStack\Services; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | use Carbon\Carbon; | 4 | use Carbon\Carbon; |
| 5 | use Illuminate\Contracts\Mail\Mailer; | 5 | use Illuminate\Contracts\Mail\Mailer; |
| 6 | use Illuminate\Mail\Message; | 6 | use Illuminate\Mail\Message; |
| 7 | -use Oxbow\EmailConfirmation; | 7 | +use BookStack\EmailConfirmation; |
| 8 | -use Oxbow\Exceptions\ConfirmationEmailException; | 8 | +use BookStack\Exceptions\ConfirmationEmailException; |
| 9 | -use Oxbow\Exceptions\UserRegistrationException; | 9 | +use BookStack\Exceptions\UserRegistrationException; |
| 10 | -use Oxbow\Repos\UserRepo; | 10 | +use BookStack\Repos\UserRepo; |
| 11 | -use Oxbow\Setting; | 11 | +use BookStack\Setting; |
| 12 | -use Oxbow\User; | 12 | +use BookStack\User; |
| 13 | 13 | ||
| 14 | class EmailConfirmationService | 14 | class EmailConfirmationService |
| 15 | { | 15 | { | ... | ... |
| 1 | -<?php namespace Oxbow\Services; | 1 | +<?php namespace BookStack\Services; |
| 2 | 2 | ||
| 3 | -use Oxbow\Setting; | 3 | +use BookStack\Setting; |
| 4 | use Illuminate\Contracts\Cache\Repository as Cache; | 4 | use Illuminate\Contracts\Cache\Repository as Cache; |
| 5 | 5 | ||
| 6 | /** | 6 | /** |
| ... | @@ -8,7 +8,7 @@ use Illuminate\Contracts\Cache\Repository as Cache; | ... | @@ -8,7 +8,7 @@ use Illuminate\Contracts\Cache\Repository as Cache; |
| 8 | * | 8 | * |
| 9 | * The settings are a simple key-value database store. | 9 | * The settings are a simple key-value database store. |
| 10 | * | 10 | * |
| 11 | - * @package Oxbow\Services | 11 | + * @package BookStack\Services |
| 12 | */ | 12 | */ |
| 13 | class SettingService | 13 | class SettingService |
| 14 | { | 14 | { | ... | ... |
| 1 | -<?php namespace Oxbow\Services; | 1 | +<?php namespace BookStack\Services; |
| 2 | 2 | ||
| 3 | use GuzzleHttp\Exception\ClientException; | 3 | use GuzzleHttp\Exception\ClientException; |
| 4 | use Laravel\Socialite\Contracts\Factory as Socialite; | 4 | use Laravel\Socialite\Contracts\Factory as Socialite; |
| 5 | -use Oxbow\Exceptions\SocialDriverNotConfigured; | 5 | +use BookStack\Exceptions\SocialDriverNotConfigured; |
| 6 | -use Oxbow\Exceptions\SocialSignInException; | 6 | +use BookStack\Exceptions\SocialSignInException; |
| 7 | -use Oxbow\Exceptions\UserRegistrationException; | 7 | +use BookStack\Exceptions\UserRegistrationException; |
| 8 | -use Oxbow\Http\Controllers\Auth\AuthController; | 8 | +use BookStack\Http\Controllers\Auth\AuthController; |
| 9 | -use Oxbow\Repos\UserRepo; | 9 | +use BookStack\Repos\UserRepo; |
| 10 | -use Oxbow\SocialAccount; | 10 | +use BookStack\SocialAccount; |
| 11 | -use Oxbow\User; | 11 | +use BookStack\User; |
| 12 | 12 | ||
| 13 | class SocialAuthService | 13 | class SocialAuthService |
| 14 | { | 14 | { | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | 6 | ||
| ... | @@ -11,6 +11,6 @@ class SocialAccount extends Model | ... | @@ -11,6 +11,6 @@ class SocialAccount extends Model |
| 11 | 11 | ||
| 12 | public function user() | 12 | public function user() |
| 13 | { | 13 | { |
| 14 | - return $this->belongsTo('Oxbow\User'); | 14 | + return $this->belongsTo('BookStack\User'); |
| 15 | } | 15 | } |
| 16 | } | 16 | } | ... | ... |
| 1 | <?php | 1 | <?php |
| 2 | 2 | ||
| 3 | -namespace Oxbow; | 3 | +namespace BookStack; |
| 4 | 4 | ||
| 5 | use Illuminate\Auth\Authenticatable; | 5 | use Illuminate\Auth\Authenticatable; |
| 6 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
| ... | @@ -53,7 +53,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon | ... | @@ -53,7 +53,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon |
| 53 | */ | 53 | */ |
| 54 | public function roles() | 54 | public function roles() |
| 55 | { | 55 | { |
| 56 | - return $this->belongsToMany('Oxbow\Role'); | 56 | + return $this->belongsToMany('BookStack\Role'); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | public function getRoleAttribute() | 59 | public function getRoleAttribute() |
| ... | @@ -103,7 +103,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon | ... | @@ -103,7 +103,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon |
| 103 | */ | 103 | */ |
| 104 | public function socialAccounts() | 104 | public function socialAccounts() |
| 105 | { | 105 | { |
| 106 | - return $this->hasMany('Oxbow\SocialAccount'); | 106 | + return $this->hasMany('BookStack\SocialAccount'); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | /** | 109 | /** | ... | ... |
| ... | @@ -28,17 +28,17 @@ $app = new Illuminate\Foundation\Application( | ... | @@ -28,17 +28,17 @@ $app = new Illuminate\Foundation\Application( |
| 28 | 28 | ||
| 29 | $app->singleton( | 29 | $app->singleton( |
| 30 | Illuminate\Contracts\Http\Kernel::class, | 30 | Illuminate\Contracts\Http\Kernel::class, |
| 31 | - Oxbow\Http\Kernel::class | 31 | + BookStack\Http\Kernel::class |
| 32 | ); | 32 | ); |
| 33 | 33 | ||
| 34 | $app->singleton( | 34 | $app->singleton( |
| 35 | Illuminate\Contracts\Console\Kernel::class, | 35 | Illuminate\Contracts\Console\Kernel::class, |
| 36 | - Oxbow\Console\Kernel::class | 36 | + BookStack\Console\Kernel::class |
| 37 | ); | 37 | ); |
| 38 | 38 | ||
| 39 | $app->singleton( | 39 | $app->singleton( |
| 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, | 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, |
| 41 | - Oxbow\Exceptions\Handler::class | 41 | + BookStack\Exceptions\Handler::class |
| 42 | ); | 42 | ); |
| 43 | 43 | ||
| 44 | /* | 44 | /* | ... | ... |
| ... | @@ -148,10 +148,10 @@ return [ | ... | @@ -148,10 +148,10 @@ return [ |
| 148 | /* | 148 | /* |
| 149 | * Application Service Providers... | 149 | * Application Service Providers... |
| 150 | */ | 150 | */ |
| 151 | - Oxbow\Providers\AppServiceProvider::class, | 151 | + BookStack\Providers\AppServiceProvider::class, |
| 152 | - Oxbow\Providers\EventServiceProvider::class, | 152 | + BookStack\Providers\EventServiceProvider::class, |
| 153 | - Oxbow\Providers\RouteServiceProvider::class, | 153 | + BookStack\Providers\RouteServiceProvider::class, |
| 154 | - Oxbow\Providers\CustomFacadeProvider::class, | 154 | + BookStack\Providers\CustomFacadeProvider::class, |
| 155 | 155 | ||
| 156 | ], | 156 | ], |
| 157 | 157 | ||
| ... | @@ -212,8 +212,8 @@ return [ | ... | @@ -212,8 +212,8 @@ return [ |
| 212 | * Custom | 212 | * Custom |
| 213 | */ | 213 | */ |
| 214 | 214 | ||
| 215 | - 'Activity' => Oxbow\Services\Facades\Activity::class, | 215 | + 'Activity' => BookStack\Services\Facades\Activity::class, |
| 216 | - 'Setting' => Oxbow\Services\Facades\Setting::class, | 216 | + 'Setting' => BookStack\Services\Facades\Setting::class, |
| 217 | 217 | ||
| 218 | ], | 218 | ], |
| 219 | 219 | ... | ... |
| ... | @@ -28,7 +28,7 @@ return [ | ... | @@ -28,7 +28,7 @@ return [ |
| 28 | | | 28 | | |
| 29 | */ | 29 | */ |
| 30 | 30 | ||
| 31 | - 'model' => Oxbow\User::class, | 31 | + 'model' => BookStack\User::class, |
| 32 | 32 | ||
| 33 | /* | 33 | /* |
| 34 | |-------------------------------------------------------------------------- | 34 | |-------------------------------------------------------------------------- | ... | ... |
| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | | | 11 | | |
| 12 | */ | 12 | */ |
| 13 | 13 | ||
| 14 | -$factory->define(Oxbow\User::class, function ($faker) { | 14 | +$factory->define(BookStack\User::class, function ($faker) { |
| 15 | return [ | 15 | return [ |
| 16 | 'name' => $faker->name, | 16 | 'name' => $faker->name, |
| 17 | 'email' => $faker->email, | 17 | 'email' => $faker->email, |
| ... | @@ -20,21 +20,21 @@ $factory->define(Oxbow\User::class, function ($faker) { | ... | @@ -20,21 +20,21 @@ $factory->define(Oxbow\User::class, function ($faker) { |
| 20 | ]; | 20 | ]; |
| 21 | }); | 21 | }); |
| 22 | 22 | ||
| 23 | -$factory->define(Oxbow\Book::class, function ($faker) { | 23 | +$factory->define(BookStack\Book::class, function ($faker) { |
| 24 | return [ | 24 | return [ |
| 25 | 'name' => $faker->sentence, | 25 | 'name' => $faker->sentence, |
| 26 | 'description' => $faker->paragraph | 26 | 'description' => $faker->paragraph |
| 27 | ]; | 27 | ]; |
| 28 | }); | 28 | }); |
| 29 | 29 | ||
| 30 | -$factory->define(Oxbow\Chapter::class, function ($faker) { | 30 | +$factory->define(BookStack\Chapter::class, function ($faker) { |
| 31 | return [ | 31 | return [ |
| 32 | 'name' => $faker->sentence, | 32 | 'name' => $faker->sentence, |
| 33 | 'description' => $faker->paragraph | 33 | 'description' => $faker->paragraph |
| 34 | ]; | 34 | ]; |
| 35 | }); | 35 | }); |
| 36 | 36 | ||
| 37 | -$factory->define(Oxbow\Page::class, function ($faker) { | 37 | +$factory->define(BookStack\Page::class, function ($faker) { |
| 38 | return [ | 38 | return [ |
| 39 | 'name' => $faker->sentence, | 39 | 'name' => $faker->sentence, |
| 40 | 'html' => '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>' | 40 | 'html' => '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>' | ... | ... |
| ... | @@ -21,7 +21,7 @@ class CreateUsersTable extends Migration | ... | @@ -21,7 +21,7 @@ class CreateUsersTable extends Migration |
| 21 | $table->timestamps(); | 21 | $table->timestamps(); |
| 22 | }); | 22 | }); |
| 23 | 23 | ||
| 24 | - \Oxbow\User::create([ | 24 | + \BookStack\User::create([ |
| 25 | 'name' => 'Admin', | 25 | 'name' => 'Admin', |
| 26 | 'email' => 'admin@admin.com', | 26 | 'email' => 'admin@admin.com', |
| 27 | 'password' => \Illuminate\Support\Facades\Hash::make('password') | 27 | 'password' => \Illuminate\Support\Facades\Hash::make('password') | ... | ... |
| ... | @@ -68,19 +68,19 @@ class AddRolesAndPermissions extends Migration | ... | @@ -68,19 +68,19 @@ class AddRolesAndPermissions extends Migration |
| 68 | 68 | ||
| 69 | 69 | ||
| 70 | // Create default roles | 70 | // Create default roles |
| 71 | - $admin = new \Oxbow\Role(); | 71 | + $admin = new \BookStack\Role(); |
| 72 | $admin->name = 'admin'; | 72 | $admin->name = 'admin'; |
| 73 | $admin->display_name = 'Admin'; | 73 | $admin->display_name = 'Admin'; |
| 74 | $admin->description = 'Administrator of the whole application'; | 74 | $admin->description = 'Administrator of the whole application'; |
| 75 | $admin->save(); | 75 | $admin->save(); |
| 76 | 76 | ||
| 77 | - $editor = new \Oxbow\Role(); | 77 | + $editor = new \BookStack\Role(); |
| 78 | $editor->name = 'editor'; | 78 | $editor->name = 'editor'; |
| 79 | $editor->display_name = 'Editor'; | 79 | $editor->display_name = 'Editor'; |
| 80 | $editor->description = 'User can edit Books, Chapters & Pages'; | 80 | $editor->description = 'User can edit Books, Chapters & Pages'; |
| 81 | $editor->save(); | 81 | $editor->save(); |
| 82 | 82 | ||
| 83 | - $viewer = new \Oxbow\Role(); | 83 | + $viewer = new \BookStack\Role(); |
| 84 | $viewer->name = 'viewer'; | 84 | $viewer->name = 'viewer'; |
| 85 | $viewer->display_name = 'Viewer'; | 85 | $viewer->display_name = 'Viewer'; |
| 86 | $viewer->description = 'User can view books & their content behind authentication'; | 86 | $viewer->description = 'User can view books & their content behind authentication'; |
| ... | @@ -91,7 +91,7 @@ class AddRolesAndPermissions extends Migration | ... | @@ -91,7 +91,7 @@ class AddRolesAndPermissions extends Migration |
| 91 | $ops = ['Create', 'Update', 'Delete']; | 91 | $ops = ['Create', 'Update', 'Delete']; |
| 92 | foreach ($entities as $entity) { | 92 | foreach ($entities as $entity) { |
| 93 | foreach ($ops as $op) { | 93 | foreach ($ops as $op) { |
| 94 | - $newPermission = new \Oxbow\Permission(); | 94 | + $newPermission = new \BookStack\Permission(); |
| 95 | $newPermission->name = strtolower($entity) . '-' . strtolower($op); | 95 | $newPermission->name = strtolower($entity) . '-' . strtolower($op); |
| 96 | $newPermission->display_name = $op . ' ' . $entity . 's'; | 96 | $newPermission->display_name = $op . ' ' . $entity . 's'; |
| 97 | $newPermission->save(); | 97 | $newPermission->save(); |
| ... | @@ -105,7 +105,7 @@ class AddRolesAndPermissions extends Migration | ... | @@ -105,7 +105,7 @@ class AddRolesAndPermissions extends Migration |
| 105 | $ops = ['Create', 'Update', 'Delete']; | 105 | $ops = ['Create', 'Update', 'Delete']; |
| 106 | foreach ($entities as $entity) { | 106 | foreach ($entities as $entity) { |
| 107 | foreach ($ops as $op) { | 107 | foreach ($ops as $op) { |
| 108 | - $newPermission = new \Oxbow\Permission(); | 108 | + $newPermission = new \BookStack\Permission(); |
| 109 | $newPermission->name = strtolower($entity) . '-' . strtolower($op); | 109 | $newPermission->name = strtolower($entity) . '-' . strtolower($op); |
| 110 | $newPermission->display_name = $op . ' ' . $entity; | 110 | $newPermission->display_name = $op . ' ' . $entity; |
| 111 | $newPermission->save(); | 111 | $newPermission->save(); |
| ... | @@ -115,7 +115,7 @@ class AddRolesAndPermissions extends Migration | ... | @@ -115,7 +115,7 @@ class AddRolesAndPermissions extends Migration |
| 115 | 115 | ||
| 116 | // Set all current users as admins | 116 | // Set all current users as admins |
| 117 | // (At this point only the initially create user should be an admin) | 117 | // (At this point only the initially create user should be an admin) |
| 118 | - $users = \Oxbow\User::all(); | 118 | + $users = \BookStack\User::all(); |
| 119 | foreach ($users as $user) { | 119 | foreach ($users as $user) { |
| 120 | $user->attachRole($admin); | 120 | $user->attachRole($admin); |
| 121 | } | 121 | } | ... | ... |
| ... | @@ -35,9 +35,9 @@ | ... | @@ -35,9 +35,9 @@ |
| 35 | <div class="form-group"> | 35 | <div class="form-group"> |
| 36 | <label for="setting-registration-role">Default user role after registration</label> | 36 | <label for="setting-registration-role">Default user role after registration</label> |
| 37 | <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif> | 37 | <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif> |
| 38 | - @foreach(\Oxbow\Role::all() as $role) | 38 | + @foreach(\BookStack\Role::all() as $role) |
| 39 | <option value="{{$role->id}}" | 39 | <option value="{{$role->id}}" |
| 40 | - @if(\Setting::get('registration-role', \Oxbow\Role::getDefault()->id) == $role->id) selected @endif | 40 | + @if(\Setting::get('registration-role', \BookStack\Role::getDefault()->id) == $role->id) selected @endif |
| 41 | > | 41 | > |
| 42 | {{ $role->display_name }} | 42 | {{ $role->display_name }} |
| 43 | </option> | 43 | </option> | ... | ... |
| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | @if($currentUser->can('user-update')) | 11 | @if($currentUser->can('user-update')) |
| 12 | <div class="form-group"> | 12 | <div class="form-group"> |
| 13 | <label for="role">User Role</label> | 13 | <label for="role">User Role</label> |
| 14 | - @include('form.role-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name']) | 14 | + @include('form.role-select', ['name' => 'role', 'options' => \BookStack\Role::all(), 'displayKey' => 'display_name']) |
| 15 | </div> | 15 | </div> |
| 16 | @endif | 16 | @endif |
| 17 | 17 | ... | ... |
| ... | @@ -18,7 +18,7 @@ class EntityTest extends TestCase | ... | @@ -18,7 +18,7 @@ class EntityTest extends TestCase |
| 18 | $this->bookDelete($book); | 18 | $this->bookDelete($book); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | - public function bookDelete(\Oxbow\Book $book) | 21 | + public function bookDelete(\BookStack\Book $book) |
| 22 | { | 22 | { |
| 23 | $this->asAdmin() | 23 | $this->asAdmin() |
| 24 | ->visit($book->getUrl()) | 24 | ->visit($book->getUrl()) |
| ... | @@ -32,7 +32,7 @@ class EntityTest extends TestCase | ... | @@ -32,7 +32,7 @@ class EntityTest extends TestCase |
| 32 | ->notSeeInDatabase('books', ['id' => $book->id]); | 32 | ->notSeeInDatabase('books', ['id' => $book->id]); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | - public function bookUpdate(\Oxbow\Book $book) | 35 | + public function bookUpdate(\BookStack\Book $book) |
| 36 | { | 36 | { |
| 37 | $newName = $book->name . ' Updated'; | 37 | $newName = $book->name . ' Updated'; |
| 38 | $this->asAdmin() | 38 | $this->asAdmin() |
| ... | @@ -46,12 +46,12 @@ class EntityTest extends TestCase | ... | @@ -46,12 +46,12 @@ class EntityTest extends TestCase |
| 46 | ->seePageIs($book->getUrl() . '-updated') | 46 | ->seePageIs($book->getUrl() . '-updated') |
| 47 | ->see($newName); | 47 | ->see($newName); |
| 48 | 48 | ||
| 49 | - return \Oxbow\Book::find($book->id); | 49 | + return \BookStack\Book::find($book->id); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | public function pageCreation($chapter) | 52 | public function pageCreation($chapter) |
| 53 | { | 53 | { |
| 54 | - $page = factory(\Oxbow\Page::class)->make([ | 54 | + $page = factory(\BookStack\Page::class)->make([ |
| 55 | 'name' => 'My First Page' | 55 | 'name' => 'My First Page' |
| 56 | ]); | 56 | ]); |
| 57 | 57 | ||
| ... | @@ -68,13 +68,13 @@ class EntityTest extends TestCase | ... | @@ -68,13 +68,13 @@ class EntityTest extends TestCase |
| 68 | ->seePageIs($chapter->book->getUrl() . '/page/my-first-page') | 68 | ->seePageIs($chapter->book->getUrl() . '/page/my-first-page') |
| 69 | ->see($page->name); | 69 | ->see($page->name); |
| 70 | 70 | ||
| 71 | - $page = \Oxbow\Page::where('slug', '=', 'my-first-page')->where('chapter_id', '=', $chapter->id)->first(); | 71 | + $page = \BookStack\Page::where('slug', '=', 'my-first-page')->where('chapter_id', '=', $chapter->id)->first(); |
| 72 | return $page; | 72 | return $page; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | - public function chapterCreation(\Oxbow\Book $book) | 75 | + public function chapterCreation(\BookStack\Book $book) |
| 76 | { | 76 | { |
| 77 | - $chapter = factory(\Oxbow\Chapter::class)->make([ | 77 | + $chapter = factory(\BookStack\Chapter::class)->make([ |
| 78 | 'name' => 'My First Chapter' | 78 | 'name' => 'My First Chapter' |
| 79 | ]); | 79 | ]); |
| 80 | 80 | ||
| ... | @@ -91,13 +91,13 @@ class EntityTest extends TestCase | ... | @@ -91,13 +91,13 @@ class EntityTest extends TestCase |
| 91 | ->seePageIs($book->getUrl() . '/chapter/my-first-chapter') | 91 | ->seePageIs($book->getUrl() . '/chapter/my-first-chapter') |
| 92 | ->see($chapter->name)->see($chapter->description); | 92 | ->see($chapter->name)->see($chapter->description); |
| 93 | 93 | ||
| 94 | - $chapter = \Oxbow\Chapter::where('slug', '=', 'my-first-chapter')->where('book_id', '=', $book->id)->first(); | 94 | + $chapter = \BookStack\Chapter::where('slug', '=', 'my-first-chapter')->where('book_id', '=', $book->id)->first(); |
| 95 | return $chapter; | 95 | return $chapter; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | public function bookCreation() | 98 | public function bookCreation() |
| 99 | { | 99 | { |
| 100 | - $book = factory(\Oxbow\Book::class)->make([ | 100 | + $book = factory(\BookStack\Book::class)->make([ |
| 101 | 'name' => 'My First Book' | 101 | 'name' => 'My First Book' |
| 102 | ]); | 102 | ]); |
| 103 | $this->asAdmin() | 103 | $this->asAdmin() |
| ... | @@ -113,7 +113,7 @@ class EntityTest extends TestCase | ... | @@ -113,7 +113,7 @@ class EntityTest extends TestCase |
| 113 | ->seePageIs('/books/my-first-book') | 113 | ->seePageIs('/books/my-first-book') |
| 114 | ->see($book->name)->see($book->description); | 114 | ->see($book->name)->see($book->description); |
| 115 | 115 | ||
| 116 | - $book = \Oxbow\Book::where('slug', '=', 'my-first-book')->first(); | 116 | + $book = \BookStack\Book::where('slug', '=', 'my-first-book')->first(); |
| 117 | return $book; | 117 | return $book; |
| 118 | } | 118 | } |
| 119 | 119 | ... | ... |
| ... | @@ -32,7 +32,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase | ... | @@ -32,7 +32,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase |
| 32 | public function asAdmin() | 32 | public function asAdmin() |
| 33 | { | 33 | { |
| 34 | if($this->admin === null) { | 34 | if($this->admin === null) { |
| 35 | - $this->admin = \Oxbow\User::find(1); | 35 | + $this->admin = \BookStack\User::find(1); |
| 36 | } | 36 | } |
| 37 | return $this->actingAs($this->admin); | 37 | return $this->actingAs($this->admin); |
| 38 | } | 38 | } | ... | ... |
-
Please register or sign in to post a comment