diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-05-22 13:20:31 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 2899ebb5b5e82890c877151f5c02045266ac9973 (patch) | |
tree | 0c4e2684c7f6d161f92a21181bfa4b2f78d6a82f /application/front/exceptions | |
parent | af290059d10319e76d1e7d78b592cab99c26d91a (diff) | |
download | Shaarli-2899ebb5b5e82890c877151f5c02045266ac9973.tar.gz Shaarli-2899ebb5b5e82890c877151f5c02045266ac9973.tar.zst Shaarli-2899ebb5b5e82890c877151f5c02045266ac9973.zip |
Initialize admin Slim controllers
- Reorganize visitor controllers
- Fix redirection with Slim's requests base path
- Fix daily links
Diffstat (limited to 'application/front/exceptions')
-rw-r--r-- | application/front/exceptions/LoginBannedException.php | 2 | ||||
-rw-r--r-- | application/front/exceptions/ShaarliFrontException.php (renamed from application/front/exceptions/ShaarliException.php) | 2 | ||||
-rw-r--r-- | application/front/exceptions/ThumbnailsDisabledException.php | 2 | ||||
-rw-r--r-- | application/front/exceptions/UnauthorizedException.php | 15 |
4 files changed, 18 insertions, 3 deletions
diff --git a/application/front/exceptions/LoginBannedException.php b/application/front/exceptions/LoginBannedException.php index b31a4a14..79d0ea15 100644 --- a/application/front/exceptions/LoginBannedException.php +++ b/application/front/exceptions/LoginBannedException.php | |||
@@ -4,7 +4,7 @@ declare(strict_types=1); | |||
4 | 4 | ||
5 | namespace Shaarli\Front\Exception; | 5 | namespace Shaarli\Front\Exception; |
6 | 6 | ||
7 | class LoginBannedException extends ShaarliException | 7 | class LoginBannedException extends ShaarliFrontException |
8 | { | 8 | { |
9 | public function __construct() | 9 | public function __construct() |
10 | { | 10 | { |
diff --git a/application/front/exceptions/ShaarliException.php b/application/front/exceptions/ShaarliFrontException.php index 800bfbec..fc8eb92b 100644 --- a/application/front/exceptions/ShaarliException.php +++ b/application/front/exceptions/ShaarliFrontException.php | |||
@@ -13,7 +13,7 @@ use Throwable; | |||
13 | * | 13 | * |
14 | * @package Front\Exception | 14 | * @package Front\Exception |
15 | */ | 15 | */ |
16 | abstract class ShaarliException extends \Exception | 16 | abstract class ShaarliFrontException extends \Exception |
17 | { | 17 | { |
18 | /** Override parent constructor to force $message and $httpCode parameters to be set. */ | 18 | /** Override parent constructor to force $message and $httpCode parameters to be set. */ |
19 | public function __construct(string $message, int $httpCode, Throwable $previous = null) | 19 | public function __construct(string $message, int $httpCode, Throwable $previous = null) |
diff --git a/application/front/exceptions/ThumbnailsDisabledException.php b/application/front/exceptions/ThumbnailsDisabledException.php index 1b9cf5b7..0ed337f5 100644 --- a/application/front/exceptions/ThumbnailsDisabledException.php +++ b/application/front/exceptions/ThumbnailsDisabledException.php | |||
@@ -4,7 +4,7 @@ declare(strict_types=1); | |||
4 | 4 | ||
5 | namespace Shaarli\Front\Exception; | 5 | namespace Shaarli\Front\Exception; |
6 | 6 | ||
7 | class ThumbnailsDisabledException extends ShaarliException | 7 | class ThumbnailsDisabledException extends ShaarliFrontException |
8 | { | 8 | { |
9 | public function __construct() | 9 | public function __construct() |
10 | { | 10 | { |
diff --git a/application/front/exceptions/UnauthorizedException.php b/application/front/exceptions/UnauthorizedException.php new file mode 100644 index 00000000..4231094a --- /dev/null +++ b/application/front/exceptions/UnauthorizedException.php | |||
@@ -0,0 +1,15 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Shaarli\Front\Exception; | ||
6 | |||
7 | /** | ||
8 | * Class UnauthorizedException | ||
9 | * | ||
10 | * Exception raised if the user tries to access a ShaarliAdminController while logged out. | ||
11 | */ | ||
12 | class UnauthorizedException extends \Exception | ||
13 | { | ||
14 | |||
15 | } | ||