The branch, master has been updated via eef35043dd2524b0f8ea2a2e840a24784fd75fd8 (commit) from ddc99a3deeab80db72cf52f88ddbe685b68e52d1 (commit)
- Log ----------------------------------------------------------------- commit eef35043dd2524b0f8ea2a2e840a24784fd75fd8 Author: Marc Delisle marc@infomarc.info Date: Sun Sep 26 08:39:28 2010 -0400
bug #3072502 Text not shown for icons after creating table
-----------------------------------------------------------------------
Summary of changes: 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 f166547..5ebabd9 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'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />'; - $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />'; - $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />'; - $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />'; - $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />'; - $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />'; - $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />'; - $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />'; - $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />'; - $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />'; - $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('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 0000000..e9da5f6 --- /dev/null +++ b/libraries/build_action_titles.inc.php @@ -0,0 +1,51 @@ +<?php +/* vim: set expandtab sw=4 ts=4 sts=4: */ +/** + * + * @package phpMyAdmin + */ +if (! defined('PHPMYADMIN')) { + exit; +} + +$titles = array(); +if (true == $cfg['PropertiesIconic']) { + $titles['Browse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />'; + $titles['NoBrowse'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" />'; + $titles['Search'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />'; + $titles['NoSearch'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" />'; + $titles['Insert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />'; + $titles['NoInsert'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />'; + $titles['Structure'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />'; + $titles['Drop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />'; + $titles['NoDrop'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />'; + $titles['Empty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" />'; + $titles['NoEmpty'] = '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('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 0d15822..8077550 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 .= '</th>' . "\n";
- $new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_browse.png" alt="' . __('Browse') . '" title="' . __('Browse') . '" /> </td>' . "\n"; + $new_table_string .= '<td>' . $titles['NoBrowse'] . '</td>' . "\n";
- $new_table_string .= '<td> <a href="tbl_structure.php' . PMA_generate_common_url($tbl_url_params) . '"> '; - $new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_props.png" alt="' . __('Structure') . '" title="' . __('Structure') . '" />'; - $new_table_string .= '</a> </td>' . "\n"; + $new_table_string .= '<td><a href="tbl_structure.php' . PMA_generate_common_url($tbl_url_params) . '">' . $titles['Structure'] . '</a></td>' . "\n";
- $new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_select.png" alt="' . __('Search') . '" title="' . __('Search') . '" /> </td>' . "\n"; + $new_table_string .= '<td>' . $titles['NoSearch'] . '</td>' . "\n";
- $new_table_string .= '<td> <a href="tbl_change.php' . PMA_generate_common_url($tbl_url_params) . '"> '; - $new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_insrow.png" alt="' . __('Insert') . '" title="' . __('Insert') . '" />'; - $new_table_string .= '</a> </td>' . "\n"; + $new_table_string .= '<td><a href="tbl_change.php' . PMA_generate_common_url($tbl_url_params) . '">' . $titles['Insert'] . '</a></td>' . "\n";
- $new_table_string .= '<td> <img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'bd_empty.png" alt="' . __('Empty') . '" title="' . __('Empty') . '" /> </td>' . "\n"; + $new_table_string .= '<td>' . $titles['NoEmpty'] . '</td>' . "\n";
- $new_table_string .= '<td> <a class="drop_table_anchor" href="sql.php' . PMA_generate_common_url($tbl_url_params) . '&sql_query='; + $new_table_string .= '<td><a class="drop_table_anchor" href="sql.php' . PMA_generate_common_url($tbl_url_params) . '&sql_query='; $new_table_string .= urlencode('DROP TABLE ' . PMA_backquote($table)); $new_table_string .= '">'; - $new_table_string .= '<img class="icon" width="16" height="16" src="' .$pmaThemeImage . 'b_drop.png" alt="' . __('Drop') . '" title="' . __('Drop') . '" />'; - $new_table_string .= '</a> </td>' . "\n"; + $new_table_string .= $titles['Drop']; + $new_table_string .= '</a></td>' . "\n";
$new_table_string .= '<td class="value">' . $tbl_stats['Rows'] . '</td>' . "\n";
hooks/post-receive