From 59b2c5a63ac6568d47494b256e3531ebc38e44d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 15 Nov 2016 17:41:38 +0100 Subject: [PATCH] Fix markup and tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- libraries/DbSearch.php | 6 +++--- test/classes/DbSearchTest.php | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/libraries/DbSearch.php b/libraries/DbSearch.php index 23f227f6e1de..38f64885ed3c 100644 --- a/libraries/DbSearch.php +++ b/libraries/DbSearch.php @@ -348,9 +348,9 @@ private function _getResultsRow($each_table, $newsearchsqls, $odd_row, $res_cnt) $delete_result_path = $browse_result_path; $html_output .= '' . __('Delete') . ''; + . ' data-delete-sql="' . htmlspecialchars($newsearchsqls['delete']) . '"' + . ' data-table-name="' . htmlspecialchars($each_table) . '" >' + . __('Delete') . ''; } else { $html_output .= ' ' . ' '; diff --git a/test/classes/DbSearchTest.php b/test/classes/DbSearchTest.php index 9bb60381090a..5492d0329515 100644 --- a/test/classes/DbSearchTest.php +++ b/test/classes/DbSearchTest.php @@ -172,13 +172,14 @@ public function providerForTestGetResultsRow() . '=table1&goto=db_sql.php&pos=0&is_js_confirmed=0&' . 'server=0&lang=en&' . 'collation_connection=utf-8&token=token" ' - . 'browse_sql="column1" table_name="table1" ' + . 'data-browse-sql="column1" data-table-name="table1" ' . '>Browse' . 'Delete' ) );