viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]
diff --git a/src/controllers/components/SystemComponent.php b/src/controllers/components/SystemComponent.php index 9890fb32c..4bc72a5df 100755 --- a/src/controllers/components/SystemComponent.php +++ b/src/controllers/components/SystemComponent.php @@ -190,20 +190,6 @@ class SystemComponent extends Component ["start_row", "end_row", "num_show"]); } break; - case "updatemode": - $profile = $profile_model->getProfile(C\WORK_DIRECTORY); - if (isset($profile['MEDIA_MODE']) && - $profile['MEDIA_MODE'] == "name_server") { - $profile['MEDIA_MODE'] = "distributed"; - } else { - $profile['MEDIA_MODE'] = "name_server"; - } - $profile_model->updateProfile(C\WORK_DIRECTORY, [], - $profile); - return $parent->redirectWithMessage( - tl('system_component_updatemode_toggled'), - ["start_row", "end_row", "num_show"]); - break; case "log": $log_fields = ["id" => "int", "name"=>"string", "type"=>"string", "f" => "string"]; @@ -278,6 +264,20 @@ class SystemComponent extends Component ["start_row", "end_row", "num_show"]); } break; + case "updatemode": + $profile = $profile_model->getProfile(C\WORK_DIRECTORY); + if (isset($profile['MEDIA_MODE']) && + $profile['MEDIA_MODE'] == "name_server") { + $profile['MEDIA_MODE'] = "distributed"; + } else { + $profile['MEDIA_MODE'] = "name_server"; + } + $profile_model->updateProfile(C\WORK_DIRECTORY, [], + $profile); + return $parent->redirectWithMessage( + tl('system_component_updatemode_toggled'), + ["start_row", "end_row", "num_show"]); + break; } } $parent->pagingLogic($data, $machine_model, "MACHINE", diff --git a/src/library/FetchUrl.php b/src/library/FetchUrl.php index 9b6de1f1f..0f030e194 100755 --- a/src/library/FetchUrl.php +++ b/src/library/FetchUrl.php @@ -779,6 +779,9 @@ class FetchUrl implements CrawlConstants if (C\nsdefined("IS_OWN_WEB_SERVER") && in_array($host, $local_hosts)) { $port = @parse_url($site, PHP_URL_PORT); + if (empty($port)) { + $port = $_SERVER['SERVER_PORT']; + } if ($port == $_SERVER['SERVER_PORT']) { if (empty($GLOBALS['web_site'])) { return "";