mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-07-09 15:27:32 +00:00
Use require_once
instead of include_once
in all cases.
This commit is contained in:
parent
ca86925bb3
commit
dc4a25c8cf
@ -621,7 +621,7 @@ class Page {
|
||||
$time = microtime(true) - $this->time;
|
||||
echo "<!-- Page generated in $time seconds. -->";
|
||||
|
||||
include_once './inc/footer.php';
|
||||
require_once './inc/footer.php';
|
||||
}
|
||||
|
||||
function append_param($url, $param) {
|
||||
|
@ -9,7 +9,7 @@ final class LangTest extends TestCase {
|
||||
$dir = './lang';
|
||||
$langs = glob("$dir/*.php");
|
||||
foreach ($langs as $lang) {
|
||||
include_once $lang;
|
||||
require_once $lang;
|
||||
$lang_class = $lang;
|
||||
$lang_class = substr($lang_class, strlen("$dir/")); // grab "en_US.utf8.php" from "./lang/en_US.utf8.php"
|
||||
$lang_class = substr($lang_class, 0, strpos($lang_class, ".")); // grab "en_US" from "en_US.utf8.php"
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
include_once './inc/page.php';
|
||||
require_once './inc/page.php';
|
||||
|
||||
final class PageTest extends TestCase {
|
||||
public function testBansPagerHTML(): void {
|
||||
|
@ -8,7 +8,7 @@ if ($page->settings->simple_urls && count($_GET) !== 0) {
|
||||
if ($target !== "index" && strlen($target) <= 16 && preg_match("/^[a-z]+$/", $target)) {
|
||||
$local_script = "./${target}.php";
|
||||
if (file_exists($local_script)) {
|
||||
include_once $local_script;
|
||||
require_once $local_script;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user