diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po index 775a07bcb..51842f83f 100644 --- a/workflow/engine/content/translations/english/processmaker.en.po +++ b/workflow/engine/content/translations/english/processmaker.en.po @@ -15163,6 +15163,12 @@ msgstr "SYSTEM INSTALLATION FAILED" msgid "A problem occurred during the installation of the system. Please, uninstall the partial installation and try again." msgstr "A problem occurred during the installation of the system. Please, uninstall the partial installation and try again." +# TRANSLATION +# LABEL/ID_PROCESSMAKER_ALREADY_INSTALLED +#: LABEL/ID_PROCESSMAKER_ALREADY_INSTALLED +msgid "ProcessMaker is already installed." +msgstr "ProcessMaker is already installed." + # TRANSLATION # LABEL/ID_LICENSE_EMPTY #: LABEL/ID_LICENSE_EMPTY diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index dbe1b0572..36a2ebe3b 100644 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -38,10 +38,18 @@ class Installer extends Controller public function index ($httpData) { + if (file_exists(FILE_PATHS_INSTALLED)) { + $this->setJSVar('messageError', G::LoadTranslation('ID_PROCESSMAKER_ALREADY_INSTALLED')); + $this->includeExtJS('installer/stopInstall'); + $this->setView('installer/mainStopInstall'); + G::RenderPage('publish', 'extJs'); + return; + } if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))) { - $this->includeExtJS( 'installer/stopInstall'); - $this->setView( 'installer/mainStopInstall' ); - G::RenderPage( 'publish', 'extJs' ); + $this->setJSVar('messageError', G::LoadTranslation('ID_NO_INSTALL')); + $this->includeExtJS('installer/stopInstall'); + $this->setView('installer/mainStopInstall'); + G::RenderPage('publish', 'extJs'); return; } diff --git a/workflow/engine/data/mysql/insert.sql b/workflow/engine/data/mysql/insert.sql index 43d8e21e7..2c3020c3c 100644 --- a/workflow/engine/data/mysql/insert.sql +++ b/workflow/engine/data/mysql/insert.sql @@ -4022,6 +4022,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ( 'LABEL','ID_ROLE_NAME_NOT_EMPTY','en','The ''Name'' field can not be empty.','2014-01-15') , ( 'LABEL','ID_TITLE_NO_INSTALL','en','SYSTEM INSTALLATION FAILED','2014-01-15') , ( 'LABEL','ID_NO_INSTALL','en','A problem occurred during the installation of the system. Please, uninstall the partial installation and try again.','2014-01-15') , +( 'LABEL','ID_PROCESSMAKER_ALREADY_INSTALLED','en','ProcessMaker is already installed.','2017-05-31') , ( 'LABEL','ID_LICENSE_EMPTY','en','Can not find any license','2014-01-15') , ( 'LABEL','ID_ADD_LICENSE','en','Please add a new license','2014-01-15') , ( 'LABEL','ID_DEFAULT_CALENDAR','en','Default Calendar','2014-01-15') , diff --git a/workflow/engine/templates/installer/stopInstall.js b/workflow/engine/templates/installer/stopInstall.js index ff743d8a6..536fd07c3 100644 --- a/workflow/engine/templates/installer/stopInstall.js +++ b/workflow/engine/templates/installer/stopInstall.js @@ -9,7 +9,7 @@ Ext.onReady(function() { title : _('ID_TITLE_NO_INSTALL'), items:[ - {html: _('ID_NO_INSTALL')} + {html: messageError} ] }); });