Skip to content

Commit fb66b78

Browse files
committed
- Added Warning message when network configuration is disabled.
- Added some general php settings to config.inc.php
1 parent a04614c commit fb66b78

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

install/tpl/config.inc.php.master

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
4+
Copyright (c) 2007 - 2008, Till Brehm, projektfarm Gmbh
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,
@@ -34,10 +34,23 @@ if( !empty($_SERVER['DOCUMENT_ROOT']) ) {
3434
Header("Pragma: no-cache");
3535
Header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
3636
Header("Content-Type: text/html; charset=utf-8");
37-
37+
38+
//** Set a few php.ini values
3839
ini_set('register_globals',0);
40+
ini_set('magic_quotes_gpc', 0);
41+
42+
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
43+
die('Internal Error: GLOBALS override attempt detected');
44+
exit;
45+
}
3946
}
4047

48+
//** Set a few php.ini values
49+
set_magic_quotes_runtime(0);
50+
if(isset($app)) unset($app);
51+
if(isset($conf)) unset($conf);
52+
53+
4154
//** SVN Revision
4255
$svn_revision = '$Revision$';
4356
$revision = str_replace(array('Revision:','$',' '), '', $svn_revision);

server/plugins-available/network_settings_plugin.inc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ function update($event_name,$data) {
122122
$app->log("Changed Network settings",LOGLEVEL_DEBUG);
123123

124124
exec('/etc/init.d/networking force-reload');
125+
} else {
126+
if(is_file('/etc/debian_version')) {
127+
$app->log("Network configuration disabled in server settings.",LOGLEVEL_WARN);
128+
} else {
129+
$app->log("Network configuration not available for this linux distribution.",LOGLEVEL_DEBUG);
130+
}
125131
}
126132

127133
}

0 commit comments

Comments
 (0)