Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2013-07-30 15:08:42 +02:00
commit a0cf0970c6
8 changed files with 26 additions and 26 deletions

View File

@ -49,6 +49,7 @@ $tracker_url_bug = 'https://sourceforge.net/p/phpmyadmin/bugs/\\1/';
$tracker_url_rfe = 'https://sourceforge.net/p/phpmyadmin/feature-requests/\\1/';
$tracker_url_patch = 'https://sourceforge.net/p/phpmyadmin/patches/\\1/';
$github_url = 'https://github.com/phpmyadmin/phpmyadmin/';
$faq_url = 'http://docs.phpmyadmin.net/en/latest/faq.html';
$replaces = array(
'@(http://[./a-zA-Z0-9.-_-]*[/a-zA-Z0-9_])@'
@ -80,7 +81,7 @@ $replaces = array(
// FAQ entries
'/FAQ ([0-9]+)\.([0-9a-z]+)/i'
=> '<a href="http://docs.phpmyadmin.net/en/latest/faq.html#faq\\1-\\2">FAQ \\1.\\2</a>',
=> '<a href="' . $faq_url . '#faq\\1-\\2">FAQ \\1.\\2</a>',
// linking bugs
'/bug\s*#?([0-9]{6,})/i'

View File

@ -97,11 +97,7 @@ if ($GLOBALS['dbi']->numRows($all_tables_result) > 0) {
__('Delete tracking data for this table')
);
}
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
) {
if (PMA_Util::showText('ActionLinksMode')) {
$drop_image_or_text .= __('Drop');
}

View File

@ -539,11 +539,7 @@ class PMA_DisplayResults
$caption_output .= $caption;
}
if (in_array(
$GLOBALS['cfg']['TableNavigationLinksMode'],
array('text', 'both')
)
) {
if (PMA_Util::showText('TableNavigationLinksMode')) {
$caption_output .= '&nbsp;' . $title;
}
$title_output = ' title="' . $title . '"';

View File

@ -178,7 +178,7 @@ class PMA_Menu
$item = '<a href="%1$s?%2$s" class="item">';
if (in_array($GLOBALS['cfg']['TabsMode'], array('text', 'both'))) {
if (PMA_Util::showText('TabsMode')) {
$item .= '%4$s: ';
}
$item .= '%3$s</a>';

View File

@ -98,6 +98,18 @@ class PMA_Util
return in_array($GLOBALS['cfg'][$value], array('icons', 'both'));
}
/**
* Checks whether configuration value tells to show text.
*
* @param string $value Configuration option name
*
* @return boolean Whether to show text.
*/
public static function showText($value)
{
return in_array($GLOBALS['cfg'][$value], array('text', '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.
@ -121,10 +133,7 @@ class PMA_Util
$include_icon = true;
}
if ($force_text
|| in_array(
$GLOBALS['cfg'][$control_param],
array('text', 'both')
)
|| self::showText($control_param)
) {
$include_text = true;
}

View File

@ -21,10 +21,7 @@ if (! defined('PHPMYADMIN')) {
$HideStructureActions = '';
if (in_array(
$GLOBALS['cfg']['ActionLinksMode'],
array('text', 'both')
)
if (PMA_Util::showText('ActionLinksMode')
&& $GLOBALS['cfg']['HideStructureActions'] === true
) {
$HideStructureActions .= ' HideStructureActions';

View File

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

View File

@ -12,6 +12,11 @@
require_once 'libraries/mime.lib.php';
/**
* Test for mime detection.
*
* @package PhpMyAdmin-test
*/
class PMA_MIME_Test extends PHPUnit_Framework_TestCase
{
/**