@@ -1019,25 +1019,21 @@ private function getQueryResponseForNoResultsReturned(
10191019
10201020 $ profilingChart = $ this ->getProfilingChart ($ profilingResults );
10211021
1022- $ bookmark = '' ;
1022+ $ bookmark = [] ;
10231023 $ bookmarkFeature = $ this ->relation ->getRelationParameters ()->bookmarkFeature ;
10241024 if (
10251025 $ bookmarkFeature !== null
10261026 && (int ) $ request ->getQueryParam ('id_bookmark ' ) <= 0
10271027 && $ sqlQuery
10281028 ) {
1029- $ bookmark = $ this -> template -> render ( ' sql/bookmark ' , [
1029+ $ bookmark = [
10301030 'db ' => $ db ,
1031- 'goto ' => Url::getFromRoute ('/sql ' , [
1032- 'db ' => $ db ,
1033- 'table ' => $ table ,
1034- 'sql_query ' => $ sqlQuery ,
1035- 'id_bookmark ' => 1 ,
1036- ]),
1031+ 'table ' => $ table ,
10371032 'user ' => $ this ->config ->selectedServer ['user ' ],
1038- 'sql_query ' => $ completeQuery ,
1039- 'allow_shared_bookmarks ' => $ this ->config ->config ->AllowSharedBookmarks ,
1040- ]);
1033+ 'sql_query ' => $ sqlQuery ,
1034+ 'complete_sql_query ' => $ completeQuery ,
1035+ 'is_shared_bookmarks_allowed ' => $ this ->config ->config ->AllowSharedBookmarks ,
1036+ ];
10411037 }
10421038
10431039 return $ this ->template ->render ('sql/no_results_returned ' , [
@@ -1404,25 +1400,22 @@ private function getQueryResponseForResultsReturned(
14041400 $ statementInfo ,
14051401 );
14061402
1407- $ bookmarkSupportHtml = '' ;
1403+ $ bookmark = [] ;
14081404 $ bookmarkFeature = $ this ->relation ->getRelationParameters ()->bookmarkFeature ;
14091405 if (
14101406 $ bookmarkFeature !== null
14111407 && $ displayParts ->hasBookmarkForm
14121408 && (int ) $ request ->getQueryParam ('id_bookmark ' ) <= 0
14131409 && $ sqlQuery
14141410 ) {
1415- $ bookmarkSupportHtml = $ this -> template -> render ( ' sql/bookmark ' , [
1411+ $ bookmark = [
14161412 'db ' => $ db ,
1417- 'goto ' => Url::getFromRoute ('/sql ' , [
1418- 'db ' => $ db ,
1419- 'table ' => $ table ,
1420- 'sql_query ' => $ sqlQuery ,
1421- 'id_bookmark ' => 1 ,
1422- ]),
1413+ 'table ' => $ table ,
14231414 'user ' => $ this ->config ->selectedServer ['user ' ],
1424- 'sql_query ' => $ completeQuery ,
1425- ]);
1415+ 'sql_query ' => $ sqlQuery ,
1416+ 'complete_sql_query ' => $ completeQuery ,
1417+ 'is_shared_bookmarks_allowed ' => $ this ->config ->config ->AllowSharedBookmarks ,
1418+ ];
14261419 }
14271420
14281421 return $ this ->template ->render ('sql/sql_query_results ' , [
@@ -1431,7 +1424,7 @@ private function getQueryResponseForResultsReturned(
14311424 'missing_unique_column_message ' => $ missingUniqueColumnMessage ,
14321425 'bookmark_created_message ' => $ bookmarkCreatedMessage ,
14331426 'table ' => $ tableHtml ,
1434- 'bookmark_support ' => $ bookmarkSupportHtml ,
1427+ 'bookmark ' => $ bookmark ,
14351428 ]);
14361429 }
14371430
0 commit comments