Return backend 404 from files controller
This commit is contained in:
parent
4f7c5cc1e7
commit
2fb44fdbee
|
|
@ -1,7 +1,8 @@
|
|||
<?php namespace Backend\Controllers;
|
||||
|
||||
use App;
|
||||
use View;
|
||||
use Backend;
|
||||
use Response;
|
||||
use System\Models\File as FileModel;
|
||||
use Backend\Classes\Controller;
|
||||
use ApplicationException;
|
||||
|
|
@ -30,7 +31,7 @@ class Files extends Controller
|
|||
}
|
||||
catch (Exception $ex) {}
|
||||
|
||||
return App::make('Cms\Classes\Controller')->setStatusCode(404)->run('/404');
|
||||
return Response::make(View::make('backend::404'), 404);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -48,7 +49,7 @@ class Files extends Controller
|
|||
}
|
||||
catch (Exception $ex) {}
|
||||
|
||||
return App::make('Cms\Classes\Controller')->setStatusCode(404)->run('/404');
|
||||
return Response::make(View::make('backend::404'), 404);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -110,7 +111,7 @@ class Files extends Controller
|
|||
if (!$file = FileModel::find((int) $id)) {
|
||||
throw new ApplicationException('Unable to find file');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ensure that the file model utilized for this request is
|
||||
* the one specified in the relationship configuration
|
||||
|
|
@ -135,4 +136,4 @@ class Files extends Controller
|
|||
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue