From b17ff5be2c0efe678d37ae2ec78d8b11fae00875 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 29 Oct 2014 12:43:07 -0400 Subject: [PATCH] Refactor code duplication Signed-off-by: Marc Delisle --- libraries/db_designer.lib.php | 46 +++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/libraries/db_designer.lib.php b/libraries/db_designer.lib.php index 21355a234b..9bb053dcaa 100644 --- a/libraries/db_designer.lib.php +++ b/libraries/db_designer.lib.php @@ -11,6 +11,29 @@ if (! defined('PHPMYADMIN')) { require_once 'libraries/relation.lib.php'; +/** + * Function to get html to display a page selector + * + * @param array $cfgRelation information about the configuration storage + * @param string $db database name + * + * @return string html content + */ +function PMA_getHtmlForPageSelector($cfgRelation, $db) +{ + $html = ''; + return $html; +} + /** * Function to get html for displaying the page edit/delete form * @@ -34,16 +57,7 @@ function PMA_getHtmlForEditOrDeletePages($db, $operation) $html .= __("Page to delete"); } $html .= ': '; - $html .= ''; + $html .= PMA_getHtmlForPageSelector($cfgRelation, $db); $html .= ''; $html .= ''; return $html; @@ -73,17 +87,7 @@ function PMA_getHtmlForPageSaveAs($db) $html .= ''; $html .= ''; $html .= ''; - $html .= ''; + $html .= PMA_getHtmlForPageSelector($cfgRelation, $db); $html .= ''; $html .= '';