Merge remote-tracking branch 'upstream/develop' into bugfix/HOR-2967

This commit is contained in:
Roly Rudy Gutierrez Pinto
2017-05-16 15:39:12 -04:00
85 changed files with 1022 additions and 732 deletions

View File

@@ -165,16 +165,6 @@ switch ($request) {
} else {
$result->info[] = array('name' => 'Error', 'value' => $res['msg']);
}
$res = $appCache->setSuperForUser($currentUser);
if (!isset($res['error'])) {
$result->info[] = array('name' => G::LoadTranslation('ID_SETTING_SUPER'), 'value' => G::LoadTranslation('ID_SUCCESSFULLY'));
} else {
$result->error = true;
$result->errorMsg = $res['msg'];
}
$currentUserIsSuper = true;
}
//now check if table APPCACHEVIEW exists, and it have correct number of fields, etc.

View File

@@ -153,27 +153,27 @@ try {
$oDataset->next();
$aRow = $oDataset->getRow();
if($locale != "en"){ //Default Lengage 'en'
if($locale != SYS_LANG){ //Current lenguage
//THERE IS NO ANY CASE STARTED FROM THES LANGUAGE
if ($aRow[0] == 0) { //so we can delete this language
try {
Content::removeLanguageContent( $locale );
$trn->removeTranslationEnvironment( $locale );
echo G::LoadTranslation( 'ID_LANGUAGE_DELETED_SUCCESSFULLY' );
} catch (Exception $e) {
$token = strtotime("now");
if ($locale != "en") { //Default Language 'en'
if ($locale != SYS_LANG) { //Current Language
//THERE IS NO ANY CASE STARTED FROM THIS LANGUAGE
if (empty($aRow)) { //so we can delete this language
try {
Content::removeLanguageContent($locale);
$trn->removeTranslationEnvironment($locale);
echo G::LoadTranslation('ID_LANGUAGE_DELETED_SUCCESSFULLY');
} catch (Exception $e) {
$token = strtotime("now");
PMException::registerErrorLog($e, $token);
G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
} else {
echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE' ) );
}
} else {
echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE_CURRENTLY' ) );
}
G::outRes(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)));
}
} else {
echo str_replace('{0}', $aRow['APP_TITLE'], G::LoadTranslation('ID_LANGUAGE_CANT_DELETE'));
}
} else {
echo str_replace('{0}', $aRow['APP_TITLE'], G::LoadTranslation('ID_LANGUAGE_CANT_DELETE_CURRENTLY'));
}
} else {
echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE_DEFAULT' ) );
echo str_replace('{0}', $aRow['APP_TITLE'], G::LoadTranslation('ID_LANGUAGE_CANT_DELETE_DEFAULT'));
}
break;
}