Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
09d6a1d09b
@ -91,11 +91,7 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) {
|
||||
// Print out information about versions
|
||||
|
||||
$drop_image_or_text = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$drop_image_or_text .= PMA_Util::getImage(
|
||||
'b_drop.png',
|
||||
__('Delete tracking data for this table')
|
||||
|
||||
@ -535,11 +535,7 @@ class PMA_DisplayResults
|
||||
) {
|
||||
|
||||
$caption_output = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$caption_output .= $caption;
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ class PMA_Footer
|
||||
{
|
||||
$message = '<a href="/">' . __('phpMyAdmin Demo Server') . '</a>: ';
|
||||
if (file_exists('./revision-info.php')) {
|
||||
include('./revision-info.php');
|
||||
include './revision-info.php';
|
||||
$message .= sprintf(
|
||||
__('Currently running Git revision %1$s from the %2$s branch.'),
|
||||
'<a target="_top" href="' . $repobase . $fullrevision . '">'
|
||||
@ -161,11 +161,7 @@ class PMA_Footer
|
||||
$retval .= '<div id="selflink" class="print_ignore">';
|
||||
$retval .= '<a href="' . $url . '"'
|
||||
. ' title="' . __('Open new phpMyAdmin window') . '" target="_blank">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TabsMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
'window-new.png',
|
||||
__('Open new phpMyAdmin window')
|
||||
|
||||
@ -184,7 +184,7 @@ class PMA_Menu
|
||||
$item .= '%3$s</a>';
|
||||
$retval .= "<div id='floating_menubar'></div>";
|
||||
$retval .= "<div id='serverinfo'>";
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
's_host.png',
|
||||
'',
|
||||
@ -201,7 +201,7 @@ class PMA_Menu
|
||||
|
||||
if (strlen($this->_db)) {
|
||||
$retval .= $separator;
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$retval .= PMA_Util::getImage(
|
||||
's_db.png',
|
||||
'',
|
||||
@ -223,7 +223,7 @@ class PMA_Menu
|
||||
include './libraries/tbl_info.inc.php';
|
||||
|
||||
$retval .= $separator;
|
||||
if (in_array($GLOBALS['cfg']['TabsMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('TabsMode')) {
|
||||
$icon = $tbl_is_view ? 'b_views.png' : 's_tbl.png';
|
||||
$retval .= PMA_Util::getImage(
|
||||
$icon,
|
||||
|
||||
@ -86,6 +86,18 @@ class PMA_Util
|
||||
return $pow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether configuration value tells to show icons.
|
||||
*
|
||||
* @param string $value Configuration option name
|
||||
*
|
||||
* @return boolean Whether to show icons.
|
||||
*/
|
||||
public static function showIcons($value)
|
||||
{
|
||||
return in_array($GLOBALS['cfg'][$value], array('icons', 'both'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an HTML IMG tag for a particular icon from a theme,
|
||||
* which may be an actual file or an icon from a sprite.
|
||||
@ -105,11 +117,7 @@ class PMA_Util
|
||||
$menu_icon = false, $control_param = 'ActionLinksMode'
|
||||
) {
|
||||
$include_icon = $include_text = false;
|
||||
if (in_array(
|
||||
$GLOBALS['cfg'][$control_param],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (self::showIcons($control_param]) {
|
||||
$include_icon = true;
|
||||
}
|
||||
if ($force_text
|
||||
@ -2528,11 +2536,7 @@ class PMA_Util
|
||||
|
||||
// Move to the beginning or to the previous page
|
||||
if ($pos > 0) {
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (self::showIcons('TableNavigationLinksMode')) {
|
||||
$caption1 = '<<';
|
||||
$caption2 = ' < ';
|
||||
$title1 = ' title="' . _pgettext('First page', 'Begin') . '"';
|
||||
@ -2569,11 +2573,7 @@ class PMA_Util
|
||||
$list_navigator_html .= '</form>';
|
||||
|
||||
if ($pos + $max_count < $count) {
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if ( self::showIcons('TableNavigationLinksMode')) {
|
||||
$caption3 = ' > ';
|
||||
$caption4 = '>>';
|
||||
$title3 = ' title="' . _pgettext('Next page', 'Next') . '"';
|
||||
|
||||
@ -40,11 +40,7 @@ $is_create_table_priv = true;
|
||||
<fieldset>
|
||||
<legend>
|
||||
<?php
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
echo PMA_Util::getImage('b_newtbl.png');
|
||||
}
|
||||
echo __('Create table');
|
||||
|
||||
@ -576,11 +576,7 @@ class PMA_NavigationTree
|
||||
$groups[$key]->separator = $node->separator;
|
||||
$groups[$key]->separator_depth = $node->separator_depth - 1;
|
||||
$groups[$key]->icon = '';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$groups[$key]->icon = PMA_Util::getImage(
|
||||
'b_group.png'
|
||||
);
|
||||
@ -900,11 +896,7 @@ class PMA_NavigationTree
|
||||
if ($node->type == Node::CONTAINER) {
|
||||
$retval .= "<i>";
|
||||
}
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$retval .= "<div class='block'>";
|
||||
if (isset($node->links['icon'])) {
|
||||
$args = array();
|
||||
|
||||
@ -25,11 +25,7 @@ function PMA_getHtmlForDatabaseComment($db)
|
||||
. PMA_generate_common_hidden_inputs($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= '<img class="icon ic_b_comment" '
|
||||
. 'src="themes/dot.gif" alt="" />';
|
||||
}
|
||||
@ -73,11 +69,7 @@ function PMA_getHtmlForRenameDatabase($db)
|
||||
. '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_edit.png');
|
||||
}
|
||||
$html_output .= __('Rename database to:')
|
||||
@ -121,11 +113,7 @@ function PMA_getHtmlForDropDatabaseLink($db)
|
||||
$html_output = '<div class="operations_half_width">'
|
||||
. '<fieldset class="caution">';
|
||||
$html_output .= '<legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_deltbl.png');
|
||||
}
|
||||
$html_output .= __('Remove database')
|
||||
@ -181,11 +169,7 @@ function PMA_getHtmlForCopyDatabase($db)
|
||||
$html_output .= '<fieldset>'
|
||||
. '<legend>';
|
||||
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('b_edit.png');
|
||||
}
|
||||
$html_output .= __('Copy database to:')
|
||||
@ -250,11 +234,7 @@ function PMA_getHtmlForChangeDatabaseCharset($db, $table)
|
||||
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
. ' <legend>';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage('s_asci.png');
|
||||
}
|
||||
$html_output .= '<label for="select_db_collation">' . __('Collation')
|
||||
@ -289,11 +269,7 @@ function PMA_getHtmlForExportRelationalSchemaView($url_query)
|
||||
{
|
||||
$html_output = '<div class="operations_full_width">'
|
||||
. '<fieldset><a href="schema_edit.php?' . $url_query . '">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .= PMA_Util::getImage(
|
||||
'b_edit.png'
|
||||
);
|
||||
|
||||
@ -409,11 +409,7 @@ class PMA_User_Schema
|
||||
<legend>
|
||||
<?php
|
||||
echo PMA_generate_common_hidden_inputs($db);
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
echo PMA_Util::getImage('b_views.png');
|
||||
}
|
||||
echo __('Display relational schema');
|
||||
|
||||
@ -167,11 +167,7 @@ function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
|
||||
|
||||
$html .= '<a href="server_binlog.php'
|
||||
. PMA_generate_common_url($this_url_params) . '"';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Previous page', 'Previous') . '">';
|
||||
} else {
|
||||
$html .= '>' . _pgettext('Previous page', 'Previous');
|
||||
@ -205,11 +201,7 @@ function PMA_getNavigationRow($url_params, $pos, $num_rows, $dontlimitchars)
|
||||
$html .= ' - <a href="server_binlog.php'
|
||||
. PMA_generate_common_url($this_url_params)
|
||||
. '"';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['TableNavigationLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('TableNavigationLinksMode')) {
|
||||
$html .= ' title="' . _pgettext('Next page', 'Next') . '">';
|
||||
} else {
|
||||
$html .= '>' . _pgettext('Next page', 'Next');
|
||||
|
||||
@ -295,11 +295,7 @@ function PMA_sqlQueryFormInsert(
|
||||
}
|
||||
$html .= '</select>'
|
||||
. '<div id="tablefieldinsertbuttoncontainer">';
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html .= '<input type="button" class="button" name="insert"'
|
||||
. ' value="<<" onclick="insertValueQuery()"'
|
||||
. ' title="' . __('Insert') . '" />';
|
||||
|
||||
@ -1191,7 +1191,7 @@ function PMA_getHtmlForTableStructureHeader(
|
||||
if (PMA_DRIZZLE) {
|
||||
$colspan -= 2;
|
||||
}
|
||||
if (in_array($GLOBALS['cfg']['ActionLinksMode'], array('icons', 'both'))) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$colspan--;
|
||||
}
|
||||
$html_output .= '<th colspan="' . $colspan . '" '
|
||||
@ -1562,11 +1562,7 @@ function PMA_getHtmlForAddColumn($columns_list)
|
||||
$GLOBALS['db'],
|
||||
$GLOBALS['table']
|
||||
);
|
||||
if (in_array(
|
||||
$GLOBALS['cfg']['ActionLinksMode'],
|
||||
array('icons', 'both')
|
||||
)
|
||||
) {
|
||||
if (PMA_Util::showIcons('ActionLinksMode')) {
|
||||
$html_output .=PMA_Util::getImage(
|
||||
'b_insrow.png',
|
||||
__('Add column')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user