Merge pull request #1387 from marcoAntonioNina/master
Improvement wizard of installator
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,6 +5,8 @@
|
|||||||
*
|
*
|
||||||
* @author Erik A. O. <erik@colosa.com>
|
* @author Erik A. O. <erik@colosa.com>
|
||||||
*/
|
*/
|
||||||
|
global $translation;
|
||||||
|
include PATH_LANGUAGECONT."translation.".SYS_LANG;
|
||||||
|
|
||||||
class Installer extends Controller
|
class Installer extends Controller
|
||||||
{
|
{
|
||||||
@@ -31,16 +33,6 @@ class Installer extends Controller
|
|||||||
|
|
||||||
public function index ($httpData)
|
public function index ($httpData)
|
||||||
{
|
{
|
||||||
$step1_txt = 'If any of these items is not supported (marked as No) then please take actions to correct them.<br><br>' . 'Failure to do so could lead to your ProcessMaker installation not functioning correctly!<br><br>' .
|
|
||||||
//'(*) MSSQL Support is optional.<br><br>' .
|
|
||||||
'(*) OpenSSL is optional.<br><br>' . '(*) LDAP is optional.';
|
|
||||||
|
|
||||||
$step2_txt = 'These settings are recommended for PHP in order to ensure full compatibility with ProcessMaker. <> ' . 'However, ProcessMaker still operate if your settings do not quite match the recommended';
|
|
||||||
$step3_txt = 'In order for ProcessMaker to work correctly, it needs to be able read and write to certain directories and their files.<br>' . 'Make sure to give read and write access to the directories listed below and all their subdirectories and files.';
|
|
||||||
$step4_txt = 'ProcessMaker stores all of its data in a database. Enter the address and port number used by the database. Also enter' . 'the username and password of the database user who will set up the databases used by ProcessMaker<br>';
|
|
||||||
$step5_txt = 'ProcessMaker uses workspaces to store data in the database. Please enter a valid workspace name and a username and password to login' . ' as the administrator.';
|
|
||||||
$step6_txt = 'xxx';
|
|
||||||
|
|
||||||
$licenseContent = file_get_contents( PATH_TRUNK . 'LICENSE.txt' );
|
$licenseContent = file_get_contents( PATH_TRUNK . 'LICENSE.txt' );
|
||||||
|
|
||||||
$this->includeExtJS( 'installer/CardLayout', false );
|
$this->includeExtJS( 'installer/CardLayout', false );
|
||||||
@@ -52,12 +44,6 @@ class Installer extends Controller
|
|||||||
$this->includeExtJS( 'installer/main', false );
|
$this->includeExtJS( 'installer/main', false );
|
||||||
|
|
||||||
$this->setJSVar( 'licenseTxt', $licenseContent );
|
$this->setJSVar( 'licenseTxt', $licenseContent );
|
||||||
$this->setJSVar( 'step1_txt', $step1_txt );
|
|
||||||
$this->setJSVar( 'step2_txt', $step2_txt );
|
|
||||||
$this->setJSVar( 'step3_txt', $step3_txt );
|
|
||||||
$this->setJSVar( 'step4_txt', $step4_txt );
|
|
||||||
$this->setJSVar( 'step5_txt', $step5_txt );
|
|
||||||
$this->setJSVar( 'step6_txt', $step6_txt );
|
|
||||||
|
|
||||||
$this->setJSVar( 'path_config', $this->path_config );
|
$this->setJSVar( 'path_config', $this->path_config );
|
||||||
$this->setJSVar( 'path_languages', $this->path_languages );
|
$this->setJSVar( 'path_languages', $this->path_languages );
|
||||||
@@ -74,8 +60,8 @@ class Installer extends Controller
|
|||||||
|
|
||||||
public function newSite ()
|
public function newSite ()
|
||||||
{
|
{
|
||||||
$textStep1 = 'ProcessMaker stores all of its data in a database. This screen gives the installation program the information needed to create this database.<br><br>' . 'If you are installing ProcessMaker on a remote web server, you will need to get this information from your Database Server.';
|
$textStep1 = G::LoadTranslation('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP4_1');
|
||||||
$textStep2 = 'ProcessMaker uses a workspaces to store data. Please select a valid workspace name and credentials to log in it.';
|
$textStep2 = G::LoadTranslation('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5');
|
||||||
|
|
||||||
$this->includeExtJS( 'installer/CardLayout', false );
|
$this->includeExtJS( 'installer/CardLayout', false );
|
||||||
$this->includeExtJS( 'installer/Wizard', false );
|
$this->includeExtJS( 'installer/Wizard', false );
|
||||||
@@ -106,6 +92,8 @@ class Installer extends Controller
|
|||||||
|
|
||||||
public function getSystemInfo ()
|
public function getSystemInfo ()
|
||||||
{
|
{
|
||||||
|
//$echo "<script> document.write(TRANSLATIONS) </script>";
|
||||||
|
//print_r ($valu);die();
|
||||||
$this->setResponseType( 'json' );
|
$this->setResponseType( 'json' );
|
||||||
|
|
||||||
// PHP info and verification
|
// PHP info and verification
|
||||||
@@ -141,23 +129,23 @@ class Installer extends Controller
|
|||||||
|
|
||||||
// MSSQL info and verification
|
// MSSQL info and verification
|
||||||
$info->mssql->result = false;
|
$info->mssql->result = false;
|
||||||
$info->mssql->version = 'not enabled';
|
$info->mssql->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'mssql_query' )) {
|
if (function_exists( 'mssql_query' )) {
|
||||||
$info->mssql->result = true;
|
$info->mssql->result = true;
|
||||||
$info->mssql->version = 'enabled';
|
$info->mssql->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenSSL info
|
// OpenSSL info
|
||||||
$info->openssl->result = false;
|
$info->openssl->result = false;
|
||||||
$info->openssl->version = 'not enabled';
|
$info->openssl->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'openssl_open' )) {
|
if (function_exists( 'openssl_open' )) {
|
||||||
$info->openssl->result = true;
|
$info->openssl->result = true;
|
||||||
$info->openssl->version = 'enabled';
|
$info->openssl->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Curl info
|
// Curl info
|
||||||
$info->curl->result = false;
|
$info->curl->result = false;
|
||||||
$info->curl->version = 'not enabled';
|
$info->curl->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'curl_version' )) {
|
if (function_exists( 'curl_version' )) {
|
||||||
$info->curl->result = true;
|
$info->curl->result = true;
|
||||||
$version = curl_version();
|
$version = curl_version();
|
||||||
@@ -167,15 +155,15 @@ class Installer extends Controller
|
|||||||
|
|
||||||
// DOMDocument info
|
// DOMDocument info
|
||||||
$info->dom->result = false;
|
$info->dom->result = false;
|
||||||
$info->dom->version = 'not enabled';
|
$info->dom->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (class_exists( 'DOMDocument' )) {
|
if (class_exists( 'DOMDocument' )) {
|
||||||
$info->dom->result = true;
|
$info->dom->result = true;
|
||||||
$info->dom->version = 'enabled';
|
$info->dom->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// GD info
|
// GD info
|
||||||
$info->gd->result = false;
|
$info->gd->result = false;
|
||||||
$info->gd->version = 'not enabled';
|
$info->gd->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'gd_info' )) {
|
if (function_exists( 'gd_info' )) {
|
||||||
$info->gd->result = true;
|
$info->gd->result = true;
|
||||||
$gdinfo = gd_info();
|
$gdinfo = gd_info();
|
||||||
@@ -184,26 +172,26 @@ class Installer extends Controller
|
|||||||
|
|
||||||
// Multibyte info
|
// Multibyte info
|
||||||
$info->multibyte->result = false;
|
$info->multibyte->result = false;
|
||||||
$info->multibyte->version = 'not enabled';
|
$info->multibyte->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'mb_check_encoding' )) {
|
if (function_exists( 'mb_check_encoding' )) {
|
||||||
$info->multibyte->result = true;
|
$info->multibyte->result = true;
|
||||||
$info->multibyte->version = 'enabled';
|
$info->multibyte->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// soap info
|
// soap info
|
||||||
$info->soap->result = false;
|
$info->soap->result = false;
|
||||||
$info->soap->version = 'not enabled';
|
$info->soap->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (class_exists( 'SoapClient' )) {
|
if (class_exists( 'SoapClient' )) {
|
||||||
$info->soap->result = true;
|
$info->soap->result = true;
|
||||||
$info->soap->version = 'enabled';
|
$info->soap->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ldap info
|
// ldap info
|
||||||
$info->ldap->result = false;
|
$info->ldap->result = false;
|
||||||
$info->ldap->version = 'not enabled';
|
$info->ldap->version = G::LoadTranslation('ID_NOT_ENABLED');
|
||||||
if (function_exists( 'ldap_connect' )) {
|
if (function_exists( 'ldap_connect' )) {
|
||||||
$info->ldap->result = true;
|
$info->ldap->result = true;
|
||||||
$info->ldap->version = 'enabled';
|
$info->ldap->version = G::LoadTranslation('ID_ENABLED');
|
||||||
}
|
}
|
||||||
|
|
||||||
// memory limit verification
|
// memory limit verification
|
||||||
@@ -233,60 +221,60 @@ class Installer extends Controller
|
|||||||
|
|
||||||
// pathConfig
|
// pathConfig
|
||||||
$info->pathConfig = new stdclass();
|
$info->pathConfig = new stdclass();
|
||||||
$info->pathConfig->message = 'unwriteable';
|
$info->pathConfig->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathConfig->result = G::is_writable_r( $_REQUEST['pathConfig'], $noWritableFiles );
|
$info->pathConfig->result = G::is_writable_r( $_REQUEST['pathConfig'], $noWritableFiles );
|
||||||
if ($info->pathConfig->result) {
|
if ($info->pathConfig->result) {
|
||||||
$info->pathConfig->message = 'writeable';
|
$info->pathConfig->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->pathLanguages = new stdclass();
|
$info->pathLanguages = new stdclass();
|
||||||
$info->pathLanguages->message = 'unwriteable';
|
$info->pathLanguages->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathLanguages->result = G::is_writable_r( $_REQUEST['pathLanguages'], $noWritableFiles );
|
$info->pathLanguages->result = G::is_writable_r( $_REQUEST['pathLanguages'], $noWritableFiles );
|
||||||
if ($info->pathLanguages->result) {
|
if ($info->pathLanguages->result) {
|
||||||
$info->pathLanguages->message = 'writeable';
|
$info->pathLanguages->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->pathPlugins = new stdclass();
|
$info->pathPlugins = new stdclass();
|
||||||
$info->pathPlugins->message = 'unwriteable';
|
$info->pathPlugins->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathPlugins->result = G::is_writable_r( $_REQUEST['pathPlugins'], $noWritableFiles );
|
$info->pathPlugins->result = G::is_writable_r( $_REQUEST['pathPlugins'], $noWritableFiles );
|
||||||
if ($info->pathPlugins->result) {
|
if ($info->pathPlugins->result) {
|
||||||
$info->pathPlugins->message = 'writeable';
|
$info->pathPlugins->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->pathXmlforms = new stdclass();
|
$info->pathXmlforms = new stdclass();
|
||||||
$info->pathXmlforms->message = 'unwriteable';
|
$info->pathXmlforms->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathXmlforms->result = G::is_writable_r( $_REQUEST['pathXmlforms'], $noWritableFiles );
|
$info->pathXmlforms->result = G::is_writable_r( $_REQUEST['pathXmlforms'], $noWritableFiles );
|
||||||
if ($info->pathXmlforms->result) {
|
if ($info->pathXmlforms->result) {
|
||||||
$info->pathXmlforms->message = 'writeable';
|
$info->pathXmlforms->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->pathPublic = new stdclass();
|
$info->pathPublic = new stdclass();
|
||||||
|
|
||||||
$info->pathPublic->message = 'unwriteable';
|
$info->pathShared = new stdclass();
|
||||||
$info->pathPublic->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
$info->pathPublic->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathPublic->result = G::is_writable_r( $_REQUEST['pathPublic'], $noWritableFiles );
|
$info->pathPublic->result = G::is_writable_r( $_REQUEST['pathPublic'], $noWritableFiles );
|
||||||
$info->pathShared->message = 'writeable';
|
if ($info->pathPublic->result) {
|
||||||
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
$info->pathShared->message = 'unwriteable';
|
|
||||||
$info->pathShared->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
$info->pathShared->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
$info->pathShared->result = G::is_writable_r( $_REQUEST['pathShared'], $noWritableFiles );
|
$info->pathShared->result = G::is_writable_r( $_REQUEST['pathShared'], $noWritableFiles );
|
||||||
$info->pathShared->message = 'writeable';
|
if ($info->pathShared->result) {
|
||||||
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
G::verifyPath( $_REQUEST['pathShared'], true );
|
G::verifyPath( $_REQUEST['pathShared'], true );
|
||||||
$info->pathShared->result = G::is_writable_r( $_REQUEST['pathShared'], $noWritableFiles );
|
$info->pathShared->result = G::is_writable_r( $_REQUEST['pathShared'], $noWritableFiles );
|
||||||
$info->pathShared->message = 'writeable';
|
if ($info->pathShared->result) {
|
||||||
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
$info->pathShared->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
} else {
|
} else {
|
||||||
$info->success = false;
|
$info->success = false;
|
||||||
@@ -303,17 +291,17 @@ class Installer extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->pathLogFile->message = 'Could not create the installation log';
|
$info->pathLogFile = new stdclass();
|
||||||
$info->pathLogFile->message = G::LoadTranslation('ID_CREATE_LOG_INSTALLATION');
|
$info->pathLogFile->message = G::LoadTranslation('ID_CREATE_LOG_INSTALLATION');
|
||||||
$info->pathLogFile->result = file_exists( $_REQUEST['pathLogFile'] );
|
$info->pathLogFile->result = file_exists( $_REQUEST['pathLogFile'] );
|
||||||
|
|
||||||
$info->pathLogFile->message = 'Installation log created';
|
if ($info->pathLogFile->result) {
|
||||||
$info->pathLogFile->message = G::LoadTranslation('ID_INSTALLATION_LOG');
|
$info->pathLogFile->message = G::LoadTranslation('ID_INSTALLATION_LOG');
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->notify = 'Success, all required directories are writable.';
|
if ($info->success) {
|
||||||
$info->notify = G::LoadTranslation('ID_SUCCESS_DIRECTORIES_WRITABLE');
|
$info->notify = G::LoadTranslation('ID_SUCCESS_DIRECTORIES_WRITABLE');
|
||||||
$info->notify = 'Some directories and/or files inside it are not writable.';
|
} else {
|
||||||
$info->notify = G::LoadTranslation('ID_DIRECTORIES_NOT_WRITABLE');
|
$info->notify = G::LoadTranslation('ID_DIRECTORIES_NOT_WRITABLE');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -354,10 +342,10 @@ class Installer extends Controller
|
|||||||
if (! is_file( $logFile )) {
|
if (! is_file( $logFile )) {
|
||||||
G::mk_dir( dirname( $pathShared ) );
|
G::mk_dir( dirname( $pathShared ) );
|
||||||
$fpt = fopen( $logFile, 'w' );
|
$fpt = fopen( $logFile, 'w' );
|
||||||
fwrite( $fpt, sprintf( "%s %s\n", date( 'Y:m:d H:i:s' ), '----- starting log file ------' ) );
|
if ($fpt !== null) {
|
||||||
fwrite( $fpt, sprintf( "%s %s\n", date( 'Y:m:d H:i:s' ), '----- '. G::LoadTranslation('ID_STARTING_LOG_FILE') .' ------' ) );
|
fwrite( $fpt, sprintf( "%s %s\n", date( 'Y:m:d H:i:s' ), '----- '. G::LoadTranslation('ID_STARTING_LOG_FILE') .' ------' ) );
|
||||||
fclose( $fpt );
|
fclose( $fpt );
|
||||||
throw (new Exception( sprintf( "File '%s' is not writeable. Please check permission before continue", $logFile ) ));
|
} else {
|
||||||
throw (new Exception( G::LoadTranslation('ID_FILE_NOT_WRITEABLE', SYS_LANG, Array($logFile) ) ));
|
throw (new Exception( G::LoadTranslation('ID_FILE_NOT_WRITEABLE', SYS_LANG, Array($logFile) ) ));
|
||||||
return $false;
|
return $false;
|
||||||
}
|
}
|
||||||
@@ -405,7 +393,7 @@ class Installer extends Controller
|
|||||||
$this->installLog( $sql );
|
$this->installLog( $sql );
|
||||||
$query = @mysql_query( $sql, $this->link );
|
$query = @mysql_query( $sql, $this->link );
|
||||||
if (! $query) {
|
if (! $query) {
|
||||||
$this->installLog( 'MySQL error: ' . $errorMessage );
|
$errorMessage = mysql_error( $this->link );
|
||||||
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, Array($errorMessage) ) );
|
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, Array($errorMessage) ) );
|
||||||
throw new Exception( $errorMessage );
|
throw new Exception( $errorMessage );
|
||||||
return false;
|
return false;
|
||||||
@@ -422,7 +410,7 @@ class Installer extends Controller
|
|||||||
$this->installLog( $sql );
|
$this->installLog( $sql );
|
||||||
$query = @mssql_query( $sql, $this->link );
|
$query = @mssql_query( $sql, $this->link );
|
||||||
if (! $query) {
|
if (! $query) {
|
||||||
$this->installLog( 'MSSQL error: ' . $errorMessage );
|
$errorMessage = mssql_get_last_message();
|
||||||
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, Array($errorMessage) ));
|
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, Array($errorMessage) ));
|
||||||
throw (new Exception( $errorMessage ));
|
throw (new Exception( $errorMessage ));
|
||||||
return false;
|
return false;
|
||||||
@@ -440,10 +428,10 @@ class Installer extends Controller
|
|||||||
*/
|
*/
|
||||||
public function mysqlFileQuery ($file)
|
public function mysqlFileQuery ($file)
|
||||||
{
|
{
|
||||||
throw (new Exception( sprintf( "File $file is not a valid sql file", $file ) ));
|
if (! is_file( $file )) {
|
||||||
throw (new Exception( G::LoadTranslation('ID_SQL_FILE_INVALID', SYS_LANG, Array($file) ) ));
|
throw (new Exception( G::LoadTranslation('ID_SQL_FILE_INVALID', SYS_LANG, Array($file) ) ));
|
||||||
return $false;
|
return $false;
|
||||||
$this->installLog( 'Procesing: ' . $file );
|
}
|
||||||
$this->installLog( G::LoadTranslation('ID_PROCESING', SYS_LANG, Array($file) ));
|
$this->installLog( G::LoadTranslation('ID_PROCESING', SYS_LANG, Array($file) ));
|
||||||
$startTime = microtime( true );
|
$startTime = microtime( true );
|
||||||
// $content = file_get_contents($file);
|
// $content = file_get_contents($file);
|
||||||
@@ -509,7 +497,7 @@ class Installer extends Controller
|
|||||||
@mysql_query( $line, $this->link );
|
@mysql_query( $line, $this->link );
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->installLog( sprintf( 'File: %s processed in %3.2f seconds', basename( $file ), $endTime - $startTime ) );
|
$endTime = microtime( true );
|
||||||
$this->installLog( G::LoadTranslation('ID_FILE_PROCESSED', SYS_LANG, Array(basename( $file ), $endTime - $startTime )) );
|
$this->installLog( G::LoadTranslation('ID_FILE_PROCESSED', SYS_LANG, Array(basename( $file ), $endTime - $startTime )) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -523,10 +511,10 @@ class Installer extends Controller
|
|||||||
*/
|
*/
|
||||||
public function mssqlFileQuery ($file)
|
public function mssqlFileQuery ($file)
|
||||||
{
|
{
|
||||||
throw (new Exception( sprintf( "File $file is not a valid sql file", $file ) ));
|
if (! is_file( $file )) {
|
||||||
throw (new Exception( G::LoadTranslation('ID_SQL_FILE_INVALID', SYS_LANG, Array($file) )));
|
throw (new Exception( G::LoadTranslation('ID_SQL_FILE_INVALID', SYS_LANG, Array($file) )));
|
||||||
return $false;
|
return $false;
|
||||||
$this->installLog( 'Procesing: ' . $file );
|
}
|
||||||
$this->installLog( G::LoadTranslation('ID_PROCESING', SYS_LANG, Array($file) ));
|
$this->installLog( G::LoadTranslation('ID_PROCESING', SYS_LANG, Array($file) ));
|
||||||
$startTime = microtime( true );
|
$startTime = microtime( true );
|
||||||
$content = file_get_contents( $file );
|
$content = file_get_contents( $file );
|
||||||
@@ -535,14 +523,13 @@ class Installer extends Controller
|
|||||||
foreach ($queries as $sql) {
|
foreach ($queries as $sql) {
|
||||||
$query = @mssql_query( $sql, $this->link );
|
$query = @mssql_query( $sql, $this->link );
|
||||||
if (! $query) {
|
if (! $query) {
|
||||||
|
$errorMessage = mssql_get_last_message();
|
||||||
$this->installLog( sprintf( 'MSSQL error: %s Query: %s ', $errorMessage, $sql ) );
|
|
||||||
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR',SYS_LANG, Array( $errorMessage . G::LoadTranslation('ID_QUERY') .": ". $sql) ));
|
$this->installLog( G::LoadTranslation('ID_MYSQL_ERROR',SYS_LANG, Array( $errorMessage . G::LoadTranslation('ID_QUERY') .": ". $sql) ));
|
||||||
throw (new Exception( $errorMessage ));
|
throw (new Exception( $errorMessage ));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->installLog( sprintf( 'File: %s processed in %3.2f seconds', basename( $file ), $endTime - $startTime ) );
|
$endTime = microtime( true );
|
||||||
$this->installLog( G::LoadTranslation('ID_FILE_PROCESSED', SYS_LANG, Array(basename( $file ), $endTime - $startTime )) );
|
$this->installLog( G::LoadTranslation('ID_FILE_PROCESSED', SYS_LANG, Array(basename( $file ), $endTime - $startTime )) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -632,12 +619,12 @@ class Installer extends Controller
|
|||||||
$pathShared .= '/';
|
$pathShared .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->installLog( sprintf( "Creating workspace '%s' ", $workspace ) );
|
$this->installLog( '-------------------------------------------' );
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING_WORKSPACE', SYS_LANG, Array($workspace)));
|
$this->installLog( G::LoadTranslation('ID_CREATING_WORKSPACE', SYS_LANG, Array($workspace)));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$db_host = ($db_port != '' && $db_port != 3306) ? $db_hostname . ':' . $db_port : $db_hostname;
|
$db_host = ($db_port != '' && $db_port != 3306) ? $db_hostname . ':' . $db_port : $db_hostname;
|
||||||
$this->installLog( sprintf( "Connected to server %s:%d using user: '%s' ", $db_hostname, $db_port, $db_username ) );
|
$this->link = @mysql_connect( $db_host, $db_username, $db_password );
|
||||||
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array($db_hostname, $db_port, $db_username ) ));
|
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array($db_hostname, $db_port, $db_username ) ));
|
||||||
|
|
||||||
if ($deleteDB) {
|
if ($deleteDB) {
|
||||||
@@ -694,7 +681,7 @@ class Installer extends Controller
|
|||||||
$dbText .= sprintf( " define ('DB_REPORT_NAME', '%s' );\n", $rp );
|
$dbText .= sprintf( " define ('DB_REPORT_NAME', '%s' );\n", $rp );
|
||||||
$dbText .= sprintf( " define ('DB_REPORT_USER', '%s' );\n", $rp );
|
$dbText .= sprintf( " define ('DB_REPORT_USER', '%s' );\n", $rp );
|
||||||
$dbText .= sprintf( " define ('DB_REPORT_PASS', '%s' );\n", $rpPass );
|
$dbText .= sprintf( " define ('DB_REPORT_PASS', '%s' );\n", $rpPass );
|
||||||
$this->installLog( "Creating: " . $db_file );
|
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($db_file) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($db_file) ));
|
||||||
file_put_contents( $db_file, $dbText );
|
file_put_contents( $db_file, $dbText );
|
||||||
|
|
||||||
@@ -714,7 +701,7 @@ class Installer extends Controller
|
|||||||
$dbData .= sprintf( "\$dbReportUser = '%s';\n", $rp );
|
$dbData .= sprintf( "\$dbReportUser = '%s';\n", $rp );
|
||||||
$dbData .= sprintf( "\$dbReportPass = '%s';\n", $rpPass );
|
$dbData .= sprintf( "\$dbReportPass = '%s';\n", $rpPass );
|
||||||
$databasesText = str_replace( '{dbData}', $dbData, @file_get_contents( PATH_HOME . 'engine/templates/installer/databases.tpl' ) );
|
$databasesText = str_replace( '{dbData}', $dbData, @file_get_contents( PATH_HOME . 'engine/templates/installer/databases.tpl' ) );
|
||||||
$this->installLog( 'Creating: ' . $databases_file );
|
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($databases_file) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($databases_file) ));
|
||||||
file_put_contents( $databases_file, $databasesText );
|
file_put_contents( $databases_file, $databasesText );
|
||||||
|
|
||||||
@@ -769,7 +756,7 @@ class Installer extends Controller
|
|||||||
$dbText .= sprintf( " define('PATH_DATA', '%s');\n", $pathShared );
|
$dbText .= sprintf( " define('PATH_DATA', '%s');\n", $pathShared );
|
||||||
$dbText .= sprintf( " define('PATH_C', '%s');\n", $pathShared . 'compiled/' );
|
$dbText .= sprintf( " define('PATH_C', '%s');\n", $pathShared . 'compiled/' );
|
||||||
$dbText .= sprintf( " define('HASH_INSTALLATION', '%s');\n", $h );
|
$dbText .= sprintf( " define('HASH_INSTALLATION', '%s');\n", $h );
|
||||||
$this->installLog( "Creating: " . FILE_PATHS_INSTALLED );
|
$dbText .= sprintf( " define('SYSTEM_HASH', '%s');\n", $sh );
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array(FILE_PATHS_INSTALLED) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array(FILE_PATHS_INSTALLED) ));
|
||||||
file_put_contents( FILE_PATHS_INSTALLED, $dbText );
|
file_put_contents( FILE_PATHS_INSTALLED, $dbText );
|
||||||
}
|
}
|
||||||
@@ -830,9 +817,9 @@ class Installer extends Controller
|
|||||||
try {
|
try {
|
||||||
G::update_php_ini( $envFile, $updatedConf );
|
G::update_php_ini( $envFile, $updatedConf );
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$info->message = "ProcessMaker couldn't write on configuration file: $envFile.<br/>";
|
$info->result = false;
|
||||||
$info->message .= "The new ProcessMaker UI couldn't be applied on installation, you can enable it after from Admin->System settings.";
|
$info->message = G::LoadTranslation('ID_PROCESSMAKER_WRITE_CONFIG_INDEX', SYS_LANG, Array($envFile));
|
||||||
$this->installLog( "Installed but with error, couldn't update env.ini" );
|
$info->message .= G::LoadTranslation('ID_PROCESSMAKER_UI_NOT_INSTALL');
|
||||||
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('env.ini')));
|
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('env.ini')));
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -845,17 +832,18 @@ class Installer extends Controller
|
|||||||
$indexFileUpdated = System::updateIndexFile( array ('lang' => 'en','skin' => $updatedConf['default_skin']
|
$indexFileUpdated = System::updateIndexFile( array ('lang' => 'en','skin' => $updatedConf['default_skin']
|
||||||
) );
|
) );
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$info->message = "ProcessMaker couldn't write on configuration file: " . PATH_HTML . "index.html.<br/>";
|
$info->result = false;
|
||||||
$info->message .= "The new ProcessMaker UI couldn't be applied on installation, you can enable it after from Admin->System settings.";
|
$info->message = G::LoadTranslation('ID_PROCESSMAKER_WRITE_CONFIG_INDEX', SYS_LANG, Array(PATH_HTML . "index.html."));
|
||||||
$this->installLog( "Installed but with error, couldn't update index.html" );
|
$info->message .= G::LoadTranslation('ID_PROCESSMAKER_UI_NOT_INSTALL');
|
||||||
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('index.html')));
|
$this->installLog( G::LoadTranslation('ID_INSTALL_BUT_ERROR', SYS_LANG, Array('index.html')));
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
$this->installLog( "Index File updated $indexFileUpdated with lang: {$sysConf['default_lang']}, skin: {$sysConf['default_skin']} " );
|
|
||||||
$this->installLog( "Install completed Succesfully" );
|
$this->installLog( G::LoadTranslation('ID_INDEX_FILE_UPDATED', SYS_LANG, Array($indexFileUpdated, $sysConf['default_lang'],$sysConf['default_skin'])));
|
||||||
$this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') );
|
$this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') );
|
||||||
|
|
||||||
$info->message = 'Succesfully OK';
|
$info->result = true;
|
||||||
|
$info->message = G::LoadTranslation('ID_INSTALL_SUCESS');
|
||||||
$info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, Array($workspace));;
|
$info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, Array($workspace));;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$info->canRedirect = false;
|
$info->canRedirect = false;
|
||||||
@@ -892,12 +880,12 @@ class Installer extends Controller
|
|||||||
$pathShared .= '/';
|
$pathShared .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->installLog( sprintf( "Creating workspace '%s' ", $workspace ) );
|
$this->installLog( '-------------------------------------------' );
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING_WORKSPACE', SYS_LANG, Array($workspace) ) );
|
$this->installLog( G::LoadTranslation('ID_CREATING_WORKSPACE', SYS_LANG, Array($workspace) ) );
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
||||||
$this->installLog( sprintf( "Connected to server %s:%d using user: '%s' ", $db_hostname, $db_port, $db_username ) );
|
$this->link = @mssql_connect( $db_host, $db_username, $db_password );
|
||||||
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array( $db_hostname, $db_port, $db_username )) );
|
$this->installLog( G::LoadTranslation('ID_CONNECT_TO_SERVER', SYS_LANG, Array( $db_hostname, $db_port, $db_username )) );
|
||||||
|
|
||||||
$this->mssqlQuery( 'USE [master]' );
|
$this->mssqlQuery( 'USE [master]' );
|
||||||
@@ -957,7 +945,7 @@ class Installer extends Controller
|
|||||||
$dbText .= sprintf( " define ('DB_REPORT_NAME', '%s' );\n", $rp );
|
$dbText .= sprintf( " define ('DB_REPORT_NAME', '%s' );\n", $rp );
|
||||||
$dbText .= sprintf( " define ('DB_REPORT_USER', '%s' );\n", $rp );
|
$dbText .= sprintf( " define ('DB_REPORT_USER', '%s' );\n", $rp );
|
||||||
$dbText .= sprintf( " define ('DB_REPORT_PASS', '%s' );\n", $rpPass );
|
$dbText .= sprintf( " define ('DB_REPORT_PASS', '%s' );\n", $rpPass );
|
||||||
$this->installLog( "Creating: " . $db_file );
|
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($db_file) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($db_file) ));
|
||||||
file_put_contents( $db_file, $dbText );
|
file_put_contents( $db_file, $dbText );
|
||||||
|
|
||||||
@@ -977,7 +965,7 @@ class Installer extends Controller
|
|||||||
$dbData .= sprintf( "\$dbReportUser = '%s';\n", $rp );
|
$dbData .= sprintf( "\$dbReportUser = '%s';\n", $rp );
|
||||||
$dbData .= sprintf( "\$dbReportPass = '%s';\n", $rpPass );
|
$dbData .= sprintf( "\$dbReportPass = '%s';\n", $rpPass );
|
||||||
$databasesText = str_replace( '{dbData}', $dbData, @file_get_contents( PATH_HOME . 'engine/templates/installer/databases.tpl' ) );
|
$databasesText = str_replace( '{dbData}', $dbData, @file_get_contents( PATH_HOME . 'engine/templates/installer/databases.tpl' ) );
|
||||||
$this->installLog( 'Creating: ' . $databases_file );
|
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($databases_file) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array($databases_file) ));
|
||||||
file_put_contents( $databases_file, $databasesText );
|
file_put_contents( $databases_file, $databasesText );
|
||||||
|
|
||||||
@@ -1032,13 +1020,14 @@ class Installer extends Controller
|
|||||||
$dbText .= sprintf( " define ('PATH_DATA', '%s' );\n", $pathShared );
|
$dbText .= sprintf( " define ('PATH_DATA', '%s' );\n", $pathShared );
|
||||||
$dbText .= sprintf( " define ('PATH_C', '%s' );\n", $pathShared . 'compiled/' );
|
$dbText .= sprintf( " define ('PATH_C', '%s' );\n", $pathShared . 'compiled/' );
|
||||||
$dbText .= sprintf( " define ('HASH_INSTALLATION', '%s' );\n", $h );
|
$dbText .= sprintf( " define ('HASH_INSTALLATION', '%s' );\n", $h );
|
||||||
$this->installLog( "Creating: " . FILE_PATHS_INSTALLED );
|
$dbText .= sprintf( " define ('SYSTEM_HASH', '%s' );\n", $sh );
|
||||||
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array(FILE_PATHS_INSTALLED) ));
|
$this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array(FILE_PATHS_INSTALLED) ));
|
||||||
file_put_contents( FILE_PATHS_INSTALLED, $dbText );
|
file_put_contents( FILE_PATHS_INSTALLED, $dbText );
|
||||||
$this->installLog( "Install completed Succesfully" );
|
}
|
||||||
$this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') );
|
$this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') );
|
||||||
$info->message = 'Succesfully';
|
$info->result = true;
|
||||||
$info->message = G::LoadTranslation('ID_INSTALL_SUCESS');
|
$info->message = G::LoadTranslation('ID_INSTALL_SUCESS');
|
||||||
|
$info->url = '/sys' . $_REQUEST['workspace'] . '/en/classic/main/login';
|
||||||
$info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, Array($workspace));;
|
$info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, Array($workspace));;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$info->result = false;
|
$info->result = false;
|
||||||
@@ -1091,7 +1080,7 @@ class Installer extends Controller
|
|||||||
$dataset = @mssql_query( "select * from sys.databases where name = '" . $_REQUEST['rpDatabase'] . "'", $link );
|
$dataset = @mssql_query( "select * from sys.databases where name = '" . $_REQUEST['rpDatabase'] . "'", $link );
|
||||||
$info->rpDatabaseExists = (@mssql_num_rows( $dataset ) > 0);
|
$info->rpDatabaseExists = (@mssql_num_rows( $dataset ) > 0);
|
||||||
}
|
}
|
||||||
$info->errMessage = 'Database already exists, check "Delete Databases if exists" to overwrite the exiting databases.';
|
|
||||||
$info->errMessage = G::LoadTranslation('ID_DATABASE_EXISTS_OVERWRITE');
|
$info->errMessage = G::LoadTranslation('ID_DATABASE_EXISTS_OVERWRITE');
|
||||||
|
|
||||||
return $info;
|
return $info;
|
||||||
@@ -1106,7 +1095,7 @@ class Installer extends Controller
|
|||||||
$info = new StdClass();
|
$info = new StdClass();
|
||||||
$info->result = false;
|
$info->result = false;
|
||||||
$info->message = '';
|
$info->message = '';
|
||||||
$info->message = 'php-mysql is Not Installed';
|
if (! function_exists( "mysql_connect" )) {
|
||||||
$info->message = G::LoadTranslation('ID_PHP_MYSQL_NOT _INSTALL');
|
$info->message = G::LoadTranslation('ID_PHP_MYSQL_NOT _INSTALL');
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -1115,14 +1104,14 @@ class Installer extends Controller
|
|||||||
$db_username = $_REQUEST['db_username'];
|
$db_username = $_REQUEST['db_username'];
|
||||||
$db_password = $_REQUEST['db_password'];
|
$db_password = $_REQUEST['db_password'];
|
||||||
$fp = @fsockopen( $db_hostname, $db_port, $errno, $errstr, 30 );
|
$fp = @fsockopen( $db_hostname, $db_port, $errno, $errstr, 30 );
|
||||||
$info->message .= "Connection Error: $errstr ($errno)";
|
if (! $fp) {
|
||||||
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR', SYS_LANG, Array($errstr ($errno)));
|
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR', SYS_LANG, Array($errstr ($errno)));
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
||||||
$link = @mysql_connect( $db_host, $db_username, $db_password );
|
$link = @mysql_connect( $db_host, $db_username, $db_password );
|
||||||
$info->message .= "Connection Error: unable to connect to MySQL using provided credentials.";
|
if (! $link) {
|
||||||
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
|
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -1131,10 +1120,10 @@ class Installer extends Controller
|
|||||||
$hasSuper = is_array( $row );
|
$hasSuper = is_array( $row );
|
||||||
@mysql_free_result( $res );
|
@mysql_free_result( $res );
|
||||||
@mysql_close( $link );
|
@mysql_close( $link );
|
||||||
$info->message .= "Connection Error: User '$db_username' can't create databases and Users <br>Please provide an user with SUPER privilege.";
|
if (! $hasSuper) {
|
||||||
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR_PRIVILEGE', SYS_LANG, Array($db_username));
|
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR_PRIVILEGE', SYS_LANG, Array($db_username));
|
||||||
return $info;
|
return $info;
|
||||||
$info->message .= "Succesfully connected to MySQL Server";
|
}
|
||||||
$info->message .= G::LoadTranslation('ID_MYSQL_SUCCESS_CONNECT');
|
$info->message .= G::LoadTranslation('ID_MYSQL_SUCCESS_CONNECT');
|
||||||
$info->result = true;
|
$info->result = true;
|
||||||
return $info;
|
return $info;
|
||||||
@@ -1144,7 +1133,7 @@ class Installer extends Controller
|
|||||||
{
|
{
|
||||||
$info->result = false;
|
$info->result = false;
|
||||||
$info->message = '';
|
$info->message = '';
|
||||||
$info->message = 'php-mssql is Not Installed';
|
if (! function_exists( "mssql_connect" )) {
|
||||||
$info->message = G::LoadTranslation('ID_PHP_MSSQL_NOT_INSTALLED');
|
$info->message = G::LoadTranslation('ID_PHP_MSSQL_NOT_INSTALLED');
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -1155,14 +1144,14 @@ class Installer extends Controller
|
|||||||
$db_password = $_REQUEST['db_password'];
|
$db_password = $_REQUEST['db_password'];
|
||||||
|
|
||||||
$fp = @fsockopen( $db_hostname, $db_port, $errno, $errstr, 30 );
|
$fp = @fsockopen( $db_hostname, $db_port, $errno, $errstr, 30 );
|
||||||
$info->message .= "Connection Error: $errstr ($errno)";
|
if (! $fp) {
|
||||||
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR', SYS_LANG, Array($errstr ($errno)));
|
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR', SYS_LANG, Array($errstr ($errno)));
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
$db_host = ($db_port != '' && $db_port != 1433) ? $db_hostname . ':' . $db_port : $db_hostname;
|
||||||
$link = @mssql_connect( $db_host, $db_username, $db_password );
|
$link = @mssql_connect( $db_host, $db_username, $db_password );
|
||||||
$info->message .= "Connection Error: unable to connect to MSSQL using provided credentials.";
|
if (! $link) {
|
||||||
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
|
$info->message .= G::LoadTranslation('ID_MYSQL_CREDENTIALS_WRONG');
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
@@ -1202,13 +1191,14 @@ class Installer extends Controller
|
|||||||
}
|
}
|
||||||
mssql_free_result( $res );
|
mssql_free_result( $res );
|
||||||
|
|
||||||
$info->message .= "Connection Error: User '$db_username' can't create databases and Users <br>Please provide an user with sysadmin role or dbcreator and securityadmin roles.";
|
if (! ($hasSysAdmin || ($hasSecurityAdmin && $hasDbCreator))) {
|
||||||
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR_SECURITYADMIN', SYS_LANG, Array($db_username) );
|
$info->message .= G::LoadTranslation('ID_CONNECTION_ERROR_SECURITYADMIN', SYS_LANG, Array($db_username) );
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
$info->message .= "Succesfully connected to MSSQL Server";
|
|
||||||
$info->message .= G::LoadTranslation('ID_MSSQL_SUCCESS_CONNECT');
|
$info->message .= G::LoadTranslation('ID_MSSQL_SUCCESS_CONNECT');
|
||||||
$info->result = true;
|
$info->result = true;
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
|||||||
* msg-text to show, and the value is the message text itself. Defaults to
|
* msg-text to show, and the value is the message text itself. Defaults to
|
||||||
<pre><code>
|
<pre><code>
|
||||||
{
|
{
|
||||||
default : 'Saving...'
|
default : _('ID_SAVING')
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
*
|
*
|
||||||
@@ -52,7 +52,7 @@ Ext.ux.Wiz = Ext.extend(Ext.Window, {
|
|||||||
* various messages.
|
* various messages.
|
||||||
<pre><code>
|
<pre><code>
|
||||||
this.loadMaskConfig = {
|
this.loadMaskConfig = {
|
||||||
default : 'Saving...',
|
default : _('ID_SAVING'),
|
||||||
validating : 'Please wait, validating input...',
|
validating : 'Please wait, validating input...',
|
||||||
};
|
};
|
||||||
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
// loadMask will be shown, displaying the message 'Please wait, validating input...'
|
||||||
@@ -60,7 +60,7 @@ this.showLoadMask(true, 'validating');
|
|||||||
</code></pre>
|
</code></pre>
|
||||||
*/
|
*/
|
||||||
loadMaskConfig : {
|
loadMaskConfig : {
|
||||||
'default' : 'Saving...'
|
'default' : _('ID_SAVING')
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -105,25 +105,25 @@ this.showLoadMask(true, 'validating');
|
|||||||
* @cfg {String} previousButtonText The text to render the previous-button with.
|
* @cfg {String} previousButtonText The text to render the previous-button with.
|
||||||
* Defaults to "< Back" (< Back)
|
* Defaults to "< Back" (< Back)
|
||||||
*/
|
*/
|
||||||
previousButtonText : '< Previous',
|
previousButtonText : _('ID_PREVIUS'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cfg {String} nextButtonText The text to render the next-button with.
|
* @cfg {String} nextButtonText The text to render the next-button with.
|
||||||
* Defaults to "Next >" (Next >)
|
* Defaults to "Next >" (Next >)
|
||||||
*/
|
*/
|
||||||
nextButtonText : 'Next >',
|
nextButtonText : _('ID_NEXT'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cfg {String} cancelButtonText The text to render the cancel-button with.
|
* @cfg {String} cancelButtonText The text to render the cancel-button with.
|
||||||
* Defaults to "Cancel"
|
* Defaults to "Cancel"
|
||||||
*/
|
*/
|
||||||
cancelButtonText : 'Cancel',
|
cancelButtonText : _('ID_CANCEL'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cfg {String} finishButtonText The text to render the next-button with when the last
|
* @cfg {String} finishButtonText The text to render the next-button with when the last
|
||||||
* step of the wizard is reached. Defaults to "Finish"
|
* step of the wizard is reached. Defaults to "Finish"
|
||||||
*/
|
*/
|
||||||
finishButtonText : 'Finish',
|
finishButtonText : _('ID_FINISH'),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @cfg {Object} headerConfig A config-object to use with {@link Ext.ux.Wiz.Header}.
|
* @cfg {Object} headerConfig A config-object to use with {@link Ext.ux.Wiz.Header}.
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var cmbLanguages = new Ext.form.ComboBox({
|
var cmbLanguages = new Ext.form.ComboBox({
|
||||||
fieldLabel: 'Language',
|
fieldLabel: _('ID_LANGUAGES'),
|
||||||
store: store,
|
store: store,
|
||||||
labelWidth: 200,
|
labelWidth: 200,
|
||||||
displayField:'label',
|
displayField:'label',
|
||||||
@@ -36,7 +36,7 @@ Ext.onReady(function(){
|
|||||||
mode: 'local',
|
mode: 'local',
|
||||||
forceSelection: true,
|
forceSelection: true,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
emptyText:'Select a language...',
|
emptyText:_('ID_EMPTY_LANGUAGE'),
|
||||||
selectOnFocus:true
|
selectOnFocus:true
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -101,9 +101,9 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
permissionInfo.error1 = response.noWritableFiles
|
permissionInfo.error1 = response.noWritableFiles
|
||||||
|
|
||||||
//type = response.success ? 'success' : 'warning';
|
//type = response.success ? 'success' : _('ID_WARNING');
|
||||||
if (!response.success)
|
if (!response.success)
|
||||||
PMExt.error('WARNING', response.notify + ' <a href="#" onclick="showPermissionInfo(1); return false;">Show non-writable files.</a>');
|
PMExt.error(_('ID_WARNING'), response.notify + ' <a href="#" onclick="showPermissionInfo(1); return false;">Show non-writable files.</a>');
|
||||||
|
|
||||||
},
|
},
|
||||||
failure: function(){},
|
failure: function(){},
|
||||||
@@ -149,7 +149,7 @@ Ext.onReady(function(){
|
|||||||
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
Ext.getCmp('db_message').setValue(getFieldOutput(response.message, response.result));
|
||||||
|
|
||||||
if (!response.result)
|
if (!response.result)
|
||||||
PMExt.notify('WARNING', response.message, 'warning');
|
PMExt.notify(_('ID_WARNING'), response.message, _('ID_WARNING'));
|
||||||
|
|
||||||
wizard.onClientValidation(3, response.result);
|
wizard.onClientValidation(3, response.result);
|
||||||
wizard.showLoadMask(false);
|
wizard.showLoadMask(false);
|
||||||
@@ -168,37 +168,37 @@ Ext.onReady(function(){
|
|||||||
function checkWorkspaceConfiguration() {
|
function checkWorkspaceConfiguration() {
|
||||||
var canInstall = false;
|
var canInstall = false;
|
||||||
if (!Ext.getCmp('workspace').isValid()) {
|
if (!Ext.getCmp('workspace').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Workspace Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_WORKSPACE'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('adminUsername').isValid()) {
|
if (!Ext.getCmp('adminUsername').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Admin Username.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_ADMIN_NAME'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Ext.getCmp('adminPassword').getValue() == '') {
|
if (Ext.getCmp('adminPassword').getValue() == '') {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Admin Password.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_ADMIN_PASSWORD'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The password confirmation is incorrect.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_PASSWORD_CONFIRMATION_INCORRECT'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('wfDatabase').isValid()) {
|
if (!Ext.getCmp('wfDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Workflow Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_WORKFLOW_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('rbDatabase').isValid()) {
|
if (!Ext.getCmp('rbDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Rbac Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_RBAC_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('rpDatabase').isValid()) {
|
if (!Ext.getCmp('rpDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Report Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_REPORT_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -210,8 +210,8 @@ Ext.onReady(function(){
|
|||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: 'checkDatabases',
|
url: 'checkDatabases',
|
||||||
success: function(response){
|
success: function(response){
|
||||||
var existMsg = '<span style="color: red;">(Exists)</span>';
|
var existMsg = '<span style="color: red;">' + _('ID_EXIST') + '</span>';
|
||||||
var noExistsMsg = '<span style="color: green;">(No exists)</span>';
|
var noExistsMsg = '<span style="color: green;">' + _('ID_NO_EXIST') + '</span>';
|
||||||
var response = Ext.util.JSON.decode(response.responseText);
|
var response = Ext.util.JSON.decode(response.responseText);
|
||||||
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
|
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
|
||||||
Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg);
|
Ext.get('rbDatabaseSpan').dom.innerHTML = (response.rbDatabaseExists ? existMsg : noExistsMsg);
|
||||||
@@ -221,11 +221,11 @@ Ext.onReady(function(){
|
|||||||
wizard.onClientValidation(4, dbFlag);
|
wizard.onClientValidation(4, dbFlag);
|
||||||
|
|
||||||
if (dbFlag) {
|
if (dbFlag) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The data is correct.', true));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_DATA_CORRECT'), true));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Not Passed.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_NOT_PASSED'), false));
|
||||||
PMExt.notify('WARNING', response.errMessage, 'warning', 4)
|
PMExt.notify(_('ID_WARNING'), response.errMessage, _('ID_WARNING'), 4)
|
||||||
}
|
}
|
||||||
wizard.showLoadMask(false);
|
wizard.showLoadMask(false);
|
||||||
},
|
},
|
||||||
@@ -247,7 +247,7 @@ Ext.onReady(function(){
|
|||||||
var setIndex = 0;
|
var setIndex = 0;
|
||||||
|
|
||||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||||
title : 'Pre-installation check',
|
title : _('ID_PREINSTALLATION'),
|
||||||
monitorValid : false,
|
monitorValid : false,
|
||||||
labelAlign: 'left',
|
labelAlign: 'left',
|
||||||
labelWidth: 200,
|
labelWidth: 200,
|
||||||
@@ -256,7 +256,7 @@ Ext.onReady(function(){
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
border : false,
|
border : false,
|
||||||
html : 'Pre-installation check',
|
html : _('ID_PREINSTALLATION'),
|
||||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -268,7 +268,7 @@ Ext.onReady(function(){
|
|||||||
region: 'west',
|
region: 'west',
|
||||||
width: 250,
|
width: 250,
|
||||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||||
html: step1_txt
|
html: _('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION')
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -278,12 +278,12 @@ Ext.onReady(function(){
|
|||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'PHP Version >= 5.2.10',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_PHP'),
|
||||||
id : 'php'
|
id : 'php'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'MySQL Support',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_MYSQL'),
|
||||||
id : 'mysql'
|
id : 'mysql'
|
||||||
}/*,
|
}/*,
|
||||||
{
|
{
|
||||||
@@ -293,47 +293,47 @@ Ext.onReady(function(){
|
|||||||
}*/,
|
}*/,
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'cURL Version',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_CURL'),
|
||||||
id : 'curl'
|
id : 'curl'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'OpenSSL Version (*)',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_OPENSSL'),
|
||||||
id : 'openssl'
|
id : 'openssl'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'DOM/XML Support',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_DOMXML'),
|
||||||
id : 'dom'
|
id : 'dom'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'GD Support',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_GD'),
|
||||||
id : 'gd'
|
id : 'gd'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'Multibyte Strings Support',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_MULTIBYTESTRING'),
|
||||||
id : 'multibyte'
|
id : 'multibyte'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'Soap Support',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_SOAP'),
|
||||||
id : 'soap'
|
id : 'soap'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'LDAP Support (*)',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_LDAP'),
|
||||||
id : 'ldap'
|
id : 'ldap'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
fieldLabel: 'Memory Limit >= 80M',
|
fieldLabel: _('ID_PROCESSMAKER_REQUIREMENTS_MEMORYLIMIT'),
|
||||||
id: 'memory',
|
id: 'memory',
|
||||||
value: '5.0 or greater'
|
value: '5.0 or greater'
|
||||||
},
|
},
|
||||||
new Ext.Button({
|
new Ext.Button({
|
||||||
text : 'Check Again',
|
text : _('ID_CHECK_AGAIN'),
|
||||||
handler : getSystemInfo,
|
handler : getSystemInfo,
|
||||||
scope : this
|
scope : this
|
||||||
})
|
})
|
||||||
@@ -349,7 +349,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
// third card with Directory File Permission
|
// third card with Directory File Permission
|
||||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||||
title:'Directory File Permission',
|
title:_('ID_DIRECTORY_FILE_PERMISSION'),
|
||||||
monitorValid : false,
|
monitorValid : false,
|
||||||
labelAlign: 'left',
|
labelAlign: 'left',
|
||||||
labelWidth: 200,
|
labelWidth: 200,
|
||||||
@@ -359,7 +359,7 @@ Ext.onReady(function(){
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
border : false,
|
border : false,
|
||||||
html:'Directory/File Permission',
|
html: _('ID_DIRECTORY_FILE_PERMISSION'),
|
||||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -371,7 +371,7 @@ Ext.onReady(function(){
|
|||||||
region: 'north',
|
region: 'north',
|
||||||
height: 55,
|
height: 55,
|
||||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||||
html: step3_txt
|
html: _('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP3_1')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
region: 'center',
|
region: 'center',
|
||||||
@@ -382,7 +382,7 @@ Ext.onReady(function(){
|
|||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathConfigSpan"></span> Config Directory',
|
fieldLabel: '<span id="pathConfigSpan"></span> '+_('ID_CONFIG_DIRECTORY'),
|
||||||
id: 'pathConfig',
|
id: 'pathConfig',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_config,
|
value: path_config,
|
||||||
@@ -390,7 +390,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathLanguagesSpan"></span> Language Directory',
|
fieldLabel: '<span id="pathLanguagesSpan"></span> '+ _('ID_LANGUAJE_DIRECTORY'),
|
||||||
id: 'pathLanguages',
|
id: 'pathLanguages',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_languages,
|
value: path_languages,
|
||||||
@@ -398,7 +398,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathPluginsSpan"></span> Plugins Directory',
|
fieldLabel: '<span id="pathPluginsSpan"></span> ' + _('ID_PLUGINS_DIRECTORY'),
|
||||||
id: 'pathPlugins',
|
id: 'pathPlugins',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_plugins,
|
value: path_plugins,
|
||||||
@@ -406,7 +406,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathXmlformsSpan"></span> Xmlform Directory Directory',
|
fieldLabel: '<span id="pathXmlformsSpan"></span> ' + _('ID_XMLFROM_DIRECTORY'),
|
||||||
id: 'pathXmlforms',
|
id: 'pathXmlforms',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_xmlforms,
|
value: path_xmlforms,
|
||||||
@@ -414,7 +414,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathPublicSpan"></span> Public Index file',
|
fieldLabel: '<span id="pathPublicSpan"></span> ' + _('ID_PUBLIC_INDEX_FILE'),
|
||||||
id: 'pathPublic',
|
id: 'pathPublic',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_public,
|
value: path_public,
|
||||||
@@ -422,13 +422,13 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathSharedSpan"></span> Workflow Data Directory',
|
fieldLabel: '<span id="pathSharedSpan"></span> ' + _('ID_WORFLOW_DATA_DIRECTORY'),
|
||||||
id: 'pathShared',
|
id: 'pathShared',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_shared,
|
value: path_shared,
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
blankText: '"Workflow Data Directory" is required',
|
blankText: _('ID_WORKFLOW_DATA_DIRECTORY_REQUIRED'),
|
||||||
selectOnFocus: true,
|
selectOnFocus: true,
|
||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
listeners: {keyup: function() {
|
listeners: {keyup: function() {
|
||||||
@@ -443,14 +443,14 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathLogFileSpan"></span> Installation log file',
|
fieldLabel: '<span id="pathLogFileSpan"></span> ' + _('ID_INSTALLATION_LOG'),
|
||||||
id: 'pathLogFile',
|
id: 'pathLogFile',
|
||||||
width: 430,
|
width: 430,
|
||||||
value: path_shared + 'log' + path_sep + 'install.log',
|
value: path_shared + 'log' + path_sep + 'install.log',
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
new Ext.Button({
|
new Ext.Button({
|
||||||
text : 'Check Again',
|
text : _('ID_CHECK_AGAIN'),
|
||||||
handler : getPermissionInfo,
|
handler : getPermissionInfo,
|
||||||
scope : this
|
scope : this
|
||||||
})
|
})
|
||||||
@@ -468,7 +468,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
// third card with input field email-address
|
// third card with input field email-address
|
||||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||||
title:'ProcessMaker Open Source License',
|
title:_('ID_PROCESSMAKER_LICENSE'),
|
||||||
//monitorValid : false,
|
//monitorValid : false,
|
||||||
defaults : {
|
defaults : {
|
||||||
labelStyle : 'font-size:12px'
|
labelStyle : 'font-size:12px'
|
||||||
@@ -476,7 +476,7 @@ Ext.onReady(function(){
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
border : false,
|
border : false,
|
||||||
html:'ProcessMaker Open Source License',
|
html:_('ID_PROCESSMAKER_LICENSE'),
|
||||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -522,12 +522,12 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
// fourth card Database Configuration
|
// fourth card Database Configuration
|
||||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||||
title : 'Database Configuration',
|
title : _('ID_DATABASE_CONFIGURATION'),
|
||||||
monitorValid : false,
|
monitorValid : false,
|
||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
border : false,
|
border : false,
|
||||||
html : 'Database Configuration',
|
html : _('ID_DATABASE_CONFIGURATION'),
|
||||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -539,7 +539,7 @@ Ext.onReady(function(){
|
|||||||
region: 'west',
|
region: 'west',
|
||||||
width: 200,
|
width: 200,
|
||||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||||
html: step4_txt
|
html: _('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP4_1')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
region: 'center',
|
region: 'center',
|
||||||
@@ -552,7 +552,7 @@ Ext.onReady(function(){
|
|||||||
labelWidth: 160,
|
labelWidth: 160,
|
||||||
items:[
|
items:[
|
||||||
new Ext.form.ComboBox({
|
new Ext.form.ComboBox({
|
||||||
fieldLabel: 'Database Engine',
|
fieldLabel: _('ID_DATABASE_ENGINE'),
|
||||||
width : 200,
|
width : 200,
|
||||||
store : storeDatabase,
|
store : storeDatabase,
|
||||||
displayField : 'label',
|
displayField : 'label',
|
||||||
@@ -578,7 +578,7 @@ Ext.onReady(function(){
|
|||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Host Name',
|
fieldLabel: _('ID_HOST_NAME_LABEL'),
|
||||||
width : 180,
|
width : 180,
|
||||||
id: 'db_hostname',
|
id: 'db_hostname',
|
||||||
value :'localhost',
|
value :'localhost',
|
||||||
@@ -593,7 +593,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Port',
|
fieldLabel: _('ID_PORT'),
|
||||||
width : 180,
|
width : 180,
|
||||||
id: 'db_port',
|
id: 'db_port',
|
||||||
value :'',
|
value :'',
|
||||||
@@ -608,7 +608,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Username',
|
fieldLabel: _('ID_USERNAME'),
|
||||||
width : 180,
|
width : 180,
|
||||||
id: 'db_username',
|
id: 'db_username',
|
||||||
value :'root',
|
value :'root',
|
||||||
@@ -623,7 +623,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Password',
|
fieldLabel: _('ID_PASSWORD'),
|
||||||
inputType : 'password',
|
inputType : 'password',
|
||||||
value : '',
|
value : '',
|
||||||
width : 180,
|
width : 180,
|
||||||
@@ -639,7 +639,7 @@ Ext.onReady(function(){
|
|||||||
id : 'db_message'
|
id : 'db_message'
|
||||||
},
|
},
|
||||||
new Ext.Button({
|
new Ext.Button({
|
||||||
text : ' Test Connection',
|
text : _('ID_TEST_CONNECTION'),
|
||||||
handler : testConnection,
|
handler : testConnection,
|
||||||
scope : this
|
scope : this
|
||||||
})
|
})
|
||||||
@@ -657,7 +657,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
|
|
||||||
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
steps[setIndex++] = new Ext.ux.Wiz.Card({
|
||||||
title : 'Workspace Configuration',
|
title : _('ID_WORKSPACE_CONFIGURATION'),
|
||||||
monitorValid : false,
|
monitorValid : false,
|
||||||
defaults : {
|
defaults : {
|
||||||
labelStyle : 'font-size:11px'
|
labelStyle : 'font-size:11px'
|
||||||
@@ -665,7 +665,7 @@ Ext.onReady(function(){
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
border : false,
|
border : false,
|
||||||
html : 'Workspace Configuration',
|
html : _('ID_WORKSPACE_CONFIGURATION'),
|
||||||
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
bodyStyle : 'background:none;padding-top:0px;padding-bottom:5px;font-weight:bold;font-size:1.3em;'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -677,7 +677,7 @@ Ext.onReady(function(){
|
|||||||
region: 'west',
|
region: 'west',
|
||||||
width: 200,
|
width: 200,
|
||||||
bodyStyle : 'padding:10px;font-size:1.2em;',
|
bodyStyle : 'padding:10px;font-size:1.2em;',
|
||||||
html: step5_txt
|
html: _('ID_PROCESSMAKER_REQUIREMENTS_DESCRIPTION_STEP5')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
region: 'center',
|
region: 'center',
|
||||||
@@ -691,7 +691,7 @@ Ext.onReady(function(){
|
|||||||
items:[
|
items:[
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Workspace Name',
|
fieldLabel: _('ID_WORKSPACE_NAME'),
|
||||||
value :'workflow',
|
value :'workflow',
|
||||||
maxLength: 29,
|
maxLength: 29,
|
||||||
validator : function(v){
|
validator : function(v){
|
||||||
@@ -711,7 +711,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Admin Username',
|
fieldLabel: _('ID_ADMIN_USERNAME'),
|
||||||
value :'admin',
|
value :'admin',
|
||||||
validator : function(v){
|
validator : function(v){
|
||||||
var t = /^[a-zA-Z_0-9.@-]+$/;
|
var t = /^[a-zA-Z_0-9.@-]+$/;
|
||||||
@@ -725,7 +725,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Admin Password',
|
fieldLabel: _('ID_ADMIN_PASSWORD_LABEL'),
|
||||||
inputType : 'password',
|
inputType : 'password',
|
||||||
id: 'adminPassword',
|
id: 'adminPassword',
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
@@ -736,7 +736,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Confirm Admin Password',
|
fieldLabel: _('ID_ADMIN_PASSWORD'),
|
||||||
inputType : 'password',
|
inputType : 'password',
|
||||||
id : 'confirmPassword',
|
id : 'confirmPassword',
|
||||||
enableKeyEvents: true,
|
enableKeyEvents: true,
|
||||||
@@ -755,7 +755,7 @@ Ext.onReady(function(){
|
|||||||
//title: 'ProcessMaker Databases',
|
//title: 'ProcessMaker Databases',
|
||||||
items:[
|
items:[
|
||||||
new Ext.form.Checkbox({
|
new Ext.form.Checkbox({
|
||||||
boxLabel: 'Change Database names',
|
boxLabel: _('ID_CHANGE_DATABASE_NAME'),
|
||||||
id : 'changeDBNames',
|
id : 'changeDBNames',
|
||||||
handler: function() {
|
handler: function() {
|
||||||
if (this.getValue()) {
|
if (this.getValue()) {
|
||||||
@@ -779,7 +779,7 @@ Ext.onReady(function(){
|
|||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Workflow Database Name <span id="wfDatabaseSpan"></span>',
|
fieldLabel: _('ID_WF_DATABASE_NAME') + ' <span id="wfDatabaseSpan"></span>',
|
||||||
id : 'wfDatabase',
|
id : 'wfDatabase',
|
||||||
value :'wf_workflow',
|
value :'wf_workflow',
|
||||||
allowBlank : false,
|
allowBlank : false,
|
||||||
@@ -796,7 +796,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Rbac Database Name <span id="rbDatabaseSpan"></span>',
|
fieldLabel: _('ID_RB_DATABASE_NAME') + ' <span id="rbDatabaseSpan"></span>',
|
||||||
id : 'rbDatabase',
|
id : 'rbDatabase',
|
||||||
value :'rb_workflow',
|
value :'rb_workflow',
|
||||||
allowBlank : false,
|
allowBlank : false,
|
||||||
@@ -813,7 +813,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
xtype : 'textfield',
|
xtype : 'textfield',
|
||||||
fieldLabel: 'Report Database Name <span id="rpDatabaseSpan"></span>',
|
fieldLabel: _('ID_RP_DATABASE_NAME') + ' <span id="rpDatabaseSpan"></span>',
|
||||||
id : 'rpDatabase',
|
id : 'rpDatabase',
|
||||||
value :'rp_workflow',
|
value :'rp_workflow',
|
||||||
allowBlank : false,
|
allowBlank : false,
|
||||||
@@ -829,7 +829,7 @@ Ext.onReady(function(){
|
|||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
new Ext.form.Checkbox({
|
new Ext.form.Checkbox({
|
||||||
boxLabel : "Delete Databases if exists",
|
boxLabel : _('ID_DELETE_DATABASES'),
|
||||||
id : 'deleteDB',
|
id : 'deleteDB',
|
||||||
handler: function() {
|
handler: function() {
|
||||||
wizard.onClientValidation(4, false);
|
wizard.onClientValidation(4, false);
|
||||||
@@ -841,7 +841,7 @@ Ext.onReady(function(){
|
|||||||
},
|
},
|
||||||
new Ext.Button({
|
new Ext.Button({
|
||||||
id: 'checkWSConfiguration',
|
id: 'checkWSConfiguration',
|
||||||
text: ' Check Workspace Configuration',
|
text: _('ID_CHECK_WORKSPACE_CONFIGURATION'),
|
||||||
handler: checkWorkspaceConfiguration,
|
handler: checkWorkspaceConfiguration,
|
||||||
scope: this
|
scope: this
|
||||||
})
|
})
|
||||||
@@ -872,7 +872,7 @@ function showPermissionInfo()
|
|||||||
|
|
||||||
w = new Ext.Window({
|
w = new Ext.Window({
|
||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
title: 'Non-writable Files',
|
title: _('ID_NON_WRITABLE_FILES'),
|
||||||
width: 550,
|
width: 550,
|
||||||
height: 180,
|
height: 180,
|
||||||
closable: true,
|
closable: true,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
function finishInstallation()
|
function finishInstallation()
|
||||||
{
|
{
|
||||||
wizard.showLoadMask(true, 'finishing');
|
wizard.showLoadMask(true, _('ID_FINISH'));
|
||||||
Ext.Ajax.request({
|
Ext.Ajax.request({
|
||||||
url: 'createWorkspace',
|
url: 'createWorkspace',
|
||||||
success: function(response){
|
success: function(response){
|
||||||
@@ -54,8 +54,8 @@ function finishInstallation()
|
|||||||
|
|
||||||
//Ext.msgBoxSlider.msgTopCenter(
|
//Ext.msgBoxSlider.msgTopCenter(
|
||||||
PMExt.info(
|
PMExt.info(
|
||||||
'ProcessMaker Installation',
|
_('ID_PROCESSMAKER_INSTALLATION'),
|
||||||
'ProcessMaker was successfully installed<br/>Workspace "' + Ext.getCmp('workspace').getValue() + '" was installed correctly.',
|
response.messageFinish,
|
||||||
function(){
|
function(){
|
||||||
_redirect(response.uri);
|
_redirect(response.uri);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,37 +52,37 @@ Ext.onReady(function(){
|
|||||||
var checkWorkspaceConfiguration = function() {
|
var checkWorkspaceConfiguration = function() {
|
||||||
var canInstall = false;
|
var canInstall = false;
|
||||||
if (!Ext.getCmp('workspace').isValid()) {
|
if (!Ext.getCmp('workspace').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Workspace Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_WORKSPACE'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('adminUsername').isValid()) {
|
if (!Ext.getCmp('adminUsername').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter a valid Admin Username.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_ADMIN_NAME'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Ext.getCmp('adminPassword').getValue() == '') {
|
if (Ext.getCmp('adminPassword').getValue() == '') {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Admin Password.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_VALID_ADMIN_PASSWORD'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
if (Ext.getCmp('adminPassword').getValue() != Ext.getCmp('confirmPassword').getValue()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('The password confirmation is incorrect.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_PASSWORD_CONFIRMATION_INCORRECT'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('wfDatabase').isValid()) {
|
if (!Ext.getCmp('wfDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Workflow Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_WORKFLOW_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('rbDatabase').isValid()) {
|
if (!Ext.getCmp('rbDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Rbac Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_RBAC_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!Ext.getCmp('rpDatabase').isValid()) {
|
if (!Ext.getCmp('rpDatabase').isValid()) {
|
||||||
Ext.getCmp('finish_message').setValue(getFieldOutput('Please enter the Report Database Name.', false));
|
Ext.getCmp('finish_message').setValue(getFieldOutput(_('ID_REPORT_DATABASE_NAME'), false));
|
||||||
wizard.onClientValidation(2, false);
|
wizard.onClientValidation(2, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user