Skip to content

Commit

Permalink
Fixes #3520 thump.php failing when custom site_path in use.
Browse files Browse the repository at this point in the history
  • Loading branch information
CaMer0n committed Nov 8, 2018
1 parent 12dece2 commit 5073dcd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions e107_handlers/e107_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,13 @@ protected function _init($e107_paths, $e107_root_path, $e107_config_mysql_info,
$this->e107_config_mysql_info = $e107_config_mysql_info;

// unique folder for e_MEDIA - support for multiple websites from single-install. Must be set before setDirs()
if (!empty($e107_config_override['site_path']))
/* if (!empty($e107_config_override['site_path']))
{
// $E107_CONFIG['site_path']
$this->site_path = $e107_config_override['site_path'];
}
else
}*/

if(empty($e107_config_override['site_path']))
{
$this->site_path = $this->makeSiteHash($e107_config_mysql_info['mySQLdefaultdb'], $e107_config_mysql_info['mySQLprefix']);
}
Expand Down Expand Up @@ -457,6 +458,11 @@ function makeSiteHash($db, $prefix) // also used by install.
*/
public function setDirs($e107_dirs, $e107_config_override = array())
{
if(!empty($e107_config_override['site_path'])) // $E107_CONFIG['site_path']
{
$this->site_path = $e107_config_override['site_path'];
}

$override = array_merge((array) $e107_dirs, (array) $e107_config_override);

// override all
Expand Down

0 comments on commit 5073dcd

Please sign in to comment.