PM-1307 Mensaje de Error despues de abrir un proceso
Se modifico el instalador para que se validen los permisos en los archivos necesarios.
This commit is contained in:
@@ -31,11 +31,13 @@ class Installer extends Controller
|
|||||||
$this->path_shared = PATH_TRUNK . 'shared/';
|
$this->path_shared = PATH_TRUNK . 'shared/';
|
||||||
$this->path_sep = PATH_SEP;
|
$this->path_sep = PATH_SEP;
|
||||||
$this->systemName = '';
|
$this->systemName = '';
|
||||||
|
//$this->path_documents = ;
|
||||||
|
$this->path_translations = PATH_CORE . 'js/labels/';
|
||||||
|
$this->path_translationsMafe = PATH_HOME . 'public_html/translations/';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function index ($httpData)
|
public function index ($httpData)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))){
|
if ((strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') && (file_exists($this->path_shared . 'partner.info'))){
|
||||||
$this->includeExtJS( 'installer/stopInstall');
|
$this->includeExtJS( 'installer/stopInstall');
|
||||||
$this->setView( 'installer/mainStopInstall' );
|
$this->setView( 'installer/mainStopInstall' );
|
||||||
@@ -62,6 +64,8 @@ class Installer extends Controller
|
|||||||
$this->setJSVar( 'path_public', $this->path_public );
|
$this->setJSVar( 'path_public', $this->path_public );
|
||||||
$this->setJSVar( 'path_shared', $this->path_shared );
|
$this->setJSVar( 'path_shared', $this->path_shared );
|
||||||
$this->setJSVar( 'path_sep', $this->path_sep );
|
$this->setJSVar( 'path_sep', $this->path_sep );
|
||||||
|
$this->setJSVar( 'path_translations', $this->path_translations );
|
||||||
|
$this->setJSVar( 'path_translationsMafe', $this->path_translationsMafe );
|
||||||
|
|
||||||
$this->setView( 'installer/main' );
|
$this->setView( 'installer/main' );
|
||||||
|
|
||||||
@@ -232,7 +236,6 @@ class Installer extends Controller
|
|||||||
$info = new StdClass();
|
$info = new StdClass();
|
||||||
$info->success = true;
|
$info->success = true;
|
||||||
$noWritableFiles = array ();
|
$noWritableFiles = array ();
|
||||||
|
|
||||||
// pathConfig
|
// pathConfig
|
||||||
$info->pathConfig = new stdclass();
|
$info->pathConfig = new stdclass();
|
||||||
$info->pathConfig->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
$info->pathConfig->message = G::LoadTranslation('ID_INDEX_NOT_WRITEABLE');
|
||||||
@@ -270,6 +273,24 @@ class Installer extends Controller
|
|||||||
$info->success = false;
|
$info->success = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$info->pathTranslations = new stdclass();
|
||||||
|
$info->pathTranslations->message = G::LoadTranslation('ID_TRANSLATION_NOT_WRITEABLE');
|
||||||
|
$info->pathTranslations->result = G::is_writable_r( $_REQUEST['pathTranslations'], $noWritableFiles );
|
||||||
|
if ($info->pathTranslations->result) {
|
||||||
|
$info->pathTranslations->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
|
} else {
|
||||||
|
$info->success = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$info->pathTranslationsMafe = new stdclass();
|
||||||
|
$info->pathTranslationsMafe->message = G::LoadTranslation('ID_MAFE_TRANSLATION_NOT_WRITEABLE');
|
||||||
|
$info->pathTranslationsMafe->result = G::is_writable_r( $_REQUEST['pathTranslationsMafe'], $noWritableFiles );
|
||||||
|
if ($info->pathTranslationsMafe->result) {
|
||||||
|
$info->pathTranslationsMafe->message = G::LoadTranslation('ID_WRITEABLE');
|
||||||
|
} else {
|
||||||
|
$info->success = false;
|
||||||
|
}
|
||||||
|
|
||||||
$info->pathPublic = new stdclass();
|
$info->pathPublic = new stdclass();
|
||||||
|
|
||||||
$info->pathShared = new stdclass();
|
$info->pathShared = new stdclass();
|
||||||
|
|||||||
@@ -86,7 +86,9 @@ Ext.onReady(function(){
|
|||||||
Ext.get('pathXmlformsSpan').dom.innerHTML = (response.pathXmlforms.result ? okImage : badImage);
|
Ext.get('pathXmlformsSpan').dom.innerHTML = (response.pathXmlforms.result ? okImage : badImage);
|
||||||
Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage);
|
Ext.get('pathPublicSpan').dom.innerHTML = (response.pathPublic.result ? okImage : badImage);
|
||||||
Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage);
|
Ext.get('pathSharedSpan').dom.innerHTML = (response.pathShared.result ? okImage : badImage);
|
||||||
Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage);
|
Ext.get('pathLogFileSpan').dom.innerHTML = (response.pathLogFile.result ? okImage : badImage);
|
||||||
|
Ext.get('pathTranslationsSpan').dom.innerHTML = (response.pathTranslations.result ? okImage : badImage);
|
||||||
|
Ext.get('pathTranslationsMafeSpan').dom.innerHTML = (response.pathTranslationsMafe.result ? okImage : badImage);
|
||||||
|
|
||||||
wizard.onClientValidation(1,
|
wizard.onClientValidation(1,
|
||||||
response.pathConfig.result &&
|
response.pathConfig.result &&
|
||||||
@@ -95,7 +97,9 @@ Ext.onReady(function(){
|
|||||||
response.pathXmlforms.result &&
|
response.pathXmlforms.result &&
|
||||||
response.pathPublic.result &&
|
response.pathPublic.result &&
|
||||||
response.pathShared.result &&
|
response.pathShared.result &&
|
||||||
response.pathLogFile.result
|
response.pathLogFile.result &&
|
||||||
|
response.pathTranslations.result &&
|
||||||
|
response.pathTranslationsMafe.result
|
||||||
);
|
);
|
||||||
|
|
||||||
wizard.showLoadMask(false);
|
wizard.showLoadMask(false);
|
||||||
@@ -115,7 +119,9 @@ Ext.onReady(function(){
|
|||||||
'pathXmlforms': Ext.getCmp('pathXmlforms').getValue(),
|
'pathXmlforms': Ext.getCmp('pathXmlforms').getValue(),
|
||||||
'pathShared': Ext.getCmp('pathShared').getValue(),
|
'pathShared': Ext.getCmp('pathShared').getValue(),
|
||||||
'pathLogFile': Ext.getCmp('pathLogFile').getValue(),
|
'pathLogFile': Ext.getCmp('pathLogFile').getValue(),
|
||||||
'pathPublic': Ext.getCmp('pathPublic').getValue()
|
'pathPublic': Ext.getCmp('pathPublic').getValue(),
|
||||||
|
'pathTranslations': Ext.getCmp('pathTranslations').getValue(),
|
||||||
|
'pathTranslationsMafe': Ext.getCmp('pathTranslationsMafe').getValue()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -413,6 +419,22 @@ Ext.onReady(function(){
|
|||||||
value: path_public,
|
value: path_public,
|
||||||
disabled: true
|
disabled: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
fieldLabel: '<span id="pathTranslationsSpan"></span> ' + _('ID_TRANSLATIONS_DIRECTORY'),
|
||||||
|
id: 'pathTranslations',
|
||||||
|
width: 430,
|
||||||
|
value: path_translations,
|
||||||
|
disabled: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'textfield',
|
||||||
|
fieldLabel: '<span id="pathTranslationsMafeSpan"></span> ' + _('ID_MAFE_TRANSLATION_DIRECTORY'),
|
||||||
|
id: 'pathTranslationsMafe',
|
||||||
|
width: 430,
|
||||||
|
value: path_translationsMafe,
|
||||||
|
disabled: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: '<span id="pathSharedSpan"></span> ' + _('ID_WORFLOW_DATA_DIRECTORY'),
|
fieldLabel: '<span id="pathSharedSpan"></span> ' + _('ID_WORFLOW_DATA_DIRECTORY'),
|
||||||
|
|||||||
Reference in New Issue
Block a user