-if( !file_exists( './LocalSettings.php' ) ) {
- $IP = '.';
- require_once( './includes/DefaultSettings.php' ); # used for printing the version
- require_once( './includes/templates/NoLocalSettings.php' );
+if( !file_exists( "$preIP/LocalSettings.php" ) ) {
+ # DefaultSettings assumes $IP is defined, like it usually is when included
+ # in LocalSettings. But in this case we need to provide the default one.
+ $IP = $preIP;
+ require_once( "$preIP/includes/DefaultSettings.php" ); # used for printing the version
+ require_once( "$preIP/includes/templates/NoLocalSettings.php" );