From 337aebfed97f9403d6b0f6532d456f62a3e6b70e Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 22 Dec 2020 17:31:08 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B03537=20run=5Fquery=20:=20use=20panel=20f?= =?UTF-8?q?or=20OQL=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dictionaries/cs.dictionary.itop.ui.php | 2 +- dictionaries/da.dictionary.itop.ui.php | 2 +- dictionaries/de.dictionary.itop.ui.php | 2 +- dictionaries/en.dictionary.itop.ui.php | 2 +- dictionaries/es_cr.dictionary.itop.ui.php | 2 +- dictionaries/fr.dictionary.itop.ui.php | 2 +- dictionaries/hu.dictionary.itop.ui.php | 2 +- dictionaries/it.dictionary.itop.ui.php | 2 +- dictionaries/ja.dictionary.itop.ui.php | 2 +- dictionaries/nl.dictionary.itop.ui.php | 2 +- dictionaries/pt_br.dictionary.itop.ui.php | 2 +- dictionaries/ru.dictionary.itop.ui.php | 2 +- dictionaries/sk.dictionary.itop.ui.php | 2 +- dictionaries/tr.dictionary.itop.ui.php | 2 +- dictionaries/zh_cn.dictionary.itop.ui.php | 2 +- pages/run_query.php | 39 ++++++++++++----------- 16 files changed, 36 insertions(+), 33 deletions(-) diff --git a/dictionaries/cs.dictionary.itop.ui.php b/dictionaries/cs.dictionary.itop.ui.php index 80b8e604e..90eb68b08 100755 --- a/dictionaries/cs.dictionary.itop.ui.php +++ b/dictionaries/cs.dictionary.itop.ui.php @@ -700,7 +700,7 @@ Dict::Add('CS CZ', 'Czech', 'Čeština', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Nastala chyba při provádění dotazu: %1$s', + 'UI:RunQuery:Error' => 'Nastala chyba při provádění dotazu', 'UI:Query:UrlForExcel' => 'URL pro MS-Excel web queries', 'UI:Query:UrlV1' => 'Nebyl specifikován seznam sloupců k exportu. Bez této informace nemůže stránka export-V2.php provést export. Pro export všech polí použijte stránku export.php. Pokud však chcete udržet konzistenci v delším časovém horzontu, použijte stávající stránku a specifikujte paramter "fields".', 'UI:Schema:Title' => 'iTop schéma objektů', diff --git a/dictionaries/da.dictionary.itop.ui.php b/dictionaries/da.dictionary.itop.ui.php index a70eaff13..d3a4da829 100644 --- a/dictionaries/da.dictionary.itop.ui.php +++ b/dictionaries/da.dictionary.itop.ui.php @@ -687,7 +687,7 @@ Dict::Add('DA DA', 'Danish', 'Dansk', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Der opstod en fejl under afviklingen af forespøgrslen: %1$s', + 'UI:RunQuery:Error' => 'Der opstod en fejl under afviklingen af forespøgrslen', 'UI:Query:UrlForExcel' => 'URL til brug for MS-Excel web forespøgrsler', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested herebelow points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop. Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop objekt skema', diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index f5d6bcfd9..08ba6d683 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -686,7 +686,7 @@ Dict::Add('DE DE', 'German', 'Deutsch', array( 'UI:RunQuery:DevelopedOQLCount' => 'Generierte OQL für Zählung', 'UI:RunQuery:ResultSQLCount' => 'Resultierendes SQL für Zählung', 'UI:RunQuery:ResultSQL' => 'Resultierendes SQL', - 'UI:RunQuery:Error' => 'Ein Fehler trat während der Abfrage auf: %1$s auf.', + 'UI:RunQuery:Error' => 'Ein Fehler trat während der Abfrage auf', 'UI:Query:UrlForExcel' => 'URL für MS Excel Web Queries', 'UI:Query:UrlV1' => 'Die Liste der Felder wurde nicht spezifiziert. Die Seite export-V2.php kann ohne diese Angabe nicht verarbeitet werden. Deswegen, zeigt die nachstehende URL zu der Legacy-Page: export.php. Diese Legacy-Version des Exports hat folgende Limitierungen: Die Liste exportierter Felder kann, abhängig vom Output-Format und vom Datenmodell von iTop, variieren. Möchten Sie garantieren, dass die Liste aller exportierten Spalten stabil bleibt, müssen Sie einen Wert für das Attribut Feld angeben und die Seite export-V2.php nutzen.', 'UI:Schema:Title' => 'iTop Objekte-Schema', diff --git a/dictionaries/en.dictionary.itop.ui.php b/dictionaries/en.dictionary.itop.ui.php index 4adef6465..9937af07d 100644 --- a/dictionaries/en.dictionary.itop.ui.php +++ b/dictionaries/en.dictionary.itop.ui.php @@ -710,7 +710,7 @@ Dict::Add('EN US', 'English', 'English', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count', 'UI:RunQuery:ResultSQL' => 'Resulting SQL', - 'UI:RunQuery:Error' => 'An error occured while running the query: %1$s', + 'UI:RunQuery:Error' => 'An error occured while running the query', 'UI:Query:UrlForExcel' => 'URL to use for MS-Excel web queries', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested here below points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of '.ITOP_APPLICATION_SHORT.'.
Should you want to guarantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.', 'UI:Schema:Title' => ITOP_APPLICATION_SHORT.' objects schema', diff --git a/dictionaries/es_cr.dictionary.itop.ui.php b/dictionaries/es_cr.dictionary.itop.ui.php index d4fc5f733..691fb02d9 100644 --- a/dictionaries/es_cr.dictionary.itop.ui.php +++ b/dictionaries/es_cr.dictionary.itop.ui.php @@ -698,7 +698,7 @@ Dict::Add('ES CR', 'Spanish', 'Español, Castellaño', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Ha ocurrido un error al ejecutar la consulta: %1$s', + 'UI:RunQuery:Error' => 'Ha ocurrido un error al ejecutar la consulta', 'UI:Query:UrlForExcel' => 'URL para usarse en consultas web de MS-Excel', 'UI:Query:UrlV1' => 'La lista de campos se ha dejado sin especificación. La página export-V2.php no puede ser invocada sin está información. Por lo tanto, el URL sugerido abajo apunta a la página legada: export.php. Esta versión legada de exportación tiene la siguiente limitación: la lista de campos exportados puede variar, dependiendo del formato de salida y el modelo de datos de iTop. Desea garantizar que la lista de columnas exportadas permanenzcan estables durante la ejecución, entonces debe especificar un valor para el atributo "Campos" y utilice la página export-V2.php.', 'UI:Schema:Title' => 'Esquema de Objetos en iTop', diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index fdf78620d..c9578a1cc 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -689,7 +689,7 @@ Dict::Add('FR FR', 'French', 'Français', array( 'UI:RunQuery:DevelopedOQLCount' => 'OQL développé pour le compte', 'UI:RunQuery:ResultSQLCount' => 'SQL généré pour le compte', 'UI:RunQuery:ResultSQL' => 'SQL généré', - 'UI:RunQuery:Error' => 'Une erreur s\'est produite durant l\'exécution de la requête : %1$s', + 'UI:RunQuery:Error' => 'Une erreur s\'est produite durant l\'exécution de la requête', 'UI:Query:UrlForExcel' => 'Lien à copier-coller dans Excel, pour déclarer une source de données à partir du web', 'UI:Query:UrlV1' => 'La liste des champs à exporter n\'a pas été spécifiée. La page export-V2.php ne peut pas fonctionner sans cette information. Par conséquent, le lien fourni ci-dessous pointe sur l\'ancienne page: export.php. Cette ancienne version de l\'export présente la limitation suivante : la liste des champs exportés varie en fonction du format de l\'export et du modèle de données.
Si vous devez garantir la stabilité du format de l\'export (liste des colonnes) sur le long terme, alors vous devrez renseigner l\'attribut "Champs" et utiliser la page export-V2.php.', 'UI:Schema:Title' => 'Modèle de données iTop', diff --git a/dictionaries/hu.dictionary.itop.ui.php b/dictionaries/hu.dictionary.itop.ui.php index d37a18ba6..5c6d3d4d5 100755 --- a/dictionaries/hu.dictionary.itop.ui.php +++ b/dictionaries/hu.dictionary.itop.ui.php @@ -685,7 +685,7 @@ Dict::Add('HU HU', 'Hungarian', 'Magyar', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'A lekérdezés futtatása közben a következő hiba jelentkezett: %1$s', + 'UI:RunQuery:Error' => 'A lekérdezés futtatása közben a következő hiba jelentkezett', 'UI:Query:UrlForExcel' => 'URL to use for MS-Excel web queries~~', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested herebelow points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop. Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop objektum séma', diff --git a/dictionaries/it.dictionary.itop.ui.php b/dictionaries/it.dictionary.itop.ui.php index 2a8d07928..b0373fbe8 100644 --- a/dictionaries/it.dictionary.itop.ui.php +++ b/dictionaries/it.dictionary.itop.ui.php @@ -698,7 +698,7 @@ Dict::Add('IT IT', 'Italian', 'Italiano', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Si è verificato un errore durante l\'esecuzione della query: %1$s', + 'UI:RunQuery:Error' => 'Si è verificato un errore durante l\'esecuzione della query', 'UI:Query:UrlForExcel' => 'URL to use for MS-Excel web queries~~', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested herebelow points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop. Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop schema degli oggetti', diff --git a/dictionaries/ja.dictionary.itop.ui.php b/dictionaries/ja.dictionary.itop.ui.php index a12f10b13..1af7d0c06 100644 --- a/dictionaries/ja.dictionary.itop.ui.php +++ b/dictionaries/ja.dictionary.itop.ui.php @@ -685,7 +685,7 @@ Dict::Add('JA JP', 'Japanese', '日本語', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'クエリ: %1$s 実行時にエラーが発生しました', + 'UI:RunQuery:Error' => 'An error occured while running the query~~', 'UI:Query:UrlForExcel' => 'MS-Excel Webクエリに使用するURL', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested herebelow points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop. Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop オブジェクトスキーマ', diff --git a/dictionaries/nl.dictionary.itop.ui.php b/dictionaries/nl.dictionary.itop.ui.php index 2fbedd330..a557ea10f 100644 --- a/dictionaries/nl.dictionary.itop.ui.php +++ b/dictionaries/nl.dictionary.itop.ui.php @@ -704,7 +704,7 @@ Dict::Add('NL NL', 'Dutch', 'Nederlands', array( 'UI:RunQuery:DevelopedOQLCount' => 'Ontwikkelde OQL voor aantal', 'UI:RunQuery:ResultSQLCount' => 'Resulterende SQL voor aantal', 'UI:RunQuery:ResultSQL' => 'Resulterende SQL', - 'UI:RunQuery:Error' => 'Er trad een fout op tijdens het uitvoeren van deze query: %1$s', + 'UI:RunQuery:Error' => 'Er trad een fout op tijdens het uitvoeren van deze query', 'UI:Query:UrlForExcel' => 'URL om te gebruiken voor MS Excel-webquery\'s', 'UI:Query:UrlV1' => 'De lijst van velden is leeg gelaten. De pagina export-V2.php kan niet aangeroepen worden zonder deze informatie.Daarom verwijst de onderstaande link naar de oude export-pagina: export.php. Deze verouderde versie heeft enkele beperkingen: de lijst van geëxporteerde velden kan verschillen afhankelijk van het gekozen export-formaat en het datamodel van iTop. Als je wil dat de lijst van geëxporteerde kolommen hetzelfde blijft over lange tijd, dan moet je een waarde opgeven voor het attribuut "Velden" en de pagina export-V2.php gebruiken.', 'UI:Schema:Title' => ITOP_APPLICATION_SHORT.' objecten-schema', diff --git a/dictionaries/pt_br.dictionary.itop.ui.php b/dictionaries/pt_br.dictionary.itop.ui.php index f6e037d67..f984eedd8 100644 --- a/dictionaries/pt_br.dictionary.itop.ui.php +++ b/dictionaries/pt_br.dictionary.itop.ui.php @@ -698,7 +698,7 @@ Dict::Add('PT BR', 'Brazilian', 'Brazilian', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Ocorreu um erro ao executar a consulta: %1$s', + 'UI:RunQuery:Error' => 'Ocorreu um erro ao executar a consulta', 'UI:Query:UrlForExcel' => 'URL a ser usada para consultas web MS-Excel', 'UI:Query:UrlV1' => 'A lista de campos não foi especificada. A página export-V2.php não pode ser chamada sem essa informação. Portanto, o URL sugerido abaixo aponta para a página herdada: export.php. Essa versão herdada da exportação tem a seguinte limitação: a lista de campos exportados pode variar dependendo do formato de saída e do modelo de dados do iTop. Se você quiser garantir que a lista de colunas exportadas permaneça estável a longo prazo, então você deve especificar um valor para o atributo "Fields" e usar a página export-V2.php.', 'UI:Schema:Title' => 'Esquema de objetos', diff --git a/dictionaries/ru.dictionary.itop.ui.php b/dictionaries/ru.dictionary.itop.ui.php index be78b5c9e..706d30a20 100644 --- a/dictionaries/ru.dictionary.itop.ui.php +++ b/dictionaries/ru.dictionary.itop.ui.php @@ -677,7 +677,7 @@ Dict::Add('RU RU', 'Russian', 'Русский', array( 'UI:RunQuery:DevelopedOQLCount' => 'Подготовленный OQL для count: ', 'UI:RunQuery:ResultSQLCount' => 'Результирующий SQL для count: ', 'UI:RunQuery:ResultSQL' => 'Результирующий SQL: ', - 'UI:RunQuery:Error' => 'Ошибка при выполнении запроса: %1$s', + 'UI:RunQuery:Error' => 'Ошибка при выполнении запроса', 'UI:Query:UrlForExcel' => 'URL-адрес для использования в веб-запросах MS-Excel', 'UI:Query:UrlV1' => 'Список полей был оставлен неопределенным. Страница export-V2.php не может быть вызван без этой информации. Поэтому URL-адрес, предложенный здесь ниже, указывает на устаревшую страницу: export.php. Эта устаревшая версия экспорта имеет следующее ограничение: список экспортируемых полей может варьироваться в зависимости от формата вывода и модели данных iTop. если вы хотите гарантировать, что список экспортируемых столбцов будет оставаться стабильным в долгосрочной перспективе, то вы должны указать значение атрибута "Экспорт. поля" и использовать страницу export-V2.php.', 'UI:Schema:Title' => 'iTop схема объектов', diff --git a/dictionaries/sk.dictionary.itop.ui.php b/dictionaries/sk.dictionary.itop.ui.php index 46f030551..654a8d52b 100644 --- a/dictionaries/sk.dictionary.itop.ui.php +++ b/dictionaries/sk.dictionary.itop.ui.php @@ -685,7 +685,7 @@ Dict::Add('SK SK', 'Slovak', 'Slovenčina', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Vyskytla sa chyba počas dopytu: %1$s', + 'UI:RunQuery:Error' => 'Vyskytla sa chyba počas dopytu', 'UI:Query:UrlForExcel' => 'URL pre použitie MS-Excel webového dopytu', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested here below points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop.
Should you want to guarantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop objektová schéma', diff --git a/dictionaries/tr.dictionary.itop.ui.php b/dictionaries/tr.dictionary.itop.ui.php index 7eba5cf4f..a7db268ca 100644 --- a/dictionaries/tr.dictionary.itop.ui.php +++ b/dictionaries/tr.dictionary.itop.ui.php @@ -699,7 +699,7 @@ Dict::Add('TR TR', 'Turkish', 'Türkçe', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => 'Sorgu sırasında hata oluştu: %1$s', + 'UI:RunQuery:Error' => 'Sorgu sırasında hata oluştu', 'UI:Query:UrlForExcel' => 'URL to use for MS-Excel web queries~~', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested herebelow points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop. Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.~~', 'UI:Schema:Title' => 'iTop objects schema', diff --git a/dictionaries/zh_cn.dictionary.itop.ui.php b/dictionaries/zh_cn.dictionary.itop.ui.php index a7d31840b..c49a22b26 100644 --- a/dictionaries/zh_cn.dictionary.itop.ui.php +++ b/dictionaries/zh_cn.dictionary.itop.ui.php @@ -698,7 +698,7 @@ Dict::Add('ZH CN', 'Chinese', '简体中文', array( 'UI:RunQuery:DevelopedOQLCount' => 'Developed OQL for count~~', 'UI:RunQuery:ResultSQLCount' => 'Resulting SQL for count~~', 'UI:RunQuery:ResultSQL' => 'Resulting SQL~~', - 'UI:RunQuery:Error' => '运行该查询时发生了一个错误: %1$s', + 'UI:RunQuery:Error' => '运行该查询时发生了一个错误', 'UI:Query:UrlForExcel' => 'URL to use for MS-Excel web queries', 'UI:Query:UrlV1' => 'The list of fields has been left unspecified. The page export-V2.php cannot be invoked without this information. Therefore, the URL suggested here below points to the legacy page: export.php. This legacy version of the export has the following limitation: the list of exported fields may vary depending on the output format and the data model of iTop.
Should you want to garantee that the list of exported columns will remain stable on the long run, then you must specify a value for the attribute "Fields" and use the page export-V2.php.', 'UI:Schema:Title' => 'iTop 对象模型', diff --git a/pages/run_query.php b/pages/run_query.php index 10a1d5d6d..edb67ed34 100644 --- a/pages/run_query.php +++ b/pages/run_query.php @@ -292,37 +292,40 @@ EOF $oMoreInfoSection = new CollapsibleSection(Dict::S('UI:RunQuery:MoreInfo'), $aMoreInfoBlocks); $oP->AddUiBlock($oMoreInfoSection); - } - elseif ($sSyntaxError) - { - if ($e instanceof OqlException) - { + } elseif ($sSyntaxError) { + if ($e instanceof OqlException) { $sWrongWord = $e->GetWrongWord(); $aSuggestedWords = $e->GetSuggestions(); - if (is_array($aSuggestedWords) && count($aSuggestedWords) > 0) - { + if (is_array($aSuggestedWords) && count($aSuggestedWords) > 0) { $sSuggestedWord = OqlException::FindClosestString($sWrongWord, $aSuggestedWords); - if (strlen($sSuggestedWord) > 0) - { - $oP->p(''.Dict::Format('UI:RunQuery:Error', $e->GetIssue().' '.$sWrongWord).''); + if (strlen($sSuggestedWord) > 0) { + $sSyntaxErrorText = $e->GetIssue().'
'.$sWrongWord.''; $sBefore = substr($sExpression, 0, $e->GetColumn()); $sAfter = substr($sExpression, $e->GetColumn() + strlen($sWrongWord)); $sFixedExpression = $sBefore.$sSuggestedWord.$sAfter; $sFixedExpressionHtml = $sBefore.''.$sSuggestedWord.''.$sAfter; - $oP->p("Suggesting: $sFixedExpressionHtml"); - $oP->add(''); - } - else - { - $oP->p(''.Dict::Format('UI:RunQuery:Error', $e->getHtmlDesc()).''); + $sSyntaxErrorText .= $oP->GetP("Suggesting: $sFixedExpressionHtml"); + $sEscapedExpression = utils::HtmlEntities(addslashes($sFixedExpression)); + $sSyntaxErrorText .= $oP->GetP(<<Use this query +HTML + ); + } else { + $sSyntaxErrorText = $oP->GetP($e->getHtmlDesc()); } } else { - $oP->p(''.Dict::Format('UI:RunQuery:Error', $e->getHtmlDesc()).''); + $sSyntaxErrorText = $oP->GetP($e->getHtmlDesc()); } } else { - $oP->p(''.Dict::Format('UI:RunQuery:Error', $e->getMessage()).''); + $sSyntaxErrorText = $oP->GetP($e->getMessage()); } + + $oSyntaxErrorPanel = AlertFactory::MakeForFailure(Dict::S('UI:RunQuery:Error'), $sSyntaxErrorText); + $oSyntaxErrorPanel->SetOpenedByDefault(true); + $oP->AddUiBlock($oSyntaxErrorPanel); } } catch (Exception $e) {