1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-05 17:16:52 +03:00

Change application namespace to BookStack

This commit is contained in:
Dan Brown 2015-09-10 19:31:09 +01:00
parent b61c1d8df0
commit 88049476fe
69 changed files with 195 additions and 195 deletions

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -32,7 +32,7 @@ class Activity extends Model
*/ */
public function user() public function user()
{ {
return $this->belongsTo('Oxbow\User'); return $this->belongsTo('BookStack\User');
} }
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
class Book extends Entity class Book extends Entity
{ {
@ -19,12 +19,12 @@ class Book extends Entity
public function pages() public function pages()
{ {
return $this->hasMany('Oxbow\Page'); return $this->hasMany('BookStack\Page');
} }
public function chapters() public function chapters()
{ {
return $this->hasMany('Oxbow\Chapter'); return $this->hasMany('BookStack\Chapter');
} }
public function children() public function children()

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow; <?php namespace BookStack;
class Chapter extends Entity class Chapter extends Entity
@ -8,12 +8,12 @@ class Chapter extends Entity
public function book() public function book()
{ {
return $this->belongsTo('Oxbow\Book'); return $this->belongsTo('BookStack\Book');
} }
public function pages() public function pages()
{ {
return $this->hasMany('Oxbow\Page')->orderBy('priority', 'ASC'); return $this->hasMany('BookStack\Page')->orderBy('priority', 'ASC');
} }
public function getUrl() public function getUrl()

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Console\Commands; namespace BookStack\Console\Commands;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring; use Illuminate\Foundation\Inspiring;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Console; namespace BookStack\Console;
use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
* @var array * @var array
*/ */
protected $commands = [ protected $commands = [
\Oxbow\Console\Commands\Inspire::class, \BookStack\Console\Commands\Inspire::class,
]; ];
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -10,6 +10,6 @@ class EmailConfirmation extends Model
public function user() public function user()
{ {
return $this->belongsTo('Oxbow\User'); return $this->belongsTo('BookStack\User');
} }
} }

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -12,7 +12,7 @@ abstract class Entity extends Model
*/ */
public function createdBy() 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() 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() public function activity()
{ {
return $this->morphMany('Oxbow\Activity', 'entity')->orderBy('created_at', 'desc'); return $this->morphMany('BookStack\Activity', 'entity')->orderBy('created_at', 'desc');
} }
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Events; namespace BookStack\Events;
abstract class Event abstract class Event
{ {

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Exceptions; <?php namespace BookStack\Exceptions;
class ConfirmationEmailException extends NotifyException class ConfirmationEmailException extends NotifyException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Exceptions; namespace BookStack\Exceptions;
use Exception; use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Exceptions; <?php namespace BookStack\Exceptions;
class NotifyException extends \Exception class NotifyException extends \Exception

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Exceptions; <?php namespace BookStack\Exceptions;
class SocialDriverNotConfigured extends \Exception class SocialDriverNotConfigured extends \Exception

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Exceptions; <?php namespace BookStack\Exceptions;
class SocialSignInException extends NotifyException class SocialSignInException extends NotifyException

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Exceptions; <?php namespace BookStack\Exceptions;
class UserRegistrationException extends NotifyException class UserRegistrationException extends NotifyException

View File

@ -1,16 +1,16 @@
<?php <?php
namespace Oxbow\Http\Controllers\Auth; namespace BookStack\Http\Controllers\Auth;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Oxbow\Exceptions\SocialSignInException; use BookStack\Exceptions\SocialSignInException;
use Oxbow\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use Oxbow\Repos\UserRepo; use BookStack\Repos\UserRepo;
use Oxbow\Services\EmailConfirmationService; use BookStack\Services\EmailConfirmationService;
use Oxbow\Services\SocialAuthService; use BookStack\Services\SocialAuthService;
use Oxbow\SocialAccount; use BookStack\SocialAccount;
use Validator; use Validator;
use Oxbow\Http\Controllers\Controller; use BookStack\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins; use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
@ -131,7 +131,7 @@ class AuthController extends Controller
* @param bool|false|SocialAccount $socialAccount * @param bool|false|SocialAccount $socialAccount
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
* @throws UserRegistrationException * @throws UserRegistrationException
* @throws \Oxbow\Exceptions\ConfirmationEmailException * @throws \BookStack\Exceptions\ConfirmationEmailException
*/ */
protected function registerUser(array $userData, $socialAccount = false) protected function registerUser(array $userData, $socialAccount = false)
{ {

View File

@ -1,8 +1,8 @@
<?php <?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; use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController extends Controller class PasswordController extends Controller

View File

@ -1,16 +1,16 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Activity; use Activity;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Repos\BookRepo; use BookStack\Repos\BookRepo;
use Oxbow\Repos\ChapterRepo; use BookStack\Repos\ChapterRepo;
use Oxbow\Repos\PageRepo; use BookStack\Repos\PageRepo;
class BookController extends Controller class BookController extends Controller
{ {

View File

@ -1,15 +1,15 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Activity; use Activity;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Http\Controllers\Controller; use BookStack\Http\Controllers\Controller;
use Oxbow\Repos\BookRepo; use BookStack\Repos\BookRepo;
use Oxbow\Repos\ChapterRepo; use BookStack\Repos\ChapterRepo;
class ChapterController extends Controller class ChapterController extends Controller
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use HttpRequestException; use HttpRequestException;
use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Bus\DispatchesJobs;
@ -9,7 +9,7 @@ use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;
use Oxbow\User; use BookStack\User;
abstract class Controller extends BaseController abstract class Controller extends BaseController
{ {

View File

@ -1,14 +1,14 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Http\Controllers\Controller; use BookStack\Http\Controllers\Controller;
use Oxbow\Repos\BookRepo; use BookStack\Repos\BookRepo;
use Oxbow\Services\ActivityService; use BookStack\Services\ActivityService;
use Oxbow\Services\Facades\Activity; use BookStack\Services\Facades\Activity;
class HomeController extends Controller class HomeController extends Controller
{ {

View File

@ -1,15 +1,15 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Illuminate\Filesystem\Filesystem as File; use Illuminate\Filesystem\Filesystem as File;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Intervention\Image\Facades\Image as ImageTool; use Intervention\Image\Facades\Image as ImageTool;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Image; use BookStack\Image;
use Oxbow\Repos\PageRepo; use BookStack\Repos\PageRepo;
class ImageController extends Controller class ImageController extends Controller
{ {

View File

@ -1,15 +1,15 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Activity; use Activity;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Repos\BookRepo; use BookStack\Repos\BookRepo;
use Oxbow\Repos\ChapterRepo; use BookStack\Repos\ChapterRepo;
use Oxbow\Repos\PageRepo; use BookStack\Repos\PageRepo;
class PageController extends Controller class PageController extends Controller
{ {

View File

@ -1,14 +1,14 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Http\Controllers\Controller; use BookStack\Http\Controllers\Controller;
use Oxbow\Repos\BookRepo; use BookStack\Repos\BookRepo;
use Oxbow\Repos\ChapterRepo; use BookStack\Repos\ChapterRepo;
use Oxbow\Repos\PageRepo; use BookStack\Repos\PageRepo;
class SearchController extends Controller class SearchController extends Controller
{ {

View File

@ -1,11 +1,11 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Http\Controllers\Controller; use BookStack\Http\Controllers\Controller;
use Setting; use Setting;
class SettingController extends Controller class SettingController extends Controller

View File

@ -1,14 +1,14 @@
<?php <?php
namespace Oxbow\Http\Controllers; namespace BookStack\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use Oxbow\Http\Requests; use BookStack\Http\Requests;
use Oxbow\Repos\UserRepo; use BookStack\Repos\UserRepo;
use Oxbow\Services\SocialAuthService; use BookStack\Services\SocialAuthService;
use Oxbow\User; use BookStack\User;
class UserController extends Controller class UserController extends Controller
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http; namespace BookStack\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel; use Illuminate\Foundation\Http\Kernel as HttpKernel;
@ -13,11 +13,11 @@ class Kernel extends HttpKernel
*/ */
protected $middleware = [ protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Oxbow\Http\Middleware\EncryptCookies::class, \BookStack\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class, \Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::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 * @var array
*/ */
protected $routeMiddleware = [ protected $routeMiddleware = [
'auth' => \Oxbow\Http\Middleware\Authenticate::class, 'auth' => \BookStack\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \Oxbow\Http\Middleware\RedirectIfAuthenticated::class, 'guest' => \BookStack\Http\Middleware\RedirectIfAuthenticated::class,
'perm' => \Oxbow\Http\Middleware\PermissionMiddleware::class 'perm' => \BookStack\Http\Middleware\PermissionMiddleware::class
]; ];
} }

View File

@ -1,10 +1,10 @@
<?php <?php
namespace Oxbow\Http\Middleware; namespace BookStack\Http\Middleware;
use Closure; use Closure;
use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Guard;
use Oxbow\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use Setting; use Setting;
class Authenticate class Authenticate

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Middleware; namespace BookStack\Http\Middleware;
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter; use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Middleware; namespace BookStack\Http\Middleware;
use Closure; use Closure;
use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Session;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Middleware; namespace BookStack\Http\Middleware;
use Closure; use Closure;
use Illuminate\Contracts\Auth\Guard; use Illuminate\Contracts\Auth\Guard;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Middleware; namespace BookStack\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Http\Requests; namespace BookStack\Http\Requests;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
class Image extends Entity class Image extends Entity

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Jobs; namespace BookStack\Jobs;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -19,12 +19,12 @@ class Page extends Entity
public function book() public function book()
{ {
return $this->belongsTo('Oxbow\Book'); return $this->belongsTo('BookStack\Book');
} }
public function chapter() public function chapter()
{ {
return $this->belongsTo('Oxbow\Chapter'); return $this->belongsTo('BookStack\Chapter');
} }
public function hasChapter() public function hasChapter()
@ -35,7 +35,7 @@ class Page extends Entity
public function revisions() public function revisions()
{ {
return $this->hasMany('Oxbow\PageRevision')->orderBy('created_at', 'desc'); return $this->hasMany('BookStack\PageRevision')->orderBy('created_at', 'desc');
} }
public function getUrl() public function getUrl()

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -10,12 +10,12 @@ class PageRevision extends Model
public function createdBy() public function createdBy()
{ {
return $this->belongsTo('Oxbow\User', 'created_by'); return $this->belongsTo('BookStack\User', 'created_by');
} }
public function page() public function page()
{ {
return $this->belongsTo('Oxbow\Page'); return $this->belongsTo('BookStack\Page');
} }
public function getUrl() public function getUrl()

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -11,6 +11,6 @@ class Permission extends Model
*/ */
public function roles() public function roles()
{ {
return $this->belongsToMany('Oxbow\Permissions'); return $this->belongsToMany('BookStack\Permissions');
} }
} }

View File

@ -1,10 +1,10 @@
<?php <?php
namespace Oxbow\Providers; namespace BookStack\Providers;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Oxbow\User; use BookStack\User;
class AppServiceProvider extends ServiceProvider class AppServiceProvider extends ServiceProvider
{ {

View File

@ -1,10 +1,10 @@
<?php <?php
namespace Oxbow\Providers; namespace BookStack\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Oxbow\Services\ActivityService; use BookStack\Services\ActivityService;
use Oxbow\Services\SettingService; use BookStack\Services\SettingService;
class CustomFacadeProvider extends ServiceProvider class CustomFacadeProvider extends ServiceProvider
{ {
@ -26,12 +26,12 @@ class CustomFacadeProvider extends ServiceProvider
public function register() public function register()
{ {
$this->app->bind('activity', function() { $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() { $this->app->bind('setting', function() {
return new SettingService( return new SettingService(
$this->app->make('Oxbow\Setting'), $this->app->make('BookStack\Setting'),
$this->app->make('Illuminate\Contracts\Cache\Repository') $this->app->make('Illuminate\Contracts\Cache\Repository')
); );
}); });

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Providers; namespace BookStack\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
@ -13,8 +13,8 @@ class EventServiceProvider extends ServiceProvider
* @var array * @var array
*/ */
protected $listen = [ protected $listen = [
'Oxbow\Events\SomeEvent' => [ 'BookStack\Events\SomeEvent' => [
'Oxbow\Listeners\EventListener', 'BookStack\Listeners\EventListener',
], ],
]; ];

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow\Providers; namespace BookStack\Providers;
use Illuminate\Routing\Router; use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
@ -14,7 +14,7 @@ class RouteServiceProvider extends ServiceProvider
* *
* @var string * @var string
*/ */
protected $namespace = 'Oxbow\Http\Controllers'; protected $namespace = 'BookStack\Http\Controllers';
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Providers; <?php namespace BookStack\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;

View File

@ -1,7 +1,7 @@
<?php namespace Oxbow\Repos; <?php namespace BookStack\Repos;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Oxbow\Book; use BookStack\Book;
class BookRepo class BookRepo
{ {

View File

@ -1,8 +1,8 @@
<?php namespace Oxbow\Repos; <?php namespace BookStack\Repos;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Oxbow\Chapter; use BookStack\Chapter;
class ChapterRepo class ChapterRepo
{ {

View File

@ -1,10 +1,10 @@
<?php namespace Oxbow\Repos; <?php namespace BookStack\Repos;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Oxbow\Page; use BookStack\Page;
use Oxbow\PageRevision; use BookStack\PageRevision;
class PageRepo class PageRepo
{ {

View File

@ -1,8 +1,8 @@
<?php namespace Oxbow\Repos; <?php namespace BookStack\Repos;
use Oxbow\Role; use BookStack\Role;
use Oxbow\User; use BookStack\User;
class UserRepo class UserRepo
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -17,7 +17,7 @@ class Role extends Model
*/ */
public function users() public function users()
{ {
return $this->belongsToMany('Oxbow\User'); return $this->belongsToMany('BookStack\User');
} }
/** /**
@ -25,7 +25,7 @@ class Role extends Model
*/ */
public function permissions() public function permissions()
{ {
return $this->belongsToMany('Oxbow\Permission'); return $this->belongsToMany('BookStack\Permission');
} }
/** /**

View File

@ -1,8 +1,8 @@
<?php namespace Oxbow\Services; <?php namespace BookStack\Services;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Oxbow\Activity; use BookStack\Activity;
use Oxbow\Entity; use BookStack\Entity;
use Session; use Session;
class ActivityService class ActivityService
@ -100,7 +100,7 @@ class ActivityService
*/ */
function entityActivity($entity, $count = 20, $page = 0) 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(); ->skip($count * $page)->take($count)->get();
return $this->filterSimilar($activity); return $this->filterSimilar($activity);

View File

@ -1,15 +1,15 @@
<?php namespace Oxbow\Services; <?php namespace BookStack\Services;
use Carbon\Carbon; use Carbon\Carbon;
use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Mail\Message; use Illuminate\Mail\Message;
use Oxbow\EmailConfirmation; use BookStack\EmailConfirmation;
use Oxbow\Exceptions\ConfirmationEmailException; use BookStack\Exceptions\ConfirmationEmailException;
use Oxbow\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use Oxbow\Repos\UserRepo; use BookStack\Repos\UserRepo;
use Oxbow\Setting; use BookStack\Setting;
use Oxbow\User; use BookStack\User;
class EmailConfirmationService class EmailConfirmationService
{ {

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Services\Facades; <?php namespace BookStack\Services\Facades;
use Illuminate\Support\Facades\Facade; use Illuminate\Support\Facades\Facade;

View File

@ -1,4 +1,4 @@
<?php namespace Oxbow\Services\Facades; <?php namespace BookStack\Services\Facades;
use Illuminate\Support\Facades\Facade; use Illuminate\Support\Facades\Facade;

View File

@ -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; 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. * The settings are a simple key-value database store.
* *
* @package Oxbow\Services * @package BookStack\Services
*/ */
class SettingService class SettingService
{ {

View File

@ -1,14 +1,14 @@
<?php namespace Oxbow\Services; <?php namespace BookStack\Services;
use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\ClientException;
use Laravel\Socialite\Contracts\Factory as Socialite; use Laravel\Socialite\Contracts\Factory as Socialite;
use Oxbow\Exceptions\SocialDriverNotConfigured; use BookStack\Exceptions\SocialDriverNotConfigured;
use Oxbow\Exceptions\SocialSignInException; use BookStack\Exceptions\SocialSignInException;
use Oxbow\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use Oxbow\Http\Controllers\Auth\AuthController; use BookStack\Http\Controllers\Auth\AuthController;
use Oxbow\Repos\UserRepo; use BookStack\Repos\UserRepo;
use Oxbow\SocialAccount; use BookStack\SocialAccount;
use Oxbow\User; use BookStack\User;
class SocialAuthService class SocialAuthService
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -11,6 +11,6 @@ class SocialAccount extends Model
public function user() public function user()
{ {
return $this->belongsTo('Oxbow\User'); return $this->belongsTo('BookStack\User');
} }
} }

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Oxbow; namespace BookStack;
use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
@ -53,7 +53,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
*/ */
public function roles() public function roles()
{ {
return $this->belongsToMany('Oxbow\Role'); return $this->belongsToMany('BookStack\Role');
} }
public function getRoleAttribute() public function getRoleAttribute()
@ -103,7 +103,7 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
*/ */
public function socialAccounts() public function socialAccounts()
{ {
return $this->hasMany('Oxbow\SocialAccount'); return $this->hasMany('BookStack\SocialAccount');
} }
/** /**

View File

@ -28,17 +28,17 @@ $app = new Illuminate\Foundation\Application(
$app->singleton( $app->singleton(
Illuminate\Contracts\Http\Kernel::class, Illuminate\Contracts\Http\Kernel::class,
Oxbow\Http\Kernel::class BookStack\Http\Kernel::class
); );
$app->singleton( $app->singleton(
Illuminate\Contracts\Console\Kernel::class, Illuminate\Contracts\Console\Kernel::class,
Oxbow\Console\Kernel::class BookStack\Console\Kernel::class
); );
$app->singleton( $app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class, Illuminate\Contracts\Debug\ExceptionHandler::class,
Oxbow\Exceptions\Handler::class BookStack\Exceptions\Handler::class
); );
/* /*

View File

@ -22,7 +22,7 @@
"database" "database"
], ],
"psr-4": { "psr-4": {
"Oxbow\\": "app/" "BookStack\\": "app/"
} }
}, },
"autoload-dev": { "autoload-dev": {

View File

@ -148,10 +148,10 @@ return [
/* /*
* Application Service Providers... * Application Service Providers...
*/ */
Oxbow\Providers\AppServiceProvider::class, BookStack\Providers\AppServiceProvider::class,
Oxbow\Providers\EventServiceProvider::class, BookStack\Providers\EventServiceProvider::class,
Oxbow\Providers\RouteServiceProvider::class, BookStack\Providers\RouteServiceProvider::class,
Oxbow\Providers\CustomFacadeProvider::class, BookStack\Providers\CustomFacadeProvider::class,
], ],
@ -212,8 +212,8 @@ return [
* Custom * Custom
*/ */
'Activity' => Oxbow\Services\Facades\Activity::class, 'Activity' => BookStack\Services\Facades\Activity::class,
'Setting' => Oxbow\Services\Facades\Setting::class, 'Setting' => BookStack\Services\Facades\Setting::class,
], ],

View File

@ -28,7 +28,7 @@ return [
| |
*/ */
'model' => Oxbow\User::class, 'model' => BookStack\User::class,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@ return [
], ],
'stripe' => [ 'stripe' => [
'model' => Oxbow\User::class, 'model' => BookStack\User::class,
'key' => '', 'key' => '',
'secret' => '', 'secret' => '',
], ],

View File

@ -11,7 +11,7 @@
| |
*/ */
$factory->define(Oxbow\User::class, function ($faker) { $factory->define(BookStack\User::class, function ($faker) {
return [ return [
'name' => $faker->name, 'name' => $faker->name,
'email' => $faker->email, '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 [ return [
'name' => $faker->sentence, 'name' => $faker->sentence,
'description' => $faker->paragraph 'description' => $faker->paragraph
]; ];
}); });
$factory->define(Oxbow\Chapter::class, function ($faker) { $factory->define(BookStack\Chapter::class, function ($faker) {
return [ return [
'name' => $faker->sentence, 'name' => $faker->sentence,
'description' => $faker->paragraph 'description' => $faker->paragraph
]; ];
}); });
$factory->define(Oxbow\Page::class, function ($faker) { $factory->define(BookStack\Page::class, function ($faker) {
return [ return [
'name' => $faker->sentence, 'name' => $faker->sentence,
'html' => '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>' 'html' => '<p>' . implode('</p>', $faker->paragraphs(5)) . '</p>'

View File

@ -21,7 +21,7 @@ class CreateUsersTable extends Migration
$table->timestamps(); $table->timestamps();
}); });
\Oxbow\User::create([ \BookStack\User::create([
'name' => 'Admin', 'name' => 'Admin',
'email' => 'admin@admin.com', 'email' => 'admin@admin.com',
'password' => \Illuminate\Support\Facades\Hash::make('password') 'password' => \Illuminate\Support\Facades\Hash::make('password')

View File

@ -68,19 +68,19 @@ class AddRolesAndPermissions extends Migration
// Create default roles // Create default roles
$admin = new \Oxbow\Role(); $admin = new \BookStack\Role();
$admin->name = 'admin'; $admin->name = 'admin';
$admin->display_name = 'Admin'; $admin->display_name = 'Admin';
$admin->description = 'Administrator of the whole application'; $admin->description = 'Administrator of the whole application';
$admin->save(); $admin->save();
$editor = new \Oxbow\Role(); $editor = new \BookStack\Role();
$editor->name = 'editor'; $editor->name = 'editor';
$editor->display_name = 'Editor'; $editor->display_name = 'Editor';
$editor->description = 'User can edit Books, Chapters & Pages'; $editor->description = 'User can edit Books, Chapters & Pages';
$editor->save(); $editor->save();
$viewer = new \Oxbow\Role(); $viewer = new \BookStack\Role();
$viewer->name = 'viewer'; $viewer->name = 'viewer';
$viewer->display_name = 'Viewer'; $viewer->display_name = 'Viewer';
$viewer->description = 'User can view books & their content behind authentication'; $viewer->description = 'User can view books & their content behind authentication';
@ -91,7 +91,7 @@ class AddRolesAndPermissions extends Migration
$ops = ['Create', 'Update', 'Delete']; $ops = ['Create', 'Update', 'Delete'];
foreach ($entities as $entity) { foreach ($entities as $entity) {
foreach ($ops as $op) { foreach ($ops as $op) {
$newPermission = new \Oxbow\Permission(); $newPermission = new \BookStack\Permission();
$newPermission->name = strtolower($entity) . '-' . strtolower($op); $newPermission->name = strtolower($entity) . '-' . strtolower($op);
$newPermission->display_name = $op . ' ' . $entity . 's'; $newPermission->display_name = $op . ' ' . $entity . 's';
$newPermission->save(); $newPermission->save();
@ -105,7 +105,7 @@ class AddRolesAndPermissions extends Migration
$ops = ['Create', 'Update', 'Delete']; $ops = ['Create', 'Update', 'Delete'];
foreach ($entities as $entity) { foreach ($entities as $entity) {
foreach ($ops as $op) { foreach ($ops as $op) {
$newPermission = new \Oxbow\Permission(); $newPermission = new \BookStack\Permission();
$newPermission->name = strtolower($entity) . '-' . strtolower($op); $newPermission->name = strtolower($entity) . '-' . strtolower($op);
$newPermission->display_name = $op . ' ' . $entity; $newPermission->display_name = $op . ' ' . $entity;
$newPermission->save(); $newPermission->save();
@ -115,7 +115,7 @@ class AddRolesAndPermissions extends Migration
// Set all current users as admins // Set all current users as admins
// (At this point only the initially create user should be an admin) // (At this point only the initially create user should be an admin)
$users = \Oxbow\User::all(); $users = \BookStack\User::all();
foreach ($users as $user) { foreach ($users as $user) {
$user->attachRole($admin); $user->attachRole($admin);
} }

View File

@ -1,5 +1,5 @@
suites: suites:
main: main:
namespace: Oxbow namespace: BookStack
psr4_prefix: Oxbow psr4_prefix: BookStack
src_path: app src_path: app

View File

@ -35,9 +35,9 @@
<div class="form-group"> <div class="form-group">
<label for="setting-registration-role">Default user role after registration</label> <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> <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}}" <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 }} {{ $role->display_name }}
</option> </option>

View File

@ -11,7 +11,7 @@
@if($currentUser->can('user-update')) @if($currentUser->can('user-update'))
<div class="form-group"> <div class="form-group">
<label for="role">User Role</label> <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> </div>
@endif @endif

View File

@ -18,7 +18,7 @@ class EntityTest extends TestCase
$this->bookDelete($book); $this->bookDelete($book);
} }
public function bookDelete(\Oxbow\Book $book) public function bookDelete(\BookStack\Book $book)
{ {
$this->asAdmin() $this->asAdmin()
->visit($book->getUrl()) ->visit($book->getUrl())
@ -32,7 +32,7 @@ class EntityTest extends TestCase
->notSeeInDatabase('books', ['id' => $book->id]); ->notSeeInDatabase('books', ['id' => $book->id]);
} }
public function bookUpdate(\Oxbow\Book $book) public function bookUpdate(\BookStack\Book $book)
{ {
$newName = $book->name . ' Updated'; $newName = $book->name . ' Updated';
$this->asAdmin() $this->asAdmin()
@ -46,12 +46,12 @@ class EntityTest extends TestCase
->seePageIs($book->getUrl() . '-updated') ->seePageIs($book->getUrl() . '-updated')
->see($newName); ->see($newName);
return \Oxbow\Book::find($book->id); return \BookStack\Book::find($book->id);
} }
public function pageCreation($chapter) public function pageCreation($chapter)
{ {
$page = factory(\Oxbow\Page::class)->make([ $page = factory(\BookStack\Page::class)->make([
'name' => 'My First Page' 'name' => 'My First Page'
]); ]);
@ -68,13 +68,13 @@ class EntityTest extends TestCase
->seePageIs($chapter->book->getUrl() . '/page/my-first-page') ->seePageIs($chapter->book->getUrl() . '/page/my-first-page')
->see($page->name); ->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; 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' 'name' => 'My First Chapter'
]); ]);
@ -91,13 +91,13 @@ class EntityTest extends TestCase
->seePageIs($book->getUrl() . '/chapter/my-first-chapter') ->seePageIs($book->getUrl() . '/chapter/my-first-chapter')
->see($chapter->name)->see($chapter->description); ->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; return $chapter;
} }
public function bookCreation() public function bookCreation()
{ {
$book = factory(\Oxbow\Book::class)->make([ $book = factory(\BookStack\Book::class)->make([
'name' => 'My First Book' 'name' => 'My First Book'
]); ]);
$this->asAdmin() $this->asAdmin()
@ -113,7 +113,7 @@ class EntityTest extends TestCase
->seePageIs('/books/my-first-book') ->seePageIs('/books/my-first-book')
->see($book->name)->see($book->description); ->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; return $book;
} }

View File

@ -32,7 +32,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
public function asAdmin() public function asAdmin()
{ {
if($this->admin === null) { if($this->admin === null) {
$this->admin = \Oxbow\User::find(1); $this->admin = \BookStack\User::find(1);
} }
return $this->actingAs($this->admin); return $this->actingAs($this->admin);
} }