Aligned setting helper with new get method changes
Also removed old unsused facade that existed for settings.
This commit is contained in:
		
							parent
							
								
									b0f4500c34
								
							
						
					
					
						commit
						54f5bf9437
					
				| 
						 | 
				
			
			@ -183,7 +183,6 @@ return [
 | 
			
		|||
 | 
			
		||||
        // Custom BookStack
 | 
			
		||||
        'Activity' => BookStack\Facades\Activity::class,
 | 
			
		||||
        'Setting'  => BookStack\Facades\Setting::class,
 | 
			
		||||
        'Views'    => BookStack\Facades\Views::class,
 | 
			
		||||
        'Images'   => BookStack\Facades\Images::class,
 | 
			
		||||
        'Permissions' => BookStack\Facades\Permissions::class,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,16 +0,0 @@
 | 
			
		|||
<?php namespace BookStack\Facades;
 | 
			
		||||
 | 
			
		||||
use Illuminate\Support\Facades\Facade;
 | 
			
		||||
 | 
			
		||||
class Setting extends Facade
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * Get the registered name of the component.
 | 
			
		||||
     *
 | 
			
		||||
     * @return string
 | 
			
		||||
     */
 | 
			
		||||
    protected static function getFacadeAccessor()
 | 
			
		||||
    {
 | 
			
		||||
        return 'setting';
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -5,7 +5,6 @@ namespace BookStack\Providers;
 | 
			
		|||
use BookStack\Actions\ActivityService;
 | 
			
		||||
use BookStack\Actions\ViewService;
 | 
			
		||||
use BookStack\Auth\Permissions\PermissionService;
 | 
			
		||||
use BookStack\Settings\SettingService;
 | 
			
		||||
use BookStack\Uploads\ImageService;
 | 
			
		||||
use Illuminate\Support\ServiceProvider;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -36,10 +35,6 @@ class CustomFacadeProvider extends ServiceProvider
 | 
			
		|||
            return $this->app->make(ViewService::class);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $this->app->singleton('setting', function () {
 | 
			
		||||
            return $this->app->make(SettingService::class);
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        $this->app->singleton('images', function () {
 | 
			
		||||
            return $this->app->make(ImageService::class);
 | 
			
		||||
        });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -79,9 +79,9 @@ function userCanOnAny(string $permission, string $entityClass = null): bool
 | 
			
		|||
 | 
			
		||||
/**
 | 
			
		||||
 * Helper to access system settings.
 | 
			
		||||
 * @return bool|string|SettingService
 | 
			
		||||
 * @return mixed|SettingService
 | 
			
		||||
 */
 | 
			
		||||
function setting(string $key = null, $default = false)
 | 
			
		||||
function setting(string $key = null, $default = null)
 | 
			
		||||
{
 | 
			
		||||
    $settingService = resolve(SettingService::class);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue