This commit is contained in:
Paula V. Quispe
2016-04-08 16:32:26 -04:00
parent 5b2ee5e7aa
commit 99dfa36aa7

View File

@@ -274,17 +274,19 @@ function executeQuery ($SqlStatement, $DBConnectionUID = 'workflow', $aParameter
} }
} }
} }
if(isset($nameOfTable)){ if(isset($nameOfTable) && $nameOfTable !== ''){
if(in_array($nameOfTable,$aListAllTables)){ if(in_array($nameOfTable,$aListAllTables)){
G::SendTemporalMessage( 'ID_NOT_EXECUTE_QUERY', 'error', 'labels' ); G::SendTemporalMessage( 'ID_NOT_EXECUTE_QUERY', 'error', 'labels' );
throw new SQLException(G::loadTranslation('ID_NOT_EXECUTE_QUERY')); throw new SQLException(G::loadTranslation('ID_NOT_EXECUTE_QUERY'));
} }
} }
if (!empty($arrayOfTables)) { if (is_array($arrayOfTables)){
foreach ($arrayOfTables as $row) { foreach ($arrayOfTables as $row){
if(in_array($row, $aListAllTables)){ if(!empty($row)){
G::SendTemporalMessage( 'ID_NOT_EXECUTE_QUERY', 'error', 'labels' ); if(in_array($row, $aListAllTables)){
throw new SQLException(G::loadTranslation('ID_NOT_EXECUTE_QUERY')); G::SendTemporalMessage( 'ID_NOT_EXECUTE_QUERY', 'error', 'labels' );
throw new SQLException(G::loadTranslation('ID_NOT_EXECUTE_QUERY'));
}
} }
} }
} }