From a826c6ab358e64524c4a1c1ce180404fb937993a Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 12 Feb 2022 20:46:22 +0100 Subject: Fix pagination of concert table. There's potential vulnerabilities here still, and I'm unsure if get_permalink() is entirely safe to use in this context. Seems to do the right thing, but the docs for the function indicates it has some edge cases. --- includes/admin/views/_concerts_table.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'includes') diff --git a/includes/admin/views/_concerts_table.php b/includes/admin/views/_concerts_table.php index 4a9c658..b34fef1 100644 --- a/includes/admin/views/_concerts_table.php +++ b/includes/admin/views/_concerts_table.php @@ -153,27 +153,28 @@ if (!class_exists("GiglogAdmin_ConcertsTable")) $content.=''; if($page_no > 1) { - $content.= "First Page - "; + $content.= 'First Page - '; } if($page_no <= 1) { $content .=" "; } else { - $content.= " Previous "; + $content.= ' Previous'; } $content.=''; $content.='
Page '.$page_no.' of '.$total_no_of_pages.'
'; $content.=''; - if($page_no >= $total_no_of_pages) { + if ($page_no >= $total_no_of_pages) { $content .= ""; } - if($page_no < $total_no_of_pages) { - $content .= 'Next - '; - $content .= "Last Page"; + if ($page_no < $total_no_of_pages) { + global $wp; + $content .= 'Next - '; + $content .= 'Last Page'; } $content.=''; -- cgit v1.2.3