Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Automatically switch to an SSL connection when
Browse files Browse the repository at this point in the history
running the Live Update (see #3538)
  • Loading branch information
leofeyer committed Jan 5, 2012
1 parent 4e2d3a8 commit 9cd03ac
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Contao Open Source CMS Changelog
Version 2.11.0 (XXXX-XX-XX)
---------------------------

### Improved
When using Contao via SSL, automatically switch to an SSL connection when
running the Live Update (see #3538).

### New
Added the "sqlCompileCommands", "sqlGetFromFile" and "sqlGetFromDB" hooks to the
`DbInstaller` class (see #3281).
Expand Down
10 changes: 10 additions & 0 deletions system/modules/backend/LiveUpdate.php
Expand Up @@ -100,6 +100,16 @@ public function run()
$_SESSION['LIVE_UPDATE_CONFIRM'] = '';
}

// Automatically switch to SSL
if ($this->Environment->ssl)
{
$GLOBALS['TL_CONFIG']['liveUpdateBase'] = str_replace('http://', 'https://', $GLOBALS['TL_CONFIG']['liveUpdateBase']);
}
else
{
$GLOBALS['TL_CONFIG']['liveUpdateBase'] = str_replace('https://', 'http://', $GLOBALS['TL_CONFIG']['liveUpdateBase']);
}

$objTemplate->uid = $GLOBALS['TL_CONFIG']['liveUpdateId'];
$objTemplate->updateServer = $GLOBALS['TL_CONFIG']['liveUpdateBase'] . 'index.php';

Expand Down

0 comments on commit 9cd03ac

Please sign in to comment.