Merge branch 'master' of github.com:phpmyadmin/phpmyadmin

This commit is contained in:
Madhura Jayaratne 2015-04-30 19:16:09 +05:30
commit a17823e898
86 changed files with 110763 additions and 107368 deletions

View File

@ -28,6 +28,7 @@ phpMyAdmin - ChangeLog
+ rfe Option groups for 'With selected' dropdown in database structure page
+ rfe #1661 Support checksum table
+ rfe #1380 Support for Paramaters with raw SQL
+ rfe #1146 Show original size of truncated columns
4.4.5.0 (not yet released)
- bug Table overhead stats: missing space before the unit

View File

@ -1863,7 +1863,15 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi
* Initialize grid
******************/
// wrap all data cells, except actions cell, with span
// wrap all truncated data cells with span indicating the original length
// todo update the original length after a grid edit
$(t).find('td.data.truncated:not(:has(span))')
.wrapInner(function() {
return '<span title="' + PMA_messages.strOriginalLength + ' '
+ $(this).data('originallength') + '"></span>';
});
// wrap remaining cells, except actions cell, with span
$(t).find('th, td:not(:has(span))')
.wrapInner('<span />');

View File

@ -457,6 +457,7 @@ $js_messages['strShowAllCol'] = __('Show all');
$js_messages['strAlertNonUnique'] = __('This table does not contain a unique column. Features related to the grid edit, checkbox, Edit, Copy and Delete links may not work after saving.');
$js_messages['strEnterValidHex'] = __('Please enter a valid hexadecimal string. Valid characters are 0-9, A-F.');
$js_messages['strShowAllRowsWarning'] = __('Do you really want to see all of the rows? For a big table this could crash the browser.');
$js_messages['strOriginalLength'] = __('Original length');
/** Drag & Drop sql import messages */
$js_messages['dropImportMessageCancel'] = __('cancel');

View File

@ -3604,7 +3604,7 @@ class PMA_DisplayResults
$analyzed_sql, $meta, $map, $column,
$transformation_plugin, $default_function, $nowrap,
$where_comparison, $transform_options,
$is_field_truncated
$is_field_truncated, ''
);
} else {
@ -3677,13 +3677,17 @@ class PMA_DisplayResults
// Convert to WKT format
$wktval = PMA_Util::asWKT($column);
$is_field_truncated = $this->_getPartialText($wktval);
list(
$is_field_truncated,
$wktval,
// skip 3rd param
) = $this->_getPartialText($wktval);
$cell = $this->_getRowData(
$class, $condition_field, $analyzed_sql, $meta, $map,
$wktval, $transformation_plugin, $default_function, '',
$where_comparison, $transform_options,
$is_field_truncated
$is_field_truncated, ''
);
return $cell;
}
@ -3694,14 +3698,18 @@ class PMA_DisplayResults
$where_comparison = ' = ' . $column;
$wkbval = substr(bin2hex($column), 8);
$is_field_truncated = $this->_getPartialText($wkbval);
list(
$is_field_truncated,
$wkbval,
// skip 3rd param
) = $this->_getPartialText($wkbval);
$cell = $this->_getRowData(
$class, $condition_field,
$analyzed_sql, $meta, $map, $wkbval,
$transformation_plugin, $default_function, '',
$where_comparison, $transform_options,
$is_field_truncated
$is_field_truncated, ''
);
return $cell;
}
@ -3795,7 +3803,11 @@ class PMA_DisplayResults
&& strpos($transformation_plugin->getName(), 'Link') !== false)
&& !stristr($field_flags, self::BINARY_FIELD)
) {
$is_field_truncated = $this->_getPartialText($column);
list(
$is_field_truncated,
$column,
$original_length
) = $this->_getPartialText($column);
}
$formatted = false;
@ -3863,7 +3875,7 @@ class PMA_DisplayResults
$analyzed_sql, $meta, $map, $column,
$transformation_plugin, $default_function, $nowrap,
$where_comparison, $transform_options,
$is_field_truncated
$is_field_truncated, $original_length
);
return $cell;
@ -5168,7 +5180,11 @@ class PMA_DisplayResults
) {
// in this case, restart from the original $content
$result = bin2hex($content);
$is_truncated = $this->_getPartialText($result);
list(
$is_truncated,
$result,
// skip 3rd param
) = $this->_getPartialText($result);
}
/* Create link to download */
@ -5205,6 +5221,7 @@ class PMA_DisplayResults
* @param string $where_comparison data for the where clause
* @param array $transform_options options for transformation
* @param bool $is_field_truncated whether the field is truncated
* @param string $original_length of a truncated column, or ''
*
* @return string formatted data
*
@ -5217,14 +5234,21 @@ class PMA_DisplayResults
private function _getRowData(
$class, $condition_field, $analyzed_sql, $meta, $map, $data,
$transformation_plugin, $default_function, $nowrap, $where_comparison,
$transform_options, $is_field_truncated
$transform_options, $is_field_truncated, $original_length=''
) {
$relational_display = $_SESSION['tmpval']['relational_display'];
$printview = $this->__get('printview');
$decimals = isset($meta->decimals) ? $meta->decimals : '-1';
$result = '<td data-decimals="' . $decimals . '" data-type="'
. $meta->type . '" class="'
$result = '<td data-decimals="' . $decimals . '"'
. ' data-type="' . $meta->type . '"';
if (! empty($original_length)) {
// cannot use data-original-length
$result .= ' data-originallength="' . $original_length . '"';
}
$result .= ' class="'
. $this->_addClass(
$class, $condition_field, $meta, $nowrap,
$is_field_truncated, $transformation_plugin, $default_function
@ -5641,34 +5665,35 @@ class PMA_DisplayResults
} // end of the '_getCheckboxAndLinks()' function
/**
* Truncates given string based on LimitChars configuration
* and Session pftext variable
* (string is truncated only if necessary)
*
* @param string &$str string to be truncated
* @param string $str string to be truncated
*
* @return boolean true if truncated, otherwise false
* @return mixed
*
* @access private
*
* @see _handleNonPrintableContents(), _getDataCellForGeometryColumns(),
* _getDataCellForNonNumericColumns
*/
private function _getPartialText(&$str)
private function _getPartialText($str)
{
if (/*overload*/mb_strlen($str) > $GLOBALS['cfg']['LimitChars']
$original_length = /*overload*/mb_strlen($str);
if ($original_length > $GLOBALS['cfg']['LimitChars']
&& $_SESSION['tmpval']['pftext'] === self::DISPLAY_PARTIAL_TEXT
) {
$str = /*overload*/mb_substr(
$str, 0, $GLOBALS['cfg']['LimitChars']
) . '...';
return true;
$truncated = true;
} else {
$truncated = false;
}
return false;
return array($truncated, $str, $original_length);
}
}

2690
po/af.po

File diff suppressed because it is too large Load Diff

2678
po/ar.po

File diff suppressed because it is too large Load Diff

2678
po/az.po

File diff suppressed because it is too large Load Diff

2678
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2695
po/bg.po

File diff suppressed because it is too large Load Diff

2687
po/bn.po

File diff suppressed because it is too large Load Diff

2676
po/br.po

File diff suppressed because it is too large Load Diff

2692
po/bs.po

File diff suppressed because it is too large Load Diff

2754
po/ca.po

File diff suppressed because it is too large Load Diff

2679
po/ckb.po

File diff suppressed because it is too large Load Diff

2697
po/cs.po

File diff suppressed because it is too large Load Diff

2676
po/cy.po

File diff suppressed because it is too large Load Diff

2688
po/da.po

File diff suppressed because it is too large Load Diff

2729
po/de.po

File diff suppressed because it is too large Load Diff

2698
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2690
po/eo.po

File diff suppressed because it is too large Load Diff

2695
po/es.po

File diff suppressed because it is too large Load Diff

2716
po/et.po

File diff suppressed because it is too large Load Diff

2693
po/eu.po

File diff suppressed because it is too large Load Diff

2676
po/fa.po

File diff suppressed because it is too large Load Diff

2678
po/fi.po

File diff suppressed because it is too large Load Diff

2698
po/fr.po

File diff suppressed because it is too large Load Diff

2699
po/fy.po

File diff suppressed because it is too large Load Diff

2688
po/gl.po

File diff suppressed because it is too large Load Diff

2707
po/he.po

File diff suppressed because it is too large Load Diff

2678
po/hi.po

File diff suppressed because it is too large Load Diff

2678
po/hr.po

File diff suppressed because it is too large Load Diff

2698
po/hu.po

File diff suppressed because it is too large Load Diff

2700
po/hy.po

File diff suppressed because it is too large Load Diff

2688
po/ia.po

File diff suppressed because it is too large Load Diff

2681
po/id.po

File diff suppressed because it is too large Load Diff

2716
po/it.po

File diff suppressed because it is too large Load Diff

2688
po/ja.po

File diff suppressed because it is too large Load Diff

2678
po/ka.po

File diff suppressed because it is too large Load Diff

2679
po/kk.po

File diff suppressed because it is too large Load Diff

2680
po/km.po

File diff suppressed because it is too large Load Diff

2690
po/kn.po

File diff suppressed because it is too large Load Diff

2678
po/ko.po

File diff suppressed because it is too large Load Diff

2691
po/ksh.po

File diff suppressed because it is too large Load Diff

2695
po/ky.po

File diff suppressed because it is too large Load Diff

2690
po/li.po

File diff suppressed because it is too large Load Diff

2687
po/lt.po

File diff suppressed because it is too large Load Diff

2681
po/lv.po

File diff suppressed because it is too large Load Diff

2692
po/mk.po

File diff suppressed because it is too large Load Diff

2692
po/ml.po

File diff suppressed because it is too large Load Diff

2692
po/mn.po

File diff suppressed because it is too large Load Diff

2690
po/ms.po

File diff suppressed because it is too large Load Diff

2688
po/nb.po

File diff suppressed because it is too large Load Diff

2693
po/ne.po

File diff suppressed because it is too large Load Diff

2734
po/nl.po

File diff suppressed because it is too large Load Diff

2690
po/pa.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2686
po/pl.po

File diff suppressed because it is too large Load Diff

2683
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2676
po/ro.po

File diff suppressed because it is too large Load Diff

2688
po/ru.po

File diff suppressed because it is too large Load Diff

2678
po/si.po

File diff suppressed because it is too large Load Diff

2699
po/sk.po

File diff suppressed because it is too large Load Diff

2702
po/sl.po

File diff suppressed because it is too large Load Diff

2825
po/sq.po

File diff suppressed because it is too large Load Diff

2692
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2688
po/sv.po

File diff suppressed because it is too large Load Diff

2688
po/ta.po

File diff suppressed because it is too large Load Diff

2691
po/te.po

File diff suppressed because it is too large Load Diff

2678
po/th.po

File diff suppressed because it is too large Load Diff

2692
po/tk.po

File diff suppressed because it is too large Load Diff

2699
po/tr.po

File diff suppressed because it is too large Load Diff

2690
po/tt.po

File diff suppressed because it is too large Load Diff

2676
po/ug.po

File diff suppressed because it is too large Load Diff

2688
po/uk.po

File diff suppressed because it is too large Load Diff

2676
po/ur.po

File diff suppressed because it is too large Load Diff

2678
po/uz.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2700
po/vi.po

File diff suppressed because it is too large Load Diff

2690
po/vls.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1423,10 +1423,10 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
public function dataProviderForTestGetPartialText()
{
return array(
array('P', 10, 'foo', false),
array('P', 1, 'foo', true),
array('F', 10, 'foo', false),
array('F', 1, 'foo', false)
array('P', 10, 'foo', array(false, 'foo', 3)),
array('P', 1, 'foo', array(true, 'f...', 3)),
array('F', 10, 'foo', array(false, 'foo', 3)),
array('F', 1, 'foo', array(false, 'foo', 3))
);
}
@ -1451,7 +1451,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
$output,
$this->_callPrivateFunction(
'_getPartialText',
array(&$str)
array($str)
)
);
}
@ -1676,6 +1676,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase
0,
0,
'<td data-decimals="0" data-type="string" '
. 'data-originallength="11" '
. 'class="grid_edit ">foo bar baz</td>' . "\n"
)
);