mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Change application namespace to BookStack
This commit is contained in:
parent
b61c1d8df0
commit
88049476fe
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -32,7 +32,7 @@ class Activity extends Model
|
||||
*/
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User');
|
||||
return $this->belongsTo('BookStack\User');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
class Book extends Entity
|
||||
{
|
||||
@ -19,12 +19,12 @@ class Book extends Entity
|
||||
|
||||
public function pages()
|
||||
{
|
||||
return $this->hasMany('Oxbow\Page');
|
||||
return $this->hasMany('BookStack\Page');
|
||||
}
|
||||
|
||||
public function chapters()
|
||||
{
|
||||
return $this->hasMany('Oxbow\Chapter');
|
||||
return $this->hasMany('BookStack\Chapter');
|
||||
}
|
||||
|
||||
public function children()
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow;
|
||||
<?php namespace BookStack;
|
||||
|
||||
|
||||
class Chapter extends Entity
|
||||
@ -8,12 +8,12 @@ class Chapter extends Entity
|
||||
|
||||
public function book()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\Book');
|
||||
return $this->belongsTo('BookStack\Book');
|
||||
}
|
||||
|
||||
public function pages()
|
||||
{
|
||||
return $this->hasMany('Oxbow\Page')->orderBy('priority', 'ASC');
|
||||
return $this->hasMany('BookStack\Page')->orderBy('priority', 'ASC');
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Console\Commands;
|
||||
namespace BookStack\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Console;
|
||||
namespace BookStack\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $commands = [
|
||||
\Oxbow\Console\Commands\Inspire::class,
|
||||
\BookStack\Console\Commands\Inspire::class,
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -10,6 +10,6 @@ class EmailConfirmation extends Model
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User');
|
||||
return $this->belongsTo('BookStack\User');
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -12,7 +12,7 @@ abstract class Entity extends Model
|
||||
*/
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User', 'created_by');
|
||||
return $this->belongsTo('BookStack\User', 'created_by');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -21,7 +21,7 @@ abstract class Entity extends Model
|
||||
*/
|
||||
public function updatedBy()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User', 'updated_by');
|
||||
return $this->belongsTo('BookStack\User', 'updated_by');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ abstract class Entity extends Model
|
||||
*/
|
||||
public function activity()
|
||||
{
|
||||
return $this->morphMany('Oxbow\Activity', 'entity')->orderBy('created_at', 'desc');
|
||||
return $this->morphMany('BookStack\Activity', 'entity')->orderBy('created_at', 'desc');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Events;
|
||||
namespace BookStack\Events;
|
||||
|
||||
abstract class Event
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Exceptions;
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class ConfirmationEmailException extends NotifyException
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Exceptions;
|
||||
namespace BookStack\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Exceptions;
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class NotifyException extends \Exception
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Exceptions;
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class SocialDriverNotConfigured extends \Exception
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Exceptions;
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class SocialSignInException extends NotifyException
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Exceptions;
|
||||
<?php namespace BookStack\Exceptions;
|
||||
|
||||
|
||||
class UserRegistrationException extends NotifyException
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers\Auth;
|
||||
namespace BookStack\Http\Controllers\Auth;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Oxbow\Exceptions\SocialSignInException;
|
||||
use Oxbow\Exceptions\UserRegistrationException;
|
||||
use Oxbow\Repos\UserRepo;
|
||||
use Oxbow\Services\EmailConfirmationService;
|
||||
use Oxbow\Services\SocialAuthService;
|
||||
use Oxbow\SocialAccount;
|
||||
use BookStack\Exceptions\SocialSignInException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use BookStack\Repos\UserRepo;
|
||||
use BookStack\Services\EmailConfirmationService;
|
||||
use BookStack\Services\SocialAuthService;
|
||||
use BookStack\SocialAccount;
|
||||
use Validator;
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ThrottlesLogins;
|
||||
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
|
||||
|
||||
@ -131,7 +131,7 @@ class AuthController extends Controller
|
||||
* @param bool|false|SocialAccount $socialAccount
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
* @throws UserRegistrationException
|
||||
* @throws \Oxbow\Exceptions\ConfirmationEmailException
|
||||
* @throws \BookStack\Exceptions\ConfirmationEmailException
|
||||
*/
|
||||
protected function registerUser(array $userData, $socialAccount = false)
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers\Auth;
|
||||
namespace BookStack\Http\Controllers\Auth;
|
||||
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use Illuminate\Foundation\Auth\ResetsPasswords;
|
||||
|
||||
class PasswordController extends Controller
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Activity;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Repos\BookRepo;
|
||||
use Oxbow\Repos\ChapterRepo;
|
||||
use Oxbow\Repos\PageRepo;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Repos\BookRepo;
|
||||
use BookStack\Repos\ChapterRepo;
|
||||
use BookStack\Repos\PageRepo;
|
||||
|
||||
class BookController extends Controller
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Activity;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use Oxbow\Repos\BookRepo;
|
||||
use Oxbow\Repos\ChapterRepo;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Repos\BookRepo;
|
||||
use BookStack\Repos\ChapterRepo;
|
||||
|
||||
class ChapterController extends Controller
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use HttpRequestException;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
@ -9,7 +9,7 @@ use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Oxbow\User;
|
||||
use BookStack\User;
|
||||
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use Oxbow\Repos\BookRepo;
|
||||
use Oxbow\Services\ActivityService;
|
||||
use Oxbow\Services\Facades\Activity;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Repos\BookRepo;
|
||||
use BookStack\Services\ActivityService;
|
||||
use BookStack\Services\Facades\Activity;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Illuminate\Filesystem\Filesystem as File;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Intervention\Image\Facades\Image as ImageTool;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Image;
|
||||
use Oxbow\Repos\PageRepo;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Image;
|
||||
use BookStack\Repos\PageRepo;
|
||||
|
||||
class ImageController extends Controller
|
||||
{
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Activity;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Repos\BookRepo;
|
||||
use Oxbow\Repos\ChapterRepo;
|
||||
use Oxbow\Repos\PageRepo;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Repos\BookRepo;
|
||||
use BookStack\Repos\ChapterRepo;
|
||||
use BookStack\Repos\PageRepo;
|
||||
|
||||
class PageController extends Controller
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use Oxbow\Repos\BookRepo;
|
||||
use Oxbow\Repos\ChapterRepo;
|
||||
use Oxbow\Repos\PageRepo;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use BookStack\Repos\BookRepo;
|
||||
use BookStack\Repos\ChapterRepo;
|
||||
use BookStack\Repos\PageRepo;
|
||||
|
||||
class SearchController extends Controller
|
||||
{
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Http\Controllers\Controller;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Http\Controllers\Controller;
|
||||
use Setting;
|
||||
|
||||
class SettingController extends Controller
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Controllers;
|
||||
namespace BookStack\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Oxbow\Http\Requests;
|
||||
use Oxbow\Repos\UserRepo;
|
||||
use Oxbow\Services\SocialAuthService;
|
||||
use Oxbow\User;
|
||||
use BookStack\Http\Requests;
|
||||
use BookStack\Repos\UserRepo;
|
||||
use BookStack\Services\SocialAuthService;
|
||||
use BookStack\User;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http;
|
||||
namespace BookStack\Http;
|
||||
|
||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||
|
||||
@ -13,11 +13,11 @@ class Kernel extends HttpKernel
|
||||
*/
|
||||
protected $middleware = [
|
||||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
|
||||
\Oxbow\Http\Middleware\EncryptCookies::class,
|
||||
\BookStack\Http\Middleware\EncryptCookies::class,
|
||||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||
\Illuminate\Session\Middleware\StartSession::class,
|
||||
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||
\Oxbow\Http\Middleware\VerifyCsrfToken::class,
|
||||
\BookStack\Http\Middleware\VerifyCsrfToken::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@ -26,9 +26,9 @@ class Kernel extends HttpKernel
|
||||
* @var array
|
||||
*/
|
||||
protected $routeMiddleware = [
|
||||
'auth' => \Oxbow\Http\Middleware\Authenticate::class,
|
||||
'auth' => \BookStack\Http\Middleware\Authenticate::class,
|
||||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||
'guest' => \Oxbow\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'perm' => \Oxbow\Http\Middleware\PermissionMiddleware::class
|
||||
'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class,
|
||||
'perm' => \BookStack\Http\Middleware\PermissionMiddleware::class
|
||||
];
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Middleware;
|
||||
namespace BookStack\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
use Oxbow\Exceptions\UserRegistrationException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use Setting;
|
||||
|
||||
class Authenticate
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Middleware;
|
||||
namespace BookStack\Http\Middleware;
|
||||
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Middleware;
|
||||
namespace BookStack\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Middleware;
|
||||
namespace BookStack\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Contracts\Auth\Guard;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Middleware;
|
||||
namespace BookStack\Http\Middleware;
|
||||
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Http\Requests;
|
||||
namespace BookStack\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
|
||||
class Image extends Entity
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Jobs;
|
||||
namespace BookStack\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -19,12 +19,12 @@ class Page extends Entity
|
||||
|
||||
public function book()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\Book');
|
||||
return $this->belongsTo('BookStack\Book');
|
||||
}
|
||||
|
||||
public function chapter()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\Chapter');
|
||||
return $this->belongsTo('BookStack\Chapter');
|
||||
}
|
||||
|
||||
public function hasChapter()
|
||||
@ -35,7 +35,7 @@ class Page extends Entity
|
||||
|
||||
public function revisions()
|
||||
{
|
||||
return $this->hasMany('Oxbow\PageRevision')->orderBy('created_at', 'desc');
|
||||
return $this->hasMany('BookStack\PageRevision')->orderBy('created_at', 'desc');
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -10,12 +10,12 @@ class PageRevision extends Model
|
||||
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User', 'created_by');
|
||||
return $this->belongsTo('BookStack\User', 'created_by');
|
||||
}
|
||||
|
||||
public function page()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\Page');
|
||||
return $this->belongsTo('BookStack\Page');
|
||||
}
|
||||
|
||||
public function getUrl()
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -11,6 +11,6 @@ class Permission extends Model
|
||||
*/
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany('Oxbow\Permissions');
|
||||
return $this->belongsToMany('BookStack\Permissions');
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Providers;
|
||||
namespace BookStack\Providers;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Oxbow\User;
|
||||
use BookStack\User;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Providers;
|
||||
namespace BookStack\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Oxbow\Services\ActivityService;
|
||||
use Oxbow\Services\SettingService;
|
||||
use BookStack\Services\ActivityService;
|
||||
use BookStack\Services\SettingService;
|
||||
|
||||
class CustomFacadeProvider extends ServiceProvider
|
||||
{
|
||||
@ -26,12 +26,12 @@ class CustomFacadeProvider extends ServiceProvider
|
||||
public function register()
|
||||
{
|
||||
$this->app->bind('activity', function() {
|
||||
return new ActivityService($this->app->make('Oxbow\Activity'));
|
||||
return new ActivityService($this->app->make('BookStack\Activity'));
|
||||
});
|
||||
|
||||
$this->app->bind('setting', function() {
|
||||
return new SettingService(
|
||||
$this->app->make('Oxbow\Setting'),
|
||||
$this->app->make('BookStack\Setting'),
|
||||
$this->app->make('Illuminate\Contracts\Cache\Repository')
|
||||
);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Providers;
|
||||
namespace BookStack\Providers;
|
||||
|
||||
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||
@ -13,8 +13,8 @@ class EventServiceProvider extends ServiceProvider
|
||||
* @var array
|
||||
*/
|
||||
protected $listen = [
|
||||
'Oxbow\Events\SomeEvent' => [
|
||||
'Oxbow\Listeners\EventListener',
|
||||
'BookStack\Events\SomeEvent' => [
|
||||
'BookStack\Listeners\EventListener',
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow\Providers;
|
||||
namespace BookStack\Providers;
|
||||
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
|
||||
@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $namespace = 'Oxbow\Http\Controllers';
|
||||
protected $namespace = 'BookStack\Http\Controllers';
|
||||
|
||||
/**
|
||||
* Define your route model bindings, pattern filters, etc.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Providers;
|
||||
<?php namespace BookStack\Providers;
|
||||
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php namespace Oxbow\Repos;
|
||||
<?php namespace BookStack\Repos;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Oxbow\Book;
|
||||
use BookStack\Book;
|
||||
|
||||
class BookRepo
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php namespace Oxbow\Repos;
|
||||
<?php namespace BookStack\Repos;
|
||||
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Oxbow\Chapter;
|
||||
use BookStack\Chapter;
|
||||
|
||||
class ChapterRepo
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
<?php namespace Oxbow\Repos;
|
||||
<?php namespace BookStack\Repos;
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Str;
|
||||
use Oxbow\Page;
|
||||
use Oxbow\PageRevision;
|
||||
use BookStack\Page;
|
||||
use BookStack\PageRevision;
|
||||
|
||||
class PageRepo
|
||||
{
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php namespace Oxbow\Repos;
|
||||
<?php namespace BookStack\Repos;
|
||||
|
||||
|
||||
use Oxbow\Role;
|
||||
use Oxbow\User;
|
||||
use BookStack\Role;
|
||||
use BookStack\User;
|
||||
|
||||
class UserRepo
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -17,7 +17,7 @@ class Role extends Model
|
||||
*/
|
||||
public function users()
|
||||
{
|
||||
return $this->belongsToMany('Oxbow\User');
|
||||
return $this->belongsToMany('BookStack\User');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -25,7 +25,7 @@ class Role extends Model
|
||||
*/
|
||||
public function permissions()
|
||||
{
|
||||
return $this->belongsToMany('Oxbow\Permission');
|
||||
return $this->belongsToMany('BookStack\Permission');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php namespace Oxbow\Services;
|
||||
<?php namespace BookStack\Services;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Oxbow\Activity;
|
||||
use Oxbow\Entity;
|
||||
use BookStack\Activity;
|
||||
use BookStack\Entity;
|
||||
use Session;
|
||||
|
||||
class ActivityService
|
||||
@ -100,7 +100,7 @@ class ActivityService
|
||||
*/
|
||||
function entityActivity($entity, $count = 20, $page = 0)
|
||||
{
|
||||
$activity = $entity->hasMany('Oxbow\Activity')->orderBy('created_at', 'desc')
|
||||
$activity = $entity->hasMany('BookStack\Activity')->orderBy('created_at', 'desc')
|
||||
->skip($count * $page)->take($count)->get();
|
||||
|
||||
return $this->filterSimilar($activity);
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php namespace Oxbow\Services;
|
||||
<?php namespace BookStack\Services;
|
||||
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
use Illuminate\Mail\Message;
|
||||
use Oxbow\EmailConfirmation;
|
||||
use Oxbow\Exceptions\ConfirmationEmailException;
|
||||
use Oxbow\Exceptions\UserRegistrationException;
|
||||
use Oxbow\Repos\UserRepo;
|
||||
use Oxbow\Setting;
|
||||
use Oxbow\User;
|
||||
use BookStack\EmailConfirmation;
|
||||
use BookStack\Exceptions\ConfirmationEmailException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use BookStack\Repos\UserRepo;
|
||||
use BookStack\Setting;
|
||||
use BookStack\User;
|
||||
|
||||
class EmailConfirmationService
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Services\Facades;
|
||||
<?php namespace BookStack\Services\Facades;
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?php namespace Oxbow\Services\Facades;
|
||||
<?php namespace BookStack\Services\Facades;
|
||||
|
||||
|
||||
use Illuminate\Support\Facades\Facade;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php namespace Oxbow\Services;
|
||||
<?php namespace BookStack\Services;
|
||||
|
||||
use Oxbow\Setting;
|
||||
use BookStack\Setting;
|
||||
use Illuminate\Contracts\Cache\Repository as Cache;
|
||||
|
||||
/**
|
||||
@ -8,7 +8,7 @@ use Illuminate\Contracts\Cache\Repository as Cache;
|
||||
*
|
||||
* The settings are a simple key-value database store.
|
||||
*
|
||||
* @package Oxbow\Services
|
||||
* @package BookStack\Services
|
||||
*/
|
||||
class SettingService
|
||||
{
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php namespace Oxbow\Services;
|
||||
<?php namespace BookStack\Services;
|
||||
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use Laravel\Socialite\Contracts\Factory as Socialite;
|
||||
use Oxbow\Exceptions\SocialDriverNotConfigured;
|
||||
use Oxbow\Exceptions\SocialSignInException;
|
||||
use Oxbow\Exceptions\UserRegistrationException;
|
||||
use Oxbow\Http\Controllers\Auth\AuthController;
|
||||
use Oxbow\Repos\UserRepo;
|
||||
use Oxbow\SocialAccount;
|
||||
use Oxbow\User;
|
||||
use BookStack\Exceptions\SocialDriverNotConfigured;
|
||||
use BookStack\Exceptions\SocialSignInException;
|
||||
use BookStack\Exceptions\UserRegistrationException;
|
||||
use BookStack\Http\Controllers\Auth\AuthController;
|
||||
use BookStack\Repos\UserRepo;
|
||||
use BookStack\SocialAccount;
|
||||
use BookStack\User;
|
||||
|
||||
class SocialAuthService
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@ -11,6 +11,6 @@ class SocialAccount extends Model
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('Oxbow\User');
|
||||
return $this->belongsTo('BookStack\User');
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Oxbow;
|
||||
namespace BookStack;
|
||||
|
||||
use Illuminate\Auth\Authenticatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@ -53,7 +53,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
*/
|
||||
public function roles()
|
||||
{
|
||||
return $this->belongsToMany('Oxbow\Role');
|
||||
return $this->belongsToMany('BookStack\Role');
|
||||
}
|
||||
|
||||
public function getRoleAttribute()
|
||||
@ -103,7 +103,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
*/
|
||||
public function socialAccounts()
|
||||
{
|
||||
return $this->hasMany('Oxbow\SocialAccount');
|
||||
return $this->hasMany('BookStack\SocialAccount');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -28,17 +28,17 @@ $app = new Illuminate\Foundation\Application(
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Http\Kernel::class,
|
||||
Oxbow\Http\Kernel::class
|
||||
BookStack\Http\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
Oxbow\Console\Kernel::class
|
||||
BookStack\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
Oxbow\Exceptions\Handler::class
|
||||
BookStack\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
/*
|
||||
|
@ -22,7 +22,7 @@
|
||||
"database"
|
||||
],
|
||||
"psr-4": {
|
||||
"Oxbow\\": "app/"
|
||||
"BookStack\\": "app/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
|
@ -148,10 +148,10 @@ return [
|
||||
/*
|
||||
* Application Service Providers...
|
||||
*/
|
||||
Oxbow\Providers\AppServiceProvider::class,
|
||||
Oxbow\Providers\EventServiceProvider::class,
|
||||
Oxbow\Providers\RouteServiceProvider::class,
|
||||
Oxbow\Providers\CustomFacadeProvider::class,
|
||||
BookStack\Providers\AppServiceProvider::class,
|
||||
BookStack\Providers\EventServiceProvider::class,
|
||||
BookStack\Providers\RouteServiceProvider::class,
|
||||
BookStack\Providers\CustomFacadeProvider::class,
|
||||
|
||||
],
|
||||
|
||||
@ -212,8 +212,8 @@ return [
|
||||
* Custom
|
||||
*/
|
||||
|
||||
'Activity' => Oxbow\Services\Facades\Activity::class,
|
||||
'Setting' => Oxbow\Services\Facades\Setting::class,
|
||||
'Activity' => BookStack\Services\Facades\Activity::class,
|
||||
'Setting' => BookStack\Services\Facades\Setting::class,
|
||||
|
||||
],
|
||||
|
||||
|
@ -28,7 +28,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'model' => Oxbow\User::class,
|
||||
'model' => BookStack\User::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -30,7 +30,7 @@ return [
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => Oxbow\User::class,
|
||||
'model' => BookStack\User::class,
|
||||
'key' => '',
|
||||
'secret' => '',
|
||||
],
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
|
||||
*/
|
||||
|
||||
$factory->define(Oxbow\User::class, function ($faker) {
|
||||
$factory->define(BookStack\User::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->email,
|
||||
@ -20,21 +20,21 @@ $factory->define(Oxbow\User::class, function ($faker) {
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Oxbow\Book::class, function ($faker) {
|
||||
$factory->define(BookStack\Book::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'description' => $faker->paragraph
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Oxbow\Chapter::class, function ($faker) {
|
||||
$factory->define(BookStack\Chapter::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'description' => $faker->paragraph
|
||||
];
|
||||
});
|
||||
|
||||
$factory->define(Oxbow\Page::class, function ($faker) {
|
||||
$factory->define(BookStack\Page::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->sentence,
|
||||
'html' => '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>'
|
||||
|
@ -21,7 +21,7 @@ class CreateUsersTable extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
\Oxbow\User::create([
|
||||
\BookStack\User::create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@admin.com',
|
||||
'password' => \Illuminate\Support\Facades\Hash::make('password')
|
||||
|
@ -68,19 +68,19 @@ class AddRolesAndPermissions extends Migration
|
||||
|
||||
|
||||
// Create default roles
|
||||
$admin = new \Oxbow\Role();
|
||||
$admin = new \BookStack\Role();
|
||||
$admin->name = 'admin';
|
||||
$admin->display_name = 'Admin';
|
||||
$admin->description = 'Administrator of the whole application';
|
||||
$admin->save();
|
||||
|
||||
$editor = new \Oxbow\Role();
|
||||
$editor = new \BookStack\Role();
|
||||
$editor->name = 'editor';
|
||||
$editor->display_name = 'Editor';
|
||||
$editor->description = 'User can edit Books, Chapters & Pages';
|
||||
$editor->save();
|
||||
|
||||
$viewer = new \Oxbow\Role();
|
||||
$viewer = new \BookStack\Role();
|
||||
$viewer->name = 'viewer';
|
||||
$viewer->display_name = 'Viewer';
|
||||
$viewer->description = 'User can view books & their content behind authentication';
|
||||
@ -91,7 +91,7 @@ class AddRolesAndPermissions extends Migration
|
||||
$ops = ['Create', 'Update', 'Delete'];
|
||||
foreach ($entities as $entity) {
|
||||
foreach ($ops as $op) {
|
||||
$newPermission = new \Oxbow\Permission();
|
||||
$newPermission = new \BookStack\Permission();
|
||||
$newPermission->name = strtolower($entity) . '-' . strtolower($op);
|
||||
$newPermission->display_name = $op . ' ' . $entity . 's';
|
||||
$newPermission->save();
|
||||
@ -105,7 +105,7 @@ class AddRolesAndPermissions extends Migration
|
||||
$ops = ['Create', 'Update', 'Delete'];
|
||||
foreach ($entities as $entity) {
|
||||
foreach ($ops as $op) {
|
||||
$newPermission = new \Oxbow\Permission();
|
||||
$newPermission = new \BookStack\Permission();
|
||||
$newPermission->name = strtolower($entity) . '-' . strtolower($op);
|
||||
$newPermission->display_name = $op . ' ' . $entity;
|
||||
$newPermission->save();
|
||||
@ -115,7 +115,7 @@ class AddRolesAndPermissions extends Migration
|
||||
|
||||
// Set all current users as admins
|
||||
// (At this point only the initially create user should be an admin)
|
||||
$users = \Oxbow\User::all();
|
||||
$users = \BookStack\User::all();
|
||||
foreach ($users as $user) {
|
||||
$user->attachRole($admin);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
suites:
|
||||
main:
|
||||
namespace: Oxbow
|
||||
psr4_prefix: Oxbow
|
||||
namespace: BookStack
|
||||
psr4_prefix: BookStack
|
||||
src_path: app
|
@ -35,9 +35,9 @@
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-role">Default user role after registration</label>
|
||||
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
|
||||
@foreach(\Oxbow\Role::all() as $role)
|
||||
@foreach(\BookStack\Role::all() as $role)
|
||||
<option value="{{$role->id}}"
|
||||
@if(\Setting::get('registration-role', \Oxbow\Role::getDefault()->id) == $role->id) selected @endif
|
||||
@if(\Setting::get('registration-role', \BookStack\Role::getDefault()->id) == $role->id) selected @endif
|
||||
>
|
||||
{{ $role->display_name }}
|
||||
</option>
|
||||
|
@ -11,7 +11,7 @@
|
||||
@if($currentUser->can('user-update'))
|
||||
<div class="form-group">
|
||||
<label for="role">User Role</label>
|
||||
@include('form.role-select', ['name' => 'role', 'options' => \Oxbow\Role::all(), 'displayKey' => 'display_name'])
|
||||
@include('form.role-select', ['name' => 'role', 'options' => \BookStack\Role::all(), 'displayKey' => 'display_name'])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -18,7 +18,7 @@ class EntityTest extends TestCase
|
||||
$this->bookDelete($book);
|
||||
}
|
||||
|
||||
public function bookDelete(\Oxbow\Book $book)
|
||||
public function bookDelete(\BookStack\Book $book)
|
||||
{
|
||||
$this->asAdmin()
|
||||
->visit($book->getUrl())
|
||||
@ -32,7 +32,7 @@ class EntityTest extends TestCase
|
||||
->notSeeInDatabase('books', ['id' => $book->id]);
|
||||
}
|
||||
|
||||
public function bookUpdate(\Oxbow\Book $book)
|
||||
public function bookUpdate(\BookStack\Book $book)
|
||||
{
|
||||
$newName = $book->name . ' Updated';
|
||||
$this->asAdmin()
|
||||
@ -46,12 +46,12 @@ class EntityTest extends TestCase
|
||||
->seePageIs($book->getUrl() . '-updated')
|
||||
->see($newName);
|
||||
|
||||
return \Oxbow\Book::find($book->id);
|
||||
return \BookStack\Book::find($book->id);
|
||||
}
|
||||
|
||||
public function pageCreation($chapter)
|
||||
{
|
||||
$page = factory(\Oxbow\Page::class)->make([
|
||||
$page = factory(\BookStack\Page::class)->make([
|
||||
'name' => 'My First Page'
|
||||
]);
|
||||
|
||||
@ -68,13 +68,13 @@ class EntityTest extends TestCase
|
||||
->seePageIs($chapter->book->getUrl() . '/page/my-first-page')
|
||||
->see($page->name);
|
||||
|
||||
$page = \Oxbow\Page::where('slug', '=', 'my-first-page')->where('chapter_id', '=', $chapter->id)->first();
|
||||
$page = \BookStack\Page::where('slug', '=', 'my-first-page')->where('chapter_id', '=', $chapter->id)->first();
|
||||
return $page;
|
||||
}
|
||||
|
||||
public function chapterCreation(\Oxbow\Book $book)
|
||||
public function chapterCreation(\BookStack\Book $book)
|
||||
{
|
||||
$chapter = factory(\Oxbow\Chapter::class)->make([
|
||||
$chapter = factory(\BookStack\Chapter::class)->make([
|
||||
'name' => 'My First Chapter'
|
||||
]);
|
||||
|
||||
@ -91,13 +91,13 @@ class EntityTest extends TestCase
|
||||
->seePageIs($book->getUrl() . '/chapter/my-first-chapter')
|
||||
->see($chapter->name)->see($chapter->description);
|
||||
|
||||
$chapter = \Oxbow\Chapter::where('slug', '=', 'my-first-chapter')->where('book_id', '=', $book->id)->first();
|
||||
$chapter = \BookStack\Chapter::where('slug', '=', 'my-first-chapter')->where('book_id', '=', $book->id)->first();
|
||||
return $chapter;
|
||||
}
|
||||
|
||||
public function bookCreation()
|
||||
{
|
||||
$book = factory(\Oxbow\Book::class)->make([
|
||||
$book = factory(\BookStack\Book::class)->make([
|
||||
'name' => 'My First Book'
|
||||
]);
|
||||
$this->asAdmin()
|
||||
@ -113,7 +113,7 @@ class EntityTest extends TestCase
|
||||
->seePageIs('/books/my-first-book')
|
||||
->see($book->name)->see($book->description);
|
||||
|
||||
$book = \Oxbow\Book::where('slug', '=', 'my-first-book')->first();
|
||||
$book = \BookStack\Book::where('slug', '=', 'my-first-book')->first();
|
||||
return $book;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
public function asAdmin()
|
||||
{
|
||||
if($this->admin === null) {
|
||||
$this->admin = \Oxbow\User::find(1);
|
||||
$this->admin = \BookStack\User::find(1);
|
||||
}
|
||||
return $this->actingAs($this->admin);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user