From 9f927639888b4537a12a0b8e93a0e56b8e65ef1e Mon Sep 17 00:00:00 2001 From: ovclas Date: Mon, 30 May 2011 09:38:41 +0000 Subject: [PATCH] #19790379 license agreement validate git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8406 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/install/install.controller.php | 10 +++------- modules/install/tpl/js/install_admin.js | 9 +++++++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index 0109833f3..dd1e55cda 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -27,15 +27,11 @@ **/ function procInstallAgreement() { + global $lang; $requestVars = Context::gets('lgpl_agree', 'enviroment_gather'); + if($requestVars->lgpl_agree != 'on') + return new Object('-1', $lang->msg_license_agreement_alert); - /*$buff = '%s = '%s';\n", 'lgpl_agree', $requestVars->lgpl_agree); - $buff .= sprintf("\$agreement->%s = '%s';\n", 'enviroment_gather', $requestVars->enviroment_gather); - $buff .= "?>"; - - $this->db_tmp_config_file = _XE_PATH_.'files/config/tmpDB.config.php'; - FileHandler::writeFile(_XE_PATH_.'files/config/agreement', $buff);*/ $_SESSION['lgpl_agree'] = $requestVars->lgpl_agree; $_SESSION['enviroment_gather'] = $requestVars->enviroment_gather; diff --git a/modules/install/tpl/js/install_admin.js b/modules/install/tpl/js/install_admin.js index 706d939f1..a1eff2e46 100644 --- a/modules/install/tpl/js/install_admin.js +++ b/modules/install/tpl/js/install_admin.js @@ -3,8 +3,13 @@ */ function completeAgreement(ret_obj) { - var url = current_url.setQuery('act', 'dispInstallCheckEnv'); - location.href = url; + if(ret_obj['error'] != 0) { + alert(ret_obj['message']); + return; + } else { + var url = current_url.setQuery('act', 'dispInstallCheckEnv'); + location.href = url; + } } function completeDBSetting(ret_obj) {