Bug #3960 NavigationBarIconic config not honored

This commit is contained in:
Marc Delisle 2013-06-21 10:00:41 -04:00
parent d6f49a65f6
commit d4d5a03766
33 changed files with 253 additions and 118 deletions

View File

@ -6,13 +6,13 @@ phpMyAdmin - ChangeLog
- bug #3970 Pressing enter in the filter field reloads page
- bug #3984 Cannot insert in this table (PHP < 5.4)
- bug #3989 Reloading privileges does not update the interface
- bug #3960 NavigationBarIconic config not honored
4.0.4.0 (2013-06-17)
- bug #3959 Using DefaultTabDatabase in NavigationTree for Database Click
- bug #3961 Avoid Suhosin warning when in simulation mode
- bug #3897 Row Statistics and Space usage bugs
- bug #3966 Only display "table has no unique column" message when applicable
- bug #3960 NavigationBarIconic config not honored
- bug #3965 Default language wrong with zh-TW
- bug #3921 Call to undefined function PMA_isSuperuser() if default server is
not set

View File

@ -91,14 +91,20 @@ if (PMA_DBI_num_rows($all_tables_result) > 0) {
// Print out information about versions
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$drop_image_or_text .= PMA_Util::getImage(
'b_drop.png',
__('Delete tracking data for this table')
);
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic']
|| false === $GLOBALS['cfg']['PropertiesIconic']
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
) {
$drop_image_or_text .= __('Drop');
}

View File

@ -1481,14 +1481,13 @@ Database structure
Browse mode
-----------
.. config:option:: $cfg['NavigationBarIconic']
.. config:option:: $cfg['TableNavigationLinksMode']
:type: string
:default: true
:default: ``'icons'``
Defines whether navigation bar buttons contain text or symbols only. A
value of true displays icons, false displays text and 'both' displays
both icons and text.
Defines whether the table navigation links contain ``'icons'``, ``'text'``
or ``'both'``.
.. config:option:: $cfg['ShowAll']
@ -1672,15 +1671,22 @@ Export and import settings
Tabs display settings
---------------------
.. config:option:: $cfg['PropertiesIconic']
.. config:option:: $cfg['TabsMode']
:type: string
:default: ``'both'``
If set to ``true``, will display icons instead of text for db and table
Defines whether the menu tabs contain ``'icons'``, ``'text'`` or ``'both'``.
.. config:option:: $cfg['ActionLinksMode']
:type: string
:default: ``'both'``
If set to ``icons``, will display icons instead of text for db and table
properties links (like :guilabel:`Browse`, :guilabel:`Select`,
:guilabel:`Insert`, ...) and for the menu tabs. Can be set to ``'both'``
if you want icons AND text. When set to ``false``, will only show text.
:guilabel:`Insert`, ...). Can be set to ``'both'``
if you want icons AND text. When set to ``text``, will only show text.
.. config:option:: $cfg['PropertiesNumColumns']

View File

@ -535,14 +535,18 @@ class PMA_DisplayResults
) {
$caption_output = '';
// for true or 'both'
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
$caption_output .= $caption;
}
// for false or 'both'
if (($GLOBALS['cfg']['NavigationBarIconic'] === false)
|| ($GLOBALS['cfg']['NavigationBarIconic'] === self::POSITION_BOTH)
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('text', 'both')
)
) {
$caption_output .= '&nbsp;' . $title;
}
@ -2553,7 +2557,7 @@ class PMA_DisplayResults
// We need to copy the value
// or else the == 'both' check will always return true
if ($GLOBALS['cfg']['PropertiesIconic'] === self::POSITION_BOTH) {
if ($GLOBALS['cfg']['ActionLinksMode'] === self::POSITION_BOTH) {
$iconic_spacer = '<div class="nowrap">';
} else {
$iconic_spacer = '';

View File

@ -131,7 +131,11 @@ class PMA_Footer
$retval .= '<div id="selflink" class="print_ignore">';
$retval .= '<a href="' . $url . '"'
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TabsMode'],
array('icons', 'both')
)
) {
$retval .= PMA_Util::getImage(
'window-new.png',
__('Open new phpMyAdmin window')

View File

@ -129,13 +129,22 @@ class PMA_Menu
$separator = "<span class='separator item'>&nbsp;»</span>";
$item = '<a href="%1$s?%2$s" class="item">';
if ($GLOBALS['cfg']['NavigationBarIconic'] !== true) {
if (in_array(
$GLOBALS['cfg']['TabsMode'],
array('text', 'both')
)
) {
$item .= '%4$s: ';
}
$item .= '%3$s</a>';
$retval .= "<div id='floating_menubar'></div>";
$retval .= "<div id='serverinfo'>";
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TabsMode'],
array('icons', 'both')
)
) {
$retval .= PMA_Util::getImage(
's_host.png',
'',
@ -152,7 +161,11 @@ class PMA_Menu
if (strlen($this->_db)) {
$retval .= $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TabsMode'],
array('icons', 'both')
)
) {
$retval .= PMA_Util::getImage(
's_db.png',
'',
@ -174,7 +187,11 @@ class PMA_Menu
include './libraries/tbl_info.inc.php';
$retval .= $separator;
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TabsMode'],
array('icons', 'both')
)
) {
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
$retval .= PMA_Util::getImage(
$icon,

View File

@ -89,26 +89,37 @@ class PMA_Util
/**
* Returns an HTML IMG tag for a particular icon from a theme,
* which may be an actual file or an icon from a sprite.
* This function takes into account the PropertiesIconic
* This function takes into account the ActionLinksMode
* configuration setting and wraps the image tag in a span tag.
*
* @param string $icon name of icon file
* @param string $alternate alternate text
* @param boolean $force_text whether to force alternate text to be displayed
* @param boolean $menu_icon whether this icon is for the menu bar or not
* @param string $icon name of icon file
* @param string $alternate alternate text
* @param boolean $force_text whether to force alternate text to be displayed
* @param boolean $menu_icon whether this icon is for the menu bar or not
* @param string $control_param which directive controls the display
*
* @return string an html snippet
*/
public static function getIcon($icon, $alternate = '', $force_text = false,
$menu_icon = false
public static function getIcon(
$icon, $alternate = '', $force_text = false,
$menu_icon = false, $control_param = 'ActionLinksMode'
) {
// $cfg['PropertiesIconic'] is true or both
$include_icon = ($GLOBALS['cfg']['PropertiesIconic'] !== false);
// $cfg['PropertiesIconic'] is false or both
// OR we have no $include_icon
$include_text = ($force_text
|| ($GLOBALS['cfg']['PropertiesIconic'] !== true));
$include_icon = $include_text = false;
if (in_array(
$GLOBALS['cfg'][$control_param],
array('icons', 'both')
)
) {
$include_icon = true;
}
if ($force_text
|| in_array(
$GLOBALS['cfg'][$control_param],
array('text', 'both')
)
) {
$include_text = true;
}
// Sometimes use a span (we rely on this in js/sql.js). But for menu bar
// we don't need a span
$button = $menu_icon ? '' : '<span class="nowrap">';
@ -1800,7 +1811,13 @@ class PMA_Util
// avoid generating an alt tag, because it only illustrates
// the text that follows and if browser does not display
// images, the text is duplicated
$tab['text'] = self::getIcon($tab['icon'], $tab['text'], false, true);
$tab['text'] = self::getIcon(
$tab['icon'],
$tab['text'],
false,
true,
'TabsMode'
);
} elseif (empty($tab['text'])) {
// check to not display an empty link-text
@ -1914,7 +1931,7 @@ class PMA_Util
$displayed_message = '';
// Add text if not already added
if (stristr($message, '<img')
&& (! $strip_img || ($GLOBALS['cfg']['PropertiesIconic'] === true))
&& (! $strip_img || ($GLOBALS['cfg']['ActionLinksMode'] == 'icons'))
&& (strip_tags($message) == $message)
) {
$displayed_message = '<span>'
@ -2344,7 +2361,7 @@ class PMA_Util
$value = $text;
}
if ($GLOBALS['cfg']['PropertiesIconic'] === false) {
if ($GLOBALS['cfg']['ActionLinksMode'] == 'text') {
return ' <input type="submit" name="' . $button_name . '"'
.' value="' . htmlspecialchars($value) . '"'
.' title="' . htmlspecialchars($text) . '" />' . "\n";
@ -2358,7 +2375,7 @@ class PMA_Util
. '" value="' . htmlspecialchars($value)
. '" title="' . htmlspecialchars($text)
. '" src="' . $GLOBALS['pmaThemeImage']. $image . '" />'
. ($GLOBALS['cfg']['PropertiesIconic'] === 'both'
. ($GLOBALS['cfg']['ActionLinksMode'] == 'both'
? '&nbsp;' . htmlspecialchars($text)
: '') . "\n";
} else {
@ -2545,8 +2562,11 @@ class PMA_Util
// Move to the beginning or to the previous page
if ($pos > 0) {
// patch #474210 - part 1
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
$caption1 = '&lt;&lt;';
$caption2 = ' &lt; ';
$title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
@ -2583,7 +2603,11 @@ class PMA_Util
$list_navigator_html .= '</form>';
if ($pos + $max_count < $count) {
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
$caption3 = ' &gt; ';
$caption4 = '&gt;&gt;';
$title3 = ' title="' . _pgettext('Next page', 'Next') . '"';

View File

@ -974,12 +974,12 @@ $cfg['HideStructureActions'] = true;
*/
/**
* Use icons instead of text for the navigation bar buttons
* and on right panel top menu (server db table) (true|false|'both')
* Use icons instead of text for the navigation bar buttons (table browse)
* ('text'|'icons'|'both')
*
* @global string $cfg['NavigationBarIconic']
* @global string $cfg['TableNavigationLinksMode']
*/
$cfg['NavigationBarIconic'] = true;
$cfg['TableNavigationLinksMode'] = 'icons';
/**
* Defines whether a user should be displayed a "show all (records)"
@ -1149,11 +1149,18 @@ $cfg['CompressOnFly'] = true;
*/
/**
* Use icons instead of text for the table display of a database (true|false|'both')
* How to display the menu tabs ('icons'|'text'|'both')
*
* @global boolean $cfg['PropertiesIconic']
* @global boolean $cfg['TabsMode']
*/
$cfg['PropertiesIconic'] = 'both';
$cfg['TabsMode'] = 'both';
/**
* How to display various action links ('icons'|'text'|'both')
*
* @global boolean $cfg['ActionLinksMode']
*/
$cfg['ActionLinksMode'] = 'both';
/**
* How many columns should be used for table display of a database?

View File

@ -45,10 +45,10 @@ $cfg_db['NavigationTreeDefaultTabTable'] = array(
);
$cfg_db['NavigationTreeDbSeparator'] = 'short_string';
$cfg_db['NavigationTreeTableSeparator'] = 'short_string';
$cfg_db['NavigationBarIconic'] = array(
true => __('Yes'),
false => __('No'),
'both' => __('Both')
$cfg_db['TableNavigationLinksMode'] = array(
'icons' => __('Icons'),
'text' => __('Text'),
'both' => __('Both')
);
$cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
$cfg_db['RowActionLinks'] = array(
@ -60,10 +60,15 @@ $cfg_db['RowActionLinks'] = array(
$cfg_db['ProtectBinary'] = array(false, 'blob', 'noblob', 'all');
$cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped');
$cfg_db['CharEditing'] = array('input', 'textarea');
$cfg_db['PropertiesIconic'] = array(
true => __('Yes'),
false => __('No'),
'both' => __('Both')
$cfg_db['TabsMode'] = array(
'icons' => __('Icons'),
'text' => __('Text'),
'both' => __('Both')
);
$cfg_db['ActionLinksMode'] = array(
'icons' => __('Icons'),
'text' => __('Text'),
'both' => __('Both')
);
$cfg_db['GridEditing'] = array(
'click' => __('Click'),

View File

@ -571,14 +571,6 @@ class FormDisplay
}
break;
case 'select':
// special treatment for NavigationBarIconic and PropertiesIconic
if ($key === 'NavigationBarIconic'
|| $key === 'PropertiesIconic'
) {
if ($_POST[$key] !== 'both') {
settype($_POST[$key], 'boolean');
}
}
$successfully_validated = $this->_validateSelect(
$_POST[$key],
$form->getOptionValueList($system_path)

View File

@ -321,8 +321,8 @@ $strConfigRowActionLinks_desc = __('These are Edit, Copy and Delete links');
$strConfigRowActionLinks_name = __('Where to show the table row links');
$strConfigNaturalOrder_desc = __('Use natural order for sorting table and database names');
$strConfigNaturalOrder_name = __('Natural order');
$strConfigNavigationBarIconic_desc = __('Use only icons, only text or both');
$strConfigNavigationBarIconic_name = __('Iconic navigation bar');
$strConfigTableNavigationLinksMode_desc = __('Use only icons, only text or both');
$strConfigTableNavigationLinksMode_name = __('Table navigation bar');
$strConfigOBGzip_desc = __('use GZip output buffering for increased speed in HTTP transfers');
$strConfigOBGzip_name = __('GZip output buffering');
$strConfigOrder_desc = __('[kbd]SMART[/kbd] - i.e. descending order for columns of type TIME, DATE, DATETIME and TIMESTAMP, ascending order otherwise');
@ -335,8 +335,10 @@ $strConfigServerLibraryDifference_DisableWarning_desc = __('Disable the default
$strConfigServerLibraryDifference_DisableWarning_name = __('Server/library difference warning');
$strConfigReservedWordDisableWarning_desc = __('Disable the default warning that is displayed on the Structure page if column names in a table are reserved MySQL words');
$strConfigReservedWordDisableWarning_name = __('MySQL reserved word warning');
$strConfigPropertiesIconic_desc = __('Use only icons, only text or both');
$strConfigPropertiesIconic_name = __('Iconic table operations');
$strConfigTabsMode_desc = __('Use only icons, only text or both');
$strConfigTabsMode_name = __('How to display the menu tabs');
$strConfigActionLinksMode_desc = __('Use only icons, only text or both');
$strConfigActionLinksMode_name = __('How to display various action links');
$strConfigProtectBinary_desc = __('Disallow BLOB and BINARY columns from editing');
$strConfigProtectBinary_name = __('Protect binary columns');
$strConfigQueryHistoryDB_desc = __('Enable if you want DB-based query history (requires phpMyAdmin configuration storage). If disabled, this utilizes JS-routines to display query history (lost by window close).');

View File

@ -191,7 +191,7 @@ $forms['Main_panel']['DbStructure'] = array(
$forms['Main_panel']['TableStructure'] = array(
'HideStructureActions');
$forms['Main_panel']['Browse'] = array(
'NavigationBarIconic',
'TableNavigationLinksMode',
'ShowAll',
'MaxRows',
'Order',
@ -221,7 +221,8 @@ $forms['Main_panel']['Edit'] = array(
'ForeignKeyDropdownOrder',
'ForeignKeyMaxLimit');
$forms['Main_panel']['Tabs'] = array(
'PropertiesIconic',
'TabsMode',
'ActionLinksMode',
'DefaultTabServer',
'DefaultTabDatabase',
'DefaultTabTable',

View File

@ -105,8 +105,8 @@ $forms['Main_panel']['DbStructure'] = array(
$forms['Main_panel']['TableStructure'] = array(
'HideStructureActions');
$forms['Main_panel']['Browse'] = array(
'NavigationBarIconic',
'PropertiesIconic',
'TableNavigationLinksMode',
'ActionLinksMode',
'ShowAll',
'MaxRows',
'Order',
@ -129,6 +129,7 @@ $forms['Main_panel']['Edit'] = array(
'ForeignKeyDropdownOrder',
'ForeignKeyMaxLimit');
$forms['Main_panel']['Tabs'] = array(
'TabsMode',
'DefaultTabServer',
'DefaultTabDatabase',
'DefaultTabTable');

View File

@ -40,7 +40,11 @@ $is_create_table_priv = true;
<fieldset>
<legend>
<?php
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
echo PMA_Util::getImage('b_newtbl.png');
}
echo __('Create table');

View File

@ -166,9 +166,9 @@ class PMA_NavigationHeader
*/
private function _links()
{
$iconicNav = $GLOBALS['cfg']['NavigationBarIconic'];
$showIcon = $iconicNav === true || $iconicNav === 'both';
$showText = $iconicNav === false || $iconicNav === 'both';
// always iconic
$showIcon = true;
$showText = false;
$retval = '<!-- LINKS START -->';
$retval .= '<div id="leftframelinks">';

View File

@ -576,7 +576,11 @@ class PMA_NavigationTree
$groups[$key]->separator = $node->separator;
$groups[$key]->separator_depth = $node->separator_depth - 1;
$groups[$key]->icon = '';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
$groups[$key]->icon = PMA_Util::getImage(
'b_group.png'
);
@ -899,7 +903,11 @@ class PMA_NavigationTree
if ($node->type == Node::CONTAINER) {
$retval .= "<i>";
}
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
$retval .= "<div class='block'>";
if (isset($node->links['icon'])) {
$args = array();

View File

@ -25,7 +25,11 @@ function PMA_getHtmlForDatabaseComment($db)
. PMA_generate_common_hidden_inputs($db)
. '<fieldset>'
. '<legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= '<img class="icon ic_b_comment" '
. 'src="themes/dot.gif" alt="" />';
}
@ -69,7 +73,11 @@ function PMA_getHtmlForRenameDatabase($db)
. '<fieldset>'
. '<legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= PMA_Util::getImage('b_edit.png');
}
$html_output .= __('Rename database to') . ':'
@ -113,7 +121,11 @@ function PMA_getHtmlForDropDatabaseLink($db)
$html_output = '<div class="operations_half_width">'
. '<fieldset class="caution">';
$html_output .= '<legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= PMA_Util::getImage('b_deltbl.png');
}
$html_output .= __('Remove database')
@ -169,7 +181,11 @@ function PMA_getHtmlForCopyDatabase($db)
$html_output .= '<fieldset>'
. '<legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= PMA_Util::getImage('b_edit.png');
}
$html_output .= __('Copy database to') . ':'
@ -234,7 +250,11 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
$html_output .= '<fieldset>' . "\n"
. ' <legend>';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= PMA_Util::getImage('s_asci.png');
}
$html_output .= '<label for="select_db_collation">' . __('Collation')
@ -269,7 +289,11 @@ function PMA_getHtmlForExportRelationalSchemaView($url_query)
{
$html_output = '<div class="operations_full_width">'
. '<fieldset><a href="schema_edit.php?' . $url_query . '">';
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .= PMA_Util::getImage(
'b_edit.png'
);

View File

@ -407,7 +407,11 @@ class PMA_User_Schema
<legend>
<?php
echo PMA_generate_common_hidden_inputs($db);
if ($cfg['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
echo PMA_Util::getImage('b_views.png');
}
echo __('Display relational schema');

View File

@ -285,7 +285,11 @@ function PMA_sqlQueryFormInsert(
}
echo '</select>' . "\n"
.'<div id="tablefieldinsertbuttoncontainer">' . "\n";
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
echo '<input type="button" class="button" name="insert" value="&lt;&lt;"'
.' onclick="insertValueQuery()"'
.' title="' . __('Insert') . '" />' . "\n";

View File

@ -1191,7 +1191,11 @@ function PMA_getHtmlForTableStructureHeader(
if (PMA_DRIZZLE) {
$colspan -= 2;
}
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$colspan--;
}
$html_output .= '<th colspan="' . $colspan . '" '
@ -1546,7 +1550,11 @@ function PMA_getHtmlForAddColumn($columns_list)
$GLOBALS['db'],
$GLOBALS['table']
);
if ($GLOBALS['cfg']['PropertiesIconic']) {
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('icons', 'both')
)
) {
$html_output .=PMA_Util::getImage(
'b_insrow.png',
__('Add column')

View File

@ -137,7 +137,11 @@ if ($pos > 0) {
echo '<a href="server_binlog.php'
. PMA_generate_common_url($this_url_params) . '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
echo ' title="' . _pgettext('Previous page', 'Previous') . '">';
} else {
echo '>' . _pgettext('Previous page', 'Previous');
@ -170,7 +174,11 @@ if ($num_rows >= $GLOBALS['cfg']['MaxRows']) {
$this_url_params['pos'] = $pos + $GLOBALS['cfg']['MaxRows'];
echo ' - <a href="server_binlog.php' . PMA_generate_common_url($this_url_params)
. '"';
if ($GLOBALS['cfg']['NavigationBarIconic']) {
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('icons', 'both')
)
) {
echo ' title="' . _pgettext('Next page', 'Next') . '">';
} else {
echo '>' . _pgettext('Next page', 'Next');

View File

@ -233,8 +233,9 @@ if ($databases_count > 0) {
}
if ($is_superuser && ! PMA_DRIZZLE) {
echo ' <th>' . ($cfg['PropertiesIconic'] ? '' : __('Action')) . "\n"
. ' </th>' . "\n";
echo ' <th>'
. ($cfg['ActionLinksMode'] == 'icons' ? '' : __('Action')) . "\n"
. ' </th>' . "\n";
}
echo '</tr>' . "\n"
. '</thead>' . "\n"

View File

@ -219,7 +219,10 @@ $hidden_titles = PMA_getHiddenTitlesArray();
$HideStructureActions = '';
if ($GLOBALS['cfg']['PropertiesIconic'] !== true
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
&& $GLOBALS['cfg']['HideStructureActions'] === true
) {
$HideStructureActions .= ' HideStructureActions';

View File

@ -526,13 +526,15 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
// Prepare delete link content here
$drop_image_or_text = '';
if (true == $GLOBALS['cfg']['PropertiesIconic']) {
if ('icons' == $GLOBALS['cfg']['ActionsLinksMode']) {
$drop_image_or_text .= PMA_Util::getImage(
'b_drop.png', __('Delete tracking data row from report')
);
}
if ('both' === $GLOBALS['cfg']['PropertiesIconic']
|| false === $GLOBALS['cfg']['PropertiesIconic']
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
) {
$drop_image_or_text .= __('Delete');
}

View File

@ -353,7 +353,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
public function testGetTableNavigationButton(
$caption, $title, $pos, $html_sql_query, $output
) {
$GLOBALS['cfg']['NavigationBarIconic'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$_SESSION[' PMA_token '] = 'token';
$this->assertEquals(
@ -831,7 +831,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
public function testGetEditLink(
$edit_url, $class, $edit_str, $where_clause, $where_clause_html, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(
@ -883,7 +883,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
public function testGetCopyLink(
$copy_url, $copy_str, $where_clause, $where_clause_html, $class, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(
@ -933,7 +933,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
public function testGetDeleteLink(
$del_url, $del_str, $js_conf, $class, $output
) {
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
$GLOBALS['cfg']['LinkLengthLimit'] = 1000;
$this->assertEquals(

View File

@ -134,7 +134,7 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase
public function testGetSelfLink()
{
$GLOBALS['cfg']['NavigationBarIconic'] = false;
$GLOBALS['cfg']['TabsMode'] = 'text';
$GLOBALS['cfg']['ServerDefault'] = 1;
$this->assertEquals(
@ -156,7 +156,7 @@ class PMA_Footer_Test extends PHPUnit_Framework_TestCase
public function testGetSelfLinkWithImage()
{
$GLOBALS['cfg']['NavigationBarIconic'] = true;
$GLOBALS['cfg']['TabsMode'] = 'icons';
$GLOBALS['cfg']['ServerDefault'] = 1;
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['pmaThemeImage'] = 'image';

View File

@ -44,7 +44,7 @@ class PMA_Menu_Test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg']['ServerDefault'] = 1;
$GLOBALS['lang'] = 'en';
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
$GLOBALS['cfg']['NavigationBarIconic'] = 'both';
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'both';
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
$GLOBALS['pmaThemeImage'] = 'theme/';

View File

@ -40,7 +40,7 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['cfg']['MySQLManualType'] = 'viewable';
$GLOBALS['cfg']['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman';
$GLOBALS['cfg']['PropertiesIconic'] = 'both';
$GLOBALS['cfg']['ActionLinksMode'] = 'both';
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['pmaThemeImage'] = 'themes/dot.gif';
$GLOBALS['is_ajax_request'] = false;

View File

@ -42,7 +42,7 @@ class PMA_build_html_for_db_test extends PHPUnit_Framework_TestCase
$GLOBALS['PMA_Types'] = new PMA_Types_MySQL();
$_SESSION['PMA_Theme'] = new PMA_Theme();
$GLOBALS['cfg']['PropertiesIconic'] = true;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['pmaThemePath'] = $_SESSION['PMA_Theme']->getPath();
$GLOBALS['pmaThemeImage'] = 'theme/';

View File

@ -42,7 +42,7 @@ class PMA_Operations_Test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg'] = array(
'MySQLManualType' => 'none',
'ServerDefault' => 1,
'PropertiesIconic' => true,
'ActionLinksMode' => 'icons',
);
$GLOBALS['server'] = 1;
}

View File

@ -38,7 +38,7 @@ class PMA_Transformation_Test extends PHPUnit_Framework_TestCase
$GLOBALS['cfg'] = array(
'MySQLManualType' => 'none',
'ServerDefault' => 1,
'PropertiesIconic' => true,
'ActionLinksMode' => 'icons',
);
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['Server']['pmadb'] = 'pmadb';

View File

@ -20,7 +20,7 @@ class PMA_buildActionTitles_test extends PHPUnit_Framework_TestCase
function setup()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$GLOBALS['cfg'] = array('PropertiesIconic' => 'both');
$GLOBALS['cfg'] = array('ActionLinksMode' => 'both');
$GLOBALS['pmaThemeImage'] = 'theme/';
}

View File

@ -20,9 +20,9 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
}
function testGetIconWithoutPropertiesIconic()
function testGetIconWithoutActionLinksMode()
{
$GLOBALS['cfg']['PropertiesIconic'] = false;
$GLOBALS['cfg']['ActionLinksMode'] = 'text';
$this->assertEquals(
'<span class="nowrap"></span>',
@ -30,9 +30,9 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
);
}
function testGetIconWithPropertiesIconic()
function testGetIconWithActionLinksMode()
{
$GLOBALS['cfg']['PropertiesIconic'] = true;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$this->assertEquals(
'<span class="nowrap"><img src="themes/dot.gif" title="" alt="" class="icon ic_b_comment" /></span>',
@ -42,7 +42,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
function testGetIconAlternate()
{
$GLOBALS['cfg']['PropertiesIconic'] = true;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$alternate_text = 'alt_str';
$this->assertEquals(
@ -54,7 +54,7 @@ class PMA_getIcon_test extends PHPUnit_Framework_TestCase
function testGetIconWithForceText()
{
$GLOBALS['cfg']['PropertiesIconic'] = true;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$alternate_text = 'alt_str';
// Here we are checking for an icon embeded inside a span (i.e not a menu