Index: branches/5.1.x/core/install.php =================================================================== diff -u -N -r14512 -r14525 --- branches/5.1.x/core/install.php (.../install.php) (revision 14512) +++ branches/5.1.x/core/install.php (.../install.php) (revision 14525) @@ -1,6 +1,6 @@ Application->GetVar('next_preset'); if ($next_preset !== false) { + $user_helper =& $this->Application->recallObject('UserHelper'); + /* @var $user_helper UserHelper */ + if ($this->Application->GetVar('login') == 'root') { // verify "root" user using configuration settings - $login_event = new kEvent('u.current:OnLogin'); - $this->Application->HandleEvent($login_event); + $login_status = $user_helper->loginUser( + $this->Application->GetVar('login'), + $this->Application->GetVar('password') + ); - if ($login_event->status != erSUCCESS) { - $user =& $this->Application->recallObject('u.current'); - /* @var $user UsersItem */ - - $this->errorMessage = $user->GetErrorMsg('ValidateLogin') . '. If you don\'t know your username or password, contact Intechnic Support'; + if ( $login_status != LOGIN_RESULT_OK ) { + $error_phrase = $login_status == LOGIN_RESULT_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'; } } else { @@ -365,10 +368,15 @@ 'domain=' . base64_encode($_SERVER['HTTP_HOST']), ); - $license_url = GET_LICENSE_URL . '?' . implode('&', $url_params); - $file_data = curl_post($license_url, '', null, 'GET'); + $curl_helper =& $this->Application->recallObject('CurlHelper'); + /* @var $curl_helper kCurlHelper */ - if (substr($file_data, 0, 5) == 'Error') { + $file_data = $curl_helper->Send(GET_LICENSE_URL . '?' . implode('&', $url_params)); + + if ( !$curl_helper->isGoodResponceCode() ) { + $this->errorMessage = 'In-Portal servers temporarily unavailable. Please contact In-Portal support personnel directly.'; + } + elseif (substr($file_data, 0, 5) == 'Error') { $this->errorMessage = substr($file_data, 6) . ' If you don\'t know your username or password, contact Intechnic Support'; }