//Upgrade for 3.6.8's default/site/theme logo: If a logo is set, then set this as the 'site logo' and set 'use_logo' to 1 (which means 'use site logo') if ($GLOBALS['configuration']['logo'] && !$GLOBALS['configuration']['site_logo']) { EfrontConfiguration::setValue('use_logo', 1); EfrontConfiguration::setValue('site_logo', $GLOBALS['configuration']['logo']); } $defaultConfig['editor_type'] == 'tinymce_new' ? $editorDir = 'tiny_mce_new' : ($editorDir = 'tiny_mce'); try { $cacheEditor = new FileSystemTree(G_ROOTPATH . 'www/editor/' . $editorDir, true); foreach (new EfrontFileOnlyFilterIterator($cacheEditor->tree) as $key => $value) { if ($value['extension'] == 'gz') { $value->delete(); } } } catch (Exception $e) { } Installation::addModules(true); EfrontStats::createViews(); if (!isset($_GET['unattended'])) { header("location:" . $_SERVER['PHP_SELF'] . "?finish=1&upgrade=1"); exit; } } else { //first, try to connect to the host $db->NConnect($values['db_host'], $values['db_user'], $values['db_password']); //Check whether the db exists. If not, create it try { $db->NConnect($values['db_host'], $values['db_user'], $values['db_password'], $values['db_name']); $db_exists = true; } catch (Exception $e) { $db->Execute("create database " . $values['db_name'] . " DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci"); //Create the new database