From eef35043dd2524b0f8ea2a2e840a24784fd75fd8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 26 Sep 2010 08:39:28 -0400 Subject: [PATCH] bug #3072502 Text not shown for icons after creating table --- db_structure.php | 42 +--------------------- libraries/build_action_titles.inc.php | 51 +++++++++++++++++++++++++++ tbl_create.php | 21 +++++------ 3 files changed, 61 insertions(+), 53 deletions(-) create mode 100644 libraries/build_action_titles.inc.php diff --git a/db_structure.php b/db_structure.php index f16654778..5ebabd9bc 100644 --- a/db_structure.php +++ b/db_structure.php @@ -70,47 +70,7 @@ $db_collation = PMA_getDbCollation($db); // in a separate file to avoid redeclaration of functions in some code paths require_once './libraries/db_structure.lib.php'; - -$titles = array(); -if (true == $cfg['PropertiesIconic']) { - $titles['Browse'] = '' . __('Browse') . ''; - $titles['NoBrowse'] = '' . __('Browse') . ''; - $titles['Search'] = '' . __('Search') . ''; - $titles['NoSearch'] = '' . __('Search') . ''; - $titles['Insert'] = '' . __('Insert') . ''; - $titles['NoInsert'] = '' . __('Insert') . ''; - $titles['Structure'] = '' . __('Structure') . ''; - $titles['Drop'] = '' . __('Drop') . ''; - $titles['NoDrop'] = '' . __('Drop') . ''; - $titles['Empty'] = '' . __('Empty') . ''; - $titles['NoEmpty'] = '' . __('Empty') . ''; - - if ('both' === $cfg['PropertiesIconic']) { - $titles['Browse'] .= __('Browse'); - $titles['Search'] .= __('Search'); - $titles['NoBrowse'] .= __('Browse'); - $titles['NoSearch'] .= __('Search'); - $titles['Insert'] .= __('Insert'); - $titles['NoInsert'] .= __('Insert'); - $titles['Structure'] .= __('Structure'); - $titles['Drop'] .= __('Drop'); - $titles['NoDrop'] .= __('Drop'); - $titles['Empty'] .= __('Empty'); - $titles['NoEmpty'] .= __('Empty'); - } -} else { - $titles['Browse'] = __('Browse'); - $titles['Search'] = __('Search'); - $titles['NoBrowse'] = __('Browse'); - $titles['NoSearch'] = __('Search'); - $titles['Insert'] = __('Insert'); - $titles['NoInsert'] = __('Insert'); - $titles['Structure'] = __('Structure'); - $titles['Drop'] = __('Drop'); - $titles['NoDrop'] = __('Drop'); - $titles['Empty'] = __('Empty'); - $titles['NoEmpty'] = __('Empty'); -} +require_once './libraries/build_action_titles.inc.php'; /** * Displays the tables list diff --git a/libraries/build_action_titles.inc.php b/libraries/build_action_titles.inc.php new file mode 100644 index 000000000..e9da5f65f --- /dev/null +++ b/libraries/build_action_titles.inc.php @@ -0,0 +1,51 @@ +'; + $titles['NoBrowse'] = '' . __('Browse') . ''; + $titles['Search'] = '' . __('Search') . ''; + $titles['NoSearch'] = '' . __('Search') . ''; + $titles['Insert'] = '' . __('Insert') . ''; + $titles['NoInsert'] = '' . __('Insert') . ''; + $titles['Structure'] = '' . __('Structure') . ''; + $titles['Drop'] = '' . __('Drop') . ''; + $titles['NoDrop'] = '' . __('Drop') . ''; + $titles['Empty'] = '' . __('Empty') . ''; + $titles['NoEmpty'] = '' . __('Empty') . ''; + + if ('both' === $cfg['PropertiesIconic']) { + $titles['Browse'] .= __('Browse'); + $titles['Search'] .= __('Search'); + $titles['NoBrowse'] .= __('Browse'); + $titles['NoSearch'] .= __('Search'); + $titles['Insert'] .= __('Insert'); + $titles['NoInsert'] .= __('Insert'); + $titles['Structure'] .= __('Structure'); + $titles['Drop'] .= __('Drop'); + $titles['NoDrop'] .= __('Drop'); + $titles['Empty'] .= __('Empty'); + $titles['NoEmpty'] .= __('Empty'); + } +} else { + $titles['Browse'] = __('Browse'); + $titles['Search'] = __('Search'); + $titles['NoBrowse'] = __('Browse'); + $titles['NoSearch'] = __('Search'); + $titles['Insert'] = __('Insert'); + $titles['NoInsert'] = __('Insert'); + $titles['Structure'] = __('Structure'); + $titles['Drop'] = __('Drop'); + $titles['NoDrop'] = __('Drop'); + $titles['Empty'] = __('Empty'); + $titles['NoEmpty'] = __('Empty'); +} +?> diff --git a/tbl_create.php b/tbl_create.php index 0d15822ac..807755018 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -38,6 +38,7 @@ require_once './libraries/common.inc.php'; $action = 'tbl_create.php'; require_once './libraries/header.inc.php'; +require_once './libraries/build_action_titles.inc.php'; // Check parameters PMA_checkParameters(array('db')); @@ -299,25 +300,21 @@ if (isset($_REQUEST['do_save_data'])) { } $new_table_string .= '' . "\n"; - $new_table_string .= ' ' . __('Browse') . ' ' . "\n"; + $new_table_string .= '' . $titles['NoBrowse'] . '' . "\n"; - $new_table_string .= ' '; - $new_table_string .= '' . __('Structure') . ''; - $new_table_string .= ' ' . "\n"; + $new_table_string .= '' . $titles['Structure'] . '' . "\n"; - $new_table_string .= ' ' . __('Search') . ' ' . "\n"; + $new_table_string .= '' . $titles['NoSearch'] . '' . "\n"; - $new_table_string .= ' '; - $new_table_string .= '' . __('Insert') . ''; - $new_table_string .= ' ' . "\n"; + $new_table_string .= '' . $titles['Insert'] . '' . "\n"; - $new_table_string .= ' ' . __('Empty') . ' ' . "\n"; + $new_table_string .= '' . $titles['NoEmpty'] . '' . "\n"; - $new_table_string .= ' '; - $new_table_string .= '' . __('Drop') . ''; - $new_table_string .= ' ' . "\n"; + $new_table_string .= $titles['Drop']; + $new_table_string .= '' . "\n"; $new_table_string .= '' . $tbl_stats['Rows'] . '' . "\n";