aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 30d49539c..88b31efc8 100644
--- a/boot.php
+++ b/boot.php
@@ -749,9 +749,14 @@ if(! function_exists('check_config')) {
// than the currently visited url, store the current value accordingly.
// "Radically different" ignores common variations such as http vs https
// and www.example.com vs example.com.
+ // We will only change the url to an ip address if there is no existing setting
- if((! x($url)) || (! link_compare($url,$a->get_baseurl())))
+ if(! x($url))
$url = set_config('system','url',$a->get_baseurl());
+ if((! link_compare($url,$a->get_baseurl())) && (! preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/",$a->get_hostname)))
+ $url = set_config('system','url',$a->get_baseurl());
+
+
if($build != DB_UPDATE_VERSION) {
$stored = intval($build);