0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-03-04 03:57:28 +00:00
nextcloud_server/build/htaccess-checker.php
Joas Schilling 0fc355aa1e
ci(autochecks): Run some autochecks also on non-PHP files
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-02-21 12:12:29 +01:00

20 lines
477 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
/**
* Script to check that the main .htaccess file doesn't include some automated
* changes done by Nextcloud.
*/
$htaccess = file_get_contents(__DIR__ . '/../.htaccess');
if (strpos($htaccess, 'DO NOT CHANGE ANYTHING') !== false) {
echo(".htaccess file has invalid changes!\n");
exit(1);
} else {
exit(0);
}