From 3dc06f4f704ce8ef49ddecf9a500796a7a41db47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 24 Oct 2011 14:13:47 +0200 Subject: [PATCH] Unify print button code and factor it out to function --- db_datadict.php | 17 +---------------- db_printview.php | 19 +------------------ libraries/common.lib.php | 12 ++++++++++++ tbl_printview.php | 6 +----- 4 files changed, 15 insertions(+), 39 deletions(-) diff --git a/db_datadict.php b/db_datadict.php index c9b5560642..e99ccf5582 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -269,22 +269,7 @@ foreach ($tables as $table) { /** * Displays the footer */ -?> - -
'; +PMA_printButton(); require './libraries/footer.inc.php'; ?> diff --git a/db_printview.php b/db_printview.php index 2ede085bdb..a03b8b1f97 100644 --- a/db_printview.php +++ b/db_printview.php @@ -244,24 +244,7 @@ if ($num_tables == 0) { /** * Displays the footer */ -?> +PMA_printButton(); - -

- - - - diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 6054412aa6..8c3f285241 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -3780,4 +3780,16 @@ function PMA_analyzeLimitClause($limit_clause) 'length' => trim($start_and_length[1]) ); } + +/** + * Outputs HTML code for print button. + * + * @return nothing + */ +function PMA_printButton() +{ + echo ''; +} ?> diff --git a/tbl_printview.php b/tbl_printview.php index c27b17303f..d289d6bef2 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -443,11 +443,7 @@ foreach ($the_tables as $key => $table) { /** * Displays the footer */ -?> +PMA_printButton(); - - -