Changeset View
Standalone View
core/install.php
Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Line(s) | |||||
if ( $this->Application->TableFound(TABLE_PREFIX . 'UserSession', true) ) { | if ( $this->Application->TableFound(TABLE_PREFIX . 'UserSession', true) ) { | ||||
// update to 5.2.0 -> rename session table before using it | // update to 5.2.0 -> rename session table before using it | ||||
// don't rename any other table here, since their names could be used in upgrade script | // don't rename any other table here, since their names could be used in upgrade script | ||||
$this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'UserSession TO ' . TABLE_PREFIX . 'UserSessions'); | $this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'UserSession TO ' . TABLE_PREFIX . 'UserSessions'); | ||||
$this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'SessionData TO ' . TABLE_PREFIX . 'UserSessionData'); | $this->Conn->Query('RENAME TABLE ' . TABLE_PREFIX . 'SessionData TO ' . TABLE_PREFIX . 'UserSessionData'); | ||||
} | } | ||||
$next_preset = $this->Application->GetVar('next_preset'); | $next_preset = $this->Application->GetVar('next_preset'); | ||||
if ($next_preset !== false) { | if ($next_preset !== false) { | ||||
Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
Expected 1 spaces after "if" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "if" opening bracket; 0 found | |||||
No blank line found before "if" control structure Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.NoLineBeforeOpen: No blank line found before "if" control structure | |||||
/** @var UserHelper $user_helper */ | |||||
$user_helper = $this->Application->recallObject('UserHelper'); | $user_helper = $this->Application->recallObject('UserHelper'); | ||||
/* @var $user_helper UserHelper */ | |||||
$username = $this->Application->GetVar('login'); | $username = $this->Application->GetVar('login'); | ||||
$password = $this->Application->GetVar('password'); | $password = $this->Application->GetVar('password'); | ||||
if ($username == 'root') { | if ($username == 'root') { | ||||
// verify "root" user using configuration settings | // verify "root" user using configuration settings | ||||
$login_result = $user_helper->loginUser($username, $password); | $login_result = $user_helper->loginUser($username, $password); | ||||
if ($login_result != LoginResult::OK) { | if ($login_result != LoginResult::OK) { | ||||
$error_phrase = $login_result == LoginResult::NO_PERMISSION ? 'la_no_permissions' : 'la_invalid_password'; | $error_phrase = $login_result == LoginResult::NO_PERMISSION ? 'la_no_permissions' : 'la_invalid_password'; | ||||
$this->errorMessage = $this->Application->Phrase($error_phrase) . '. If you don\'t know your username or password, contact Intechnic Support'; | $this->errorMessage = $this->Application->Phrase($error_phrase) . '. If you don\'t know your username or password, contact Intechnic Support'; | ||||
} | } | ||||
} | } | ||||
else { | else { | ||||
// non "root" user -> verify using licensing server | // non "root" user -> verify using licensing server | ||||
$url_params = Array ( | $url_params = Array ( | ||||
'login' => md5($username), | 'login' => md5($username), | ||||
'password' => md5($password), | 'password' => md5($password), | ||||
'action' => 'check', | 'action' => 'check', | ||||
'license_code' => base64_encode( $this->toolkit->systemConfig->get('LicenseCode', 'Intechnic') ), | 'license_code' => base64_encode( $this->toolkit->systemConfig->get('LicenseCode', 'Intechnic') ), | ||||
'version' => '4.3.0',//$this->toolkit->GetMaxModuleVersion('core/'), | 'version' => '4.3.0',//$this->toolkit->GetMaxModuleVersion('core/'), | ||||
'domain' => base64_encode($_SERVER['HTTP_HOST']), | 'domain' => base64_encode($_SERVER['HTTP_HOST']), | ||||
); | ); | ||||
/** @var kCurlHelper $curl_helper */ | |||||
$curl_helper = $this->Application->recallObject('CurlHelper'); | $curl_helper = $this->Application->recallObject('CurlHelper'); | ||||
/* @var $curl_helper kCurlHelper */ | |||||
$curl_helper->SetRequestData($url_params); | $curl_helper->SetRequestData($url_params); | ||||
$file_data = $curl_helper->Send(GET_LICENSE_URL); | $file_data = $curl_helper->Send(GET_LICENSE_URL); | ||||
if ( !$curl_helper->isGoodResponseCode() ) { | if ( !$curl_helper->isGoodResponseCode() ) { | ||||
$this->errorMessage = 'In-Portal servers temporarily unavailable. Please contact <a href="mailto:support@in-portal.com">In-Portal support</a> personnel directly.'; | $this->errorMessage = 'In-Portal servers temporarily unavailable. Please contact <a href="mailto:support@in-portal.com">In-Portal support</a> personnel directly.'; | ||||
} | } | ||||
elseif (substr($file_data, 0, 5) == 'Error') { | elseif (substr($file_data, 0, 5) == 'Error') { | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
if (file_exists(WRITEABLE . '/install_check.php')) { | if (file_exists(WRITEABLE . '/install_check.php')) { | ||||
unlink(WRITEABLE . '/install_check.php'); | unlink(WRITEABLE . '/install_check.php'); | ||||
} | } | ||||
$fp = fopen(WRITEABLE . '/install_check.php', 'w'); | $fp = fopen(WRITEABLE . '/install_check.php', 'w'); | ||||
fwrite($fp, "<?php\n\techo 'OK';\n"); | fwrite($fp, "<?php\n\techo 'OK';\n"); | ||||
fclose($fp); | fclose($fp); | ||||
/** @var kCurlHelper $curl_helper */ | |||||
$curl_helper = $this->Application->recallObject('CurlHelper'); | $curl_helper = $this->Application->recallObject('CurlHelper'); | ||||
/* @var $curl_helper kCurlHelper */ | |||||
$output = $curl_helper->Send($this->Application->BaseURL(WRITEBALE_BASE) . 'install_check.php'); | $output = $curl_helper->Send($this->Application->BaseURL(WRITEBALE_BASE) . 'install_check.php'); | ||||
unlink(WRITEABLE . '/install_check.php'); | unlink(WRITEABLE . '/install_check.php'); | ||||
$execute_check = ($output !== 'OK'); | $execute_check = ($output !== 'OK'); | ||||
$directive_check = true; | $directive_check = true; | ||||
$ini_vars = Array ('register_globals' => false, 'open_basedir' => true, 'allow_url_fopen' => false); | $ini_vars = Array ('register_globals' => false, 'open_basedir' => true, 'allow_url_fopen' => false); | ||||
foreach ($ini_vars as $var_name => $var_value) { | foreach ($ini_vars as $var_name => $var_value) { | ||||
▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Line(s) | |||||
$license_source = $this->GetVar('license_source'); | $license_source = $this->GetVar('license_source'); | ||||
switch ($license_source) { | switch ($license_source) { | ||||
case 1: // Download from Intechnic | case 1: // Download from Intechnic | ||||
break; | break; | ||||
case 2: // Upload License File | case 2: // Upload License File | ||||
$file_data = array_map('trim', file($_FILES['license_file']['tmp_name'])); | $file_data = array_map('trim', file($_FILES['license_file']['tmp_name'])); | ||||
if ((count($file_data) == 3) && $file_data[1]) { | if ((count($file_data) == 3) && $file_data[1]) { | ||||
Expected 1 spaces after "if" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "if" opening bracket; 0 found | |||||
No blank line found before "if" control structure Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.NoLineBeforeOpen: No blank line found before "if" control structure | |||||
Expected 1 spaces before "if" closing bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
/** @var kModulesHelper $modules_helper */ | |||||
$modules_helper = $this->Application->recallObject('ModulesHelper'); | $modules_helper = $this->Application->recallObject('ModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | |||||
if ($modules_helper->verifyLicense($file_data[1])) { | if ($modules_helper->verifyLicense($file_data[1])) { | ||||
$this->toolkit->systemConfig->set('License', 'Intechnic', $file_data[1]); | $this->toolkit->systemConfig->set('License', 'Intechnic', $file_data[1]); | ||||
$this->toolkit->systemConfig->set('LicenseCode', 'Intechnic', $file_data[2]); | $this->toolkit->systemConfig->set('LicenseCode', 'Intechnic', $file_data[2]); | ||||
$this->toolkit->systemConfig->save(); | $this->toolkit->systemConfig->save(); | ||||
} | } | ||||
else { | else { | ||||
$this->errorMessage = 'Invalid License File'; | $this->errorMessage = 'Invalid License File'; | ||||
} | } | ||||
} | } | ||||
else { | else { | ||||
$this->errorMessage = 'Invalid License File'; | $this->errorMessage = 'Invalid License File'; | ||||
} | } | ||||
break; | break; | ||||
case 3: // Use Existing License | case 3: // Use Existing License | ||||
$license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic'); | $license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic'); | ||||
if ($license_hash) { | if ($license_hash) { | ||||
No blank line found before "if" control structure Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.NoLineBeforeOpen: No blank line found before "if" control structure | |||||
Expected 1 spaces after "if" opening bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpacingAfterOpenBrace: Expected 1 spaces after "if" opening bracket; 0 found | |||||
Expected 1 spaces before "if" closing bracket; 0 found Lint: CodingStandard.WhiteSpace.ControlStructureSpacing.SpaceBeforeCloseBrace: Expected 1 spaces before "if" closing bracket; 0 found | |||||
/** @var kModulesHelper $modules_helper */ | |||||
$modules_helper = $this->Application->recallObject('ModulesHelper'); | $modules_helper = $this->Application->recallObject('ModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | |||||
if (!$modules_helper->verifyLicense($license_hash)) { | if (!$modules_helper->verifyLicense($license_hash)) { | ||||
$this->errorMessage = 'Invalid or corrupt license detected'; | $this->errorMessage = 'Invalid or corrupt license detected'; | ||||
} | } | ||||
} | } | ||||
else { | else { | ||||
// happens, when browser's "Back" button is used | // happens, when browser's "Back" button is used | ||||
$this->errorMessage = 'Missing License File'; | $this->errorMessage = 'Missing License File'; | ||||
Show All 11 Lines | |||||
} | } | ||||
break; | break; | ||||
case 'download_license': | case 'download_license': | ||||
$license_login = $this->GetVar('login'); | $license_login = $this->GetVar('login'); | ||||
$license_password = $this->GetVar('password'); | $license_password = $this->GetVar('password'); | ||||
$license_id = $this->GetVar('licenses'); | $license_id = $this->GetVar('licenses'); | ||||
/** @var kCurlHelper $curl_helper */ | |||||
$curl_helper = $this->Application->recallObject('CurlHelper'); | $curl_helper = $this->Application->recallObject('CurlHelper'); | ||||
/* @var $curl_helper kCurlHelper */ | |||||
if (strlen($license_login) && strlen($license_password) && !$license_id) { | if (strlen($license_login) && strlen($license_password) && !$license_id) { | ||||
// Here we determine weather login is ok & check available licenses | // Here we determine weather login is ok & check available licenses | ||||
$url_params = Array ( | $url_params = Array ( | ||||
'login' => md5($license_login), | 'login' => md5($license_login), | ||||
'password' => md5($license_password), | 'password' => md5($license_password), | ||||
'version' => $this->toolkit->GetMaxModuleVersion('core/'), | 'version' => $this->toolkit->GetMaxModuleVersion('core/'), | ||||
'domain' => base64_encode($_SERVER['HTTP_HOST']), | 'domain' => base64_encode($_SERVER['HTTP_HOST']), | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
else { | else { | ||||
$this->toolkit->processLicense($file_data); | $this->toolkit->processLicense($file_data); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
break; | break; | ||||
case 'select_domain': | case 'select_domain': | ||||
/** @var kModulesHelper $modules_helper */ | |||||
$modules_helper = $this->Application->recallObject('ModulesHelper'); | $modules_helper = $this->Application->recallObject('ModulesHelper'); | ||||
/* @var $modules_helper kModulesHelper */ | |||||
// get domain name as entered by user on the form | // get domain name as entered by user on the form | ||||
$domain = $this->GetVar('domain') == 1 ? $_SERVER['HTTP_HOST'] : str_replace(' ', '', $this->GetVar('other')); | $domain = $this->GetVar('domain') == 1 ? $_SERVER['HTTP_HOST'] : str_replace(' ', '', $this->GetVar('other')); | ||||
$license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic'); | $license_hash = $this->toolkit->systemConfig->get('License', 'Intechnic'); | ||||
if ($license_hash) { | if ($license_hash) { | ||||
// when license present, then extract domain from it | // when license present, then extract domain from it | ||||
$license_hash = base64_decode($license_hash); | $license_hash = base64_decode($license_hash); | ||||
Show All 27 Lines | |||||
$this->toolkit->systemConfig->set($var_name, $section, $var_value); | $this->toolkit->systemConfig->set($var_name, $section, $var_value); | ||||
} | } | ||||
} | } | ||||
$this->toolkit->systemConfig->save(); | $this->toolkit->systemConfig->save(); | ||||
break; | break; | ||||
case 'root_password': | case 'root_password': | ||||
// update root password in database | // update root password in database | ||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
/** @var kPasswordFormatter $password_formatter */ | |||||
$password_formatter = $this->Application->recallObject('kPasswordFormatter'); | $password_formatter = $this->Application->recallObject('kPasswordFormatter'); | ||||
/* @var $password_formatter kPasswordFormatter */ | |||||
$config_values = Array ( | $config_values = Array ( | ||||
'RootPass' => $password_formatter->hashPassword($this->Application->GetVar('root_password')), | 'RootPass' => $password_formatter->hashPassword($this->Application->GetVar('root_password')), | ||||
'Backup_Path' => FULL_PATH . $this->toolkit->systemConfig->get('WriteablePath', 'Misc') . DIRECTORY_SEPARATOR . 'backupdata', | 'Backup_Path' => FULL_PATH . $this->toolkit->systemConfig->get('WriteablePath', 'Misc') . DIRECTORY_SEPARATOR . 'backupdata', | ||||
'DefaultEmailSender' => 'portal@' . $this->toolkit->systemConfig->get('Domain', 'Misc') | 'DefaultEmailSender' => 'portal@' . $this->toolkit->systemConfig->get('Domain', 'Misc') | ||||
); | ); | ||||
$site_timezone = date_default_timezone_get(); | $site_timezone = date_default_timezone_get(); | ||||
if ($site_timezone) { | if ($site_timezone) { | ||||
$config_values['Config_Site_Time'] = $site_timezone; | $config_values['Config_Site_Time'] = $site_timezone; | ||||
} | } | ||||
$this->toolkit->saveConfigValues($config_values); | $this->toolkit->saveConfigValues($config_values); | ||||
/** @var UserHelper $user_helper */ | |||||
$user_helper = $this->Application->recallObject('UserHelper'); | $user_helper = $this->Application->recallObject('UserHelper'); | ||||
/* @var $user_helper UserHelper */ | |||||
// login as "root", when no errors on password screen | // login as "root", when no errors on password screen | ||||
$user_helper->loginUser('root', $this->Application->GetVar('root_password')); | $user_helper->loginUser('root', $this->Application->GetVar('root_password')); | ||||
// import base language for core (english) | // import base language for core (english) | ||||
$this->toolkit->ImportLanguage('/core/install/english'); | $this->toolkit->ImportLanguage('/core/install/english'); | ||||
// make sure imported language is set as active in session, created during installation | // make sure imported language is set as active in session, created during installation | ||||
$this->Application->Session->SetField('Language', 1); | $this->Application->Session->SetField('Language', 1); | ||||
// set imported language as primary | // set imported language as primary | ||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
/** @var LanguagesItem $lang */ | |||||
$lang = $this->Application->recallObject('lang.-item', null, Array('skip_autoload' => true)); | $lang = $this->Application->recallObject('lang.-item', null, Array('skip_autoload' => true)); | ||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
/* @var $lang LanguagesItem */ | |||||
$lang->Load(1); // fresh install => ID=1 | $lang->Load(1); // fresh install => ID=1 | ||||
$lang->setPrimary(true); // for Front-End | $lang->setPrimary(true); // for Front-End | ||||
break; | break; | ||||
case 'choose_modules': | case 'choose_modules': | ||||
// run module install scripts | // run module install scripts | ||||
$modules = $this->Application->GetVar('modules'); | $modules = $this->Application->GetVar('modules'); | ||||
if ($modules) { | if ($modules) { | ||||
foreach ($modules as $module) { | foreach ($modules as $module) { | ||||
$install_file = MODULES_PATH.'/'.$module.'/install.php'; | $install_file = MODULES_PATH.'/'.$module.'/install.php'; | ||||
if (file_exists($install_file)) { | if (file_exists($install_file)) { | ||||
include_once($install_file); | include_once($install_file); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// update category cache | // update category cache | ||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
/** @var kPermCacheUpdater $updater */ | |||||
$updater = $this->Application->makeClass('kPermCacheUpdater'); | $updater = $this->Application->makeClass('kPermCacheUpdater'); | ||||
/* @var $updater kPermCacheUpdater */ | |||||
$updater->OneStepRun(); | $updater->OneStepRun(); | ||||
break; | break; | ||||
case 'post_config': | case 'post_config': | ||||
$this->toolkit->saveConfigValues( $this->GetVar('config') ); | $this->toolkit->saveConfigValues( $this->GetVar('config') ); | ||||
break; | break; | ||||
Show All 13 Lines | |||||
// install theme dependent demo data | // install theme dependent demo data | ||||
if ($this->Application->GetVar('install_demo_data')) { | if ($this->Application->GetVar('install_demo_data')) { | ||||
$sql = 'SELECT Name | $sql = 'SELECT Name | ||||
FROM ' . $theme_table . ' | FROM ' . $theme_table . ' | ||||
WHERE ' . $theme_idfield . ' = ' . $theme_id; | WHERE ' . $theme_idfield . ' = ' . $theme_id; | ||||
$theme_name = $this->Conn->GetOne($sql); | $theme_name = $this->Conn->GetOne($sql); | ||||
$site_path = $this->toolkit->systemConfig->get('WebsitePath','Misc') . '/'; | $site_path = $this->toolkit->systemConfig->get('WebsitePath','Misc') . '/'; | ||||
/** @var FileHelper $file_helper */ | |||||
$file_helper = $this->Application->recallObject('FileHelper'); | $file_helper = $this->Application->recallObject('FileHelper'); | ||||
/* @var $file_helper FileHelper */ | |||||
foreach ($this->Application->ModuleInfo as $module_name => $module_info) { | foreach ($this->Application->ModuleInfo as $module_name => $module_info) { | ||||
if ($module_name == 'In-Portal') { | if ($module_name == 'In-Portal') { | ||||
continue; | continue; | ||||
} | } | ||||
$template_path = '/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath']; | $template_path = '/themes' . '/' . $theme_name . '/' . $module_info['TemplatePath']; | ||||
$this->toolkit->RunSQL( $template_path . '_install/install_data.sql', Array('{ThemeId}', '{SitePath}'), Array($theme_id, $site_path) ); | $this->toolkit->RunSQL( $template_path . '_install/install_data.sql', Array('{ThemeId}', '{SitePath}'), Array($theme_id, $site_path) ); | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
// perform advanced language pack upgrade | // perform advanced language pack upgrade | ||||
foreach ($regs[1] as $version) { | foreach ($regs[1] as $version) { | ||||
$this->RunUpgradeScript($module_info['Path'], $version, 'languagepack'); | $this->RunUpgradeScript($module_info['Path'], $version, 'languagepack'); | ||||
} | } | ||||
} | } | ||||
// 3. update all theme language packs | // 3. update all theme language packs | ||||
/** @var kThemesHelper $themes_helper */ | |||||
$themes_helper = $this->Application->recallObject('ThemesHelper'); | $themes_helper = $this->Application->recallObject('ThemesHelper'); | ||||
/* @var $themes_helper kThemesHelper */ | |||||
$themes_helper->synchronizeModule(false); | $themes_helper->synchronizeModule(false); | ||||
// 4. upgrade admin skin | // 4. upgrade admin skin | ||||
if (in_array('core', $modules)) { | if (in_array('core', $modules)) { | ||||
$skin_upgrade_log = $this->toolkit->upgradeSkin($upgrade_data['core']); | $skin_upgrade_log = $this->toolkit->upgradeSkin($upgrade_data['core']); | ||||
if ($skin_upgrade_log === true) { | if ($skin_upgrade_log === true) { | ||||
Show All 9 Lines | |||||
} | } | ||||
break; | break; | ||||
case 'finish': | case 'finish': | ||||
// delete cache | // delete cache | ||||
$this->toolkit->deleteCache(); | $this->toolkit->deleteCache(); | ||||
$this->toolkit->rebuildThemes(); | $this->toolkit->rebuildThemes(); | ||||
// compile admin skin, so it will be available in 3 frames at once | // compile admin skin, so it will be available in 3 frames at once | ||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
/** @var SkinHelper $skin_helper */ | |||||
$skin_helper = $this->Application->recallObject('SkinHelper'); | $skin_helper = $this->Application->recallObject('SkinHelper'); | ||||
/* @var $skin_helper SkinHelper */ | |||||
/** @var kDBItem $skin */ | |||||
$skin = $this->Application->recallObject('skin', null, Array ('skip_autoload' => true)); | $skin = $this->Application->recallObject('skin', null, Array ('skip_autoload' => true)); | ||||
PHP keywords must be lowercase; expected "array" but found "Array" Lint: Generic.PHP.LowerCaseKeyword.Found: PHP keywords must be lowercase; expected "array" but found "Array" | |||||
There must be no space between the Array keyword and the opening parenthesis Lint: CodingStandard.Array.Array.SpaceAfterKeyword: There must be no space between the Array keyword and the opening parenthesis | |||||
/* @var $skin kDBItem */ | |||||
$skin->Load(1, 'IsPrimary'); | $skin->Load(1, 'IsPrimary'); | ||||
$skin_helper->compile($skin); | $skin_helper->compile($skin); | ||||
// set installation finished mark | // set installation finished mark | ||||
if ($this->Application->ConfigValue('InstallFinished') === false) { | if ($this->Application->ConfigValue('InstallFinished') === false) { | ||||
$fields_hash = Array ( | $fields_hash = Array ( | ||||
'VariableName' => 'InstallFinished', | 'VariableName' => 'InstallFinished', | ||||
Show All 10 Lines | |||||
} | } | ||||
$this->currentStep = $this->GetNextStep(); | $this->currentStep = $this->GetNextStep(); | ||||
$this->InitStep(); // init next step (that will be shown now) | $this->InitStep(); // init next step (that will be shown now) | ||||
$this->InitApplication(); | $this->InitApplication(); | ||||
if ($this->currentStep == -1) { | if ($this->currentStep == -1) { | ||||
// step after last step -> redirect to admin | // step after last step -> redirect to admin | ||||
Inline comments must end in full-stops, exclamation marks, or question marks Lint: CodingStandard.Commenting.InlineComment.InvalidEndChar: Inline comments must end in full-stops, exclamation marks, or question marks | |||||
Inline comments must start with a capital letter Lint: CodingStandard.Commenting.InlineComment.NotCapital: Inline comments must start with a capital letter | |||||
/** @var UserHelper $user_helper */ | |||||
Tabs must be used to indent lines; spaces are not allowed Lint: Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed: Tabs must be used to indent lines; spaces are not allowed | |||||
$user_helper = $this->Application->recallObject('UserHelper'); | $user_helper = $this->Application->recallObject('UserHelper'); | ||||
Tabs must be used to indent lines; spaces are not allowed Lint: Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed: Tabs must be used to indent lines; spaces are not allowed | |||||
/* @var $user_helper UserHelper */ | |||||
$user_helper->logoutUser(); | $user_helper->logoutUser(); | ||||
$this->Application->Redirect($user_helper->event->redirect, $user_helper->event->getRedirectParams(), '', 'index.php'); | $this->Application->Redirect($user_helper->event->redirect, $user_helper->event->getRedirectParams(), '', 'index.php'); | ||||
} | } | ||||
} | } | ||||
function getUpgradeDependencies($modules, &$upgrade_data) | function getUpgradeDependencies($modules, &$upgrade_data) | ||||
▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Line(s) | |||||
require_once(FULL_PATH . REL_PATH . '/install/upgrade_helper.php'); | require_once(FULL_PATH . REL_PATH . '/install/upgrade_helper.php'); | ||||
// save class name, because 2nd time (in after call) | // save class name, because 2nd time (in after call) | ||||
// $upgrade_class variable will not be present | // $upgrade_class variable will not be present | ||||
include_once $upgrades_file; | include_once $upgrades_file; | ||||
$upgrade_classes[$module_path] = $upgrade_class; | $upgrade_classes[$module_path] = $upgrade_class; | ||||
} | } | ||||
/** @var CoreUpgrades $upgrade_object */ | |||||
$upgrade_object = new $upgrade_classes[$module_path](); | $upgrade_object = new $upgrade_classes[$module_path](); | ||||
/* @var $upgrade_object CoreUpgrades */ | |||||
$upgrade_object->setToolkit($this->toolkit); | $upgrade_object->setToolkit($this->toolkit); | ||||
return $upgrade_object; | return $upgrade_object; | ||||
} | } | ||||
/** | /** | ||||
* Initialize kApplication | * Initialize kApplication | ||||
▲ Show 20 Lines • Show All 509 Lines • Show Last 20 Lines |
Expected 1 spaces before "if" closing bracket; 0 found