Initial upload to Gitea
This commit is contained in:
1 parent
78193254ad
commit
8478998cae
1485 files changed
+461025
-42348
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright 2020 - 2026 grommunio GmbH
|
||||
* SPDX-FileCopyrightText: Copyright 2016 Kopano and its licensors
|
||||
* SPDX-FileCopyrightText: Copyright 2005 - 2016 Zarafa B.V. and its licensors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
/*
|
||||
* This controller script handles REST requests. Every request needs its own controller script
|
||||
* to handle the request. This script will only check if a controller for the request
|
||||
* exists, and if so it will delegate control to that script. If a controller for the
|
||||
* request can not be found, this script will respond with
|
||||
* 404 Not Found
|
||||
*
|
||||
*/
|
||||
|
||||
require_once BASE_PATH . 'server/includes/core/class.response.php';
|
||||
|
||||
$service = $_GET['service'] ?? null;
|
||||
if (!is_string($service) || preg_match('/\A[a-z]+\z/D', $service) !== 1 ||
|
||||
!file_exists(BASE_PATH . 'server/includes/controllers/service.' . $service . '.php')) {
|
||||
Response::notFound();
|
||||
}
|
||||
|
||||
include BASE_PATH . 'server/includes/controllers/service.' . $service . '.php';
|
||||
Reference in new issue
Block a user