Commit bd224b4a authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) remove parse_config in auth.inc and fix load order

parent 9fd5d603
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("config.inc");
require_once("auth.inc"); require_once("auth.inc");
require_once("config.lib.inc");
require_once("functions.inc"); require_once("functions.inc");
require_once("captiveportal.inc"); require_once("captiveportal.inc");
......
...@@ -45,9 +45,6 @@ require_once("certs.inc"); ...@@ -45,9 +45,6 @@ require_once("certs.inc");
require_once("radius.inc"); require_once("radius.inc");
$config = parse_config();
//
// Will be changed to false if security checks fail // Will be changed to false if security checks fail
$security_passed = true; $security_passed = true;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* *
*/ */
require_once("config.lib.inc"); require_once("config.inc");
require_once("auth.inc"); require_once("auth.inc");
openlog("squid", LOG_ODELAY, LOG_AUTH); openlog("squid", LOG_ODELAY, LOG_AUTH);
......
...@@ -141,8 +141,6 @@ function array_merge_recursive_unique($array0, $array1) { ...@@ -141,8 +141,6 @@ function array_merge_recursive_unique($array0, $array1) {
*/ */
function get_notices_xmlrpc($category = null) function get_notices_xmlrpc($category = null)
{ {
require_once("notices.inc");
if ($category==null) { if ($category==null) {
return get_notices(); return get_notices();
} else { } else {
...@@ -192,14 +190,12 @@ function interfaces_carp_configure_xmlrpc() ...@@ -192,14 +190,12 @@ function interfaces_carp_configure_xmlrpc()
function filter_configure_xmlrpc() function filter_configure_xmlrpc()
{ {
global $config; global $config;
require_once("config.inc");
require_once("filter.inc"); require_once("filter.inc");
require_once("system.inc"); require_once("system.inc");
require_once("gwlb.inc"); require_once("gwlb.inc");
require_once("vslb.inc"); require_once("vslb.inc");
require_once("openvpn.inc"); require_once("openvpn.inc");
require_once("services.inc"); require_once("services.inc");
require_once("auth.inc");
filter_configure(); filter_configure();
system_routing_configure(); system_routing_configure();
...@@ -229,8 +225,6 @@ function filter_configure_xmlrpc() ...@@ -229,8 +225,6 @@ function filter_configure_xmlrpc()
function merge_config_section_xmlrpc($confData) function merge_config_section_xmlrpc($confData)
{ {
global $config; global $config;
require_once("config.inc");
$config_new = array_merge_recursive($config, $confData); $config_new = array_merge_recursive($config, $confData);
$config = $config_new; $config = $config_new;
$mergedkeys = implode(",", array_keys($confData)); $mergedkeys = implode(",", array_keys($confData));
...@@ -246,7 +240,6 @@ function merge_config_section_xmlrpc($confData) ...@@ -246,7 +240,6 @@ function merge_config_section_xmlrpc($confData)
function restore_config_section_xmlrpc($new_config) function restore_config_section_xmlrpc($new_config)
{ {
global $config; global $config;
require_once("config.inc");
require_once("interfaces.inc"); require_once("interfaces.inc");
// TODO: initial cleanup operation performed, but a full rewrite is probably a better plan. // TODO: initial cleanup operation performed, but a full rewrite is probably a better plan.
...@@ -369,7 +362,6 @@ function restore_config_section_xmlrpc($new_config) ...@@ -369,7 +362,6 @@ function restore_config_section_xmlrpc($new_config)
function backup_config_section_xmlrpc($sectionKeys) function backup_config_section_xmlrpc($sectionKeys)
{ {
global $config; global $config;
require_once("config.inc");
if (!is_array($sectionKeys)) { if (!is_array($sectionKeys)) {
// single item // single item
return array_intersect_key($config, array($sectionKeys => 0)); return array_intersect_key($config, array($sectionKeys => 0));
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*/ */
require_once("functions.inc"); require_once("functions.inc");
require_once("config.inc");
require_once("captiveportal.inc"); require_once("captiveportal.inc");
require_once("util.inc"); require_once("util.inc");
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("config.lib.inc");
require_once("guiconfig.inc"); require_once("guiconfig.inc");
// list backups // list backups
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*/ */
require_once("xmlrpc.inc"); require_once("config.inc");
require_once("config.lib.inc");
require_once("auth.inc"); require_once("auth.inc");
require_once("xmlrpc.inc");
/** /**
* do a basic authentication, uses $_SERVER['HTTP_AUTHORIZATION'] to validate user. * do a basic authentication, uses $_SERVER['HTTP_AUTHORIZATION'] to validate user.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment