Skip to content

Commit 24d7007

Browse files
committed
Remove hardcoded language
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent f68cd30 commit 24d7007

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

controller/manifest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function handle(): JsonResponse
5757
{
5858
if ($this->user->data['is_bot'] || $this->user->data['user_type'] == USER_INACTIVE)
5959
{
60-
throw new http_exception(Response::HTTP_FORBIDDEN, 'Forbidden');
60+
throw new http_exception(Response::HTTP_FORBIDDEN, 'NO_AUTH_OPERATION');
6161
}
6262

6363
$board_path = $this->config['force_server_vars'] ? $this->config['script_path'] : $this->path_helper->get_web_root_path();

ucp/controller/webpush.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function notification(): JsonResponse
100100
{
101101
if (!$this->request->is_ajax() || $this->user->data['is_bot'] || $this->user->data['user_type'] == USER_INACTIVE)
102102
{
103-
throw new http_exception(Response::HTTP_FORBIDDEN, 'Forbidden');
103+
throw new http_exception(Response::HTTP_FORBIDDEN, 'NO_AUTH_OPERATION');
104104
}
105105

106106
if ($this->user->id() !== ANONYMOUS)
@@ -129,7 +129,7 @@ private function get_user_notifications(): string
129129
// Subscribe should only be available for logged-in "normal" users
130130
if ($this->user->data['user_type'] == USER_IGNORE)
131131
{
132-
throw new http_exception(Response::HTTP_FORBIDDEN, 'Forbidden');
132+
throw new http_exception(Response::HTTP_FORBIDDEN, 'NO_AUTH_OPERATION');
133133
}
134134

135135
$item_id = $this->request->variable('item_id', 0);
@@ -189,7 +189,7 @@ private function get_anonymous_notifications(): string
189189
}
190190
}
191191

192-
throw new http_exception(Response::HTTP_FORBIDDEN, 'Forbidden');
192+
throw new http_exception(Response::HTTP_FORBIDDEN, 'NO_AUTH_OPERATION');
193193
}
194194

195195
/**

0 commit comments

Comments
 (0)