Project

General

Profile

« Previous | Next » 

Revision aceaf18c

Added by Phil Davis almost 9 years ago

Always use require_once

The usage of require() and require_once() throughout the system is
inconsistent, and "bugs" come up now and then when the order of
"requires" is a bit different and some require() happens after the
include file is already included/required.
It seems to me that there is no harm at all in always using
require_once().

View differences:

src/usr/local/www/diag_reboot.php
66 66
// Set DEBUG to true to prevent the system_reboot() function from being called
67 67
define("DEBUG", false);
68 68

  
69
require("guiconfig.inc");
70
require("functions.inc");
71
require("captiveportal.inc");
69
require_once("guiconfig.inc");
70
require_once("functions.inc");
71
require_once("captiveportal.inc");
72 72

  
73 73
$guitimeout = 90;	// Seconds to wait before reloading the page after reboot
74 74
$guiretry = 20;		// Seconds to try again if $guitimeout was not long enough

Also available in: Unified diff