mirror of
				https://gitlab.com/ruany/litebans-php.git
				synced 2025-10-29 22:12:25 +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; |         $time = microtime(true) - $this->time; | ||||||
|         echo "<!-- Page generated in $time seconds. -->"; |         echo "<!-- Page generated in $time seconds. -->"; | ||||||
| 
 | 
 | ||||||
|         include_once './inc/footer.php'; |         require_once './inc/footer.php'; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     function append_param($url, $param) { |     function append_param($url, $param) { | ||||||
|  | |||||||
| @ -9,7 +9,7 @@ final class LangTest extends TestCase { | |||||||
|         $dir = './lang'; |         $dir = './lang'; | ||||||
|         $langs = glob("$dir/*.php"); |         $langs = glob("$dir/*.php"); | ||||||
|         foreach ($langs as $lang) { |         foreach ($langs as $lang) { | ||||||
|             include_once $lang; |             require_once $lang; | ||||||
|             $lang_class = $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, 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"
 |             $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; | use PHPUnit\Framework\TestCase; | ||||||
| 
 | 
 | ||||||
| include_once './inc/page.php'; | require_once './inc/page.php'; | ||||||
| 
 | 
 | ||||||
| final class PageTest extends TestCase { | final class PageTest extends TestCase { | ||||||
|     public function testBansPagerHTML(): void { |     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)) { |     if ($target !== "index" && strlen($target) <= 16 && preg_match("/^[a-z]+$/", $target)) { | ||||||
|         $local_script = "./${target}.php"; |         $local_script = "./${target}.php"; | ||||||
|         if (file_exists($local_script)) { |         if (file_exists($local_script)) { | ||||||
|             include_once $local_script; |             require_once $local_script; | ||||||
|             return; |             return; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 ruan
						ruan