Merge pull request #1183 from D-storm/bug-4411

Bug fix #4411 : Fixed ProtectBinary behaviour on insert operation
This commit is contained in:
Marc Delisle 2014-05-16 07:51:16 -04:00
commit fa1a290948
2 changed files with 4 additions and 4 deletions

View File

@ -1099,9 +1099,9 @@ function PMA_getBinaryAndBlobColumn(
$vkey, $is_upload
) {
$html_output = '';
if (($GLOBALS['cfg']['ProtectBinary'] && $column['is_blob'])
|| ($GLOBALS['cfg']['ProtectBinary'] == 'all' && $column['is_binary'])
|| ($GLOBALS['cfg']['ProtectBinary'] == 'noblob' && !$column['is_blob'])
if (($GLOBALS['cfg']['ProtectBinary'] === 'blob' && $column['is_blob'])
|| ($GLOBALS['cfg']['ProtectBinary'] === 'all')
|| ($GLOBALS['cfg']['ProtectBinary'] === 'noblob' && !$column['is_blob'])
) {
$html_output .= __('Binary - do not edit');
if (isset($data)) {

View File

@ -1127,7 +1127,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
*/
public function testGetBinaryAndBlobColumn()
{
$GLOBALS['cfg']['ProtectBinary'] = true;
$GLOBALS['cfg']['ProtectBinary'] = 'blob';
$column['is_blob'] = true;
$column['Field_md5'] = '123';
$column['pma_type'] = 'blob';