Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/configuration/configuration_event_handler.php
Show First 20 Lines • Show All 490 Lines • ▼ Show 20 Line(s) | |||||
{ | { | ||||
if ( !isset($template) ) { | if ( !isset($template) ) { | ||||
$template = $this->Application->ConfigValue('HardMaintenanceTemplate'); | $template = $this->Application->ConfigValue('HardMaintenanceTemplate'); | ||||
} | } | ||||
/** @var kCurlHelper $curl_helper */ | /** @var kCurlHelper $curl_helper */ | ||||
$curl_helper = $this->Application->recallObject('CurlHelper'); | $curl_helper = $this->Application->recallObject('CurlHelper'); | ||||
$curl_helper->followLocation = true; | |||||
$html = $curl_helper->Send($this->Application->BaseURL() . '?t=' . $template); | $html = $curl_helper->Send($this->Application->BaseURL() . '?t=' . $template); | ||||
if ( $curl_helper->isGoodResponseCode() ) { | if ( $curl_helper->isGoodResponseCode() ) { | ||||
file_put_contents(WRITEABLE . DIRECTORY_SEPARATOR . 'maintenance.html', $html); | file_put_contents(WRITEABLE . DIRECTORY_SEPARATOR . 'maintenance.html', $html); | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 92 Lines • Show Last 20 Lines |