From 449716a99feb589ab539567165f369ac63eed14d Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 20 Oct 2012 09:23:18 -0400 Subject: [PATCH] Clarify metho name --- libraries/DisplayResults.class.php | 13 ++++++------- test/classes/PMA_DisplayResults_test.php | 12 ++++++------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 2eb1241c53..a1f4706ec5 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -2724,9 +2724,8 @@ class PMA_DisplayResults $pointer = $i; $is_field_truncated = false; - //If the previous column had blob data, we need to reset the class - // to $inline_edit_class - $class = $this->_getResettedClassForInlineEdit( + // combine all the classes applicable to this column's value + $class = $this->_getClassesForColumn( $grid_edit_class, $not_null_class, $relation_class, $hide_class, $field_type_class, $row_no ); @@ -3474,7 +3473,7 @@ class PMA_DisplayResults /** - * Get resetted class for inline edit columns + * Get the combined classes for a column * * @param string $grid_edit_class the class for all editable columns * @param string $not_null_class the class for not null columns @@ -3483,13 +3482,13 @@ class PMA_DisplayResults * @param string $field_type_class the class related to type of the field * @param integer $row_no the row index * - * @return string $class the resetted class + * @return string $class the combined classes * * @access private * * @see _getTableBody() */ - private function _getResettedClassForInlineEdit( + private function _getClassesForColumn( $grid_edit_class, $not_null_class, $relation_class, $hide_class, $field_type_class, $row_no ) { @@ -3515,7 +3514,7 @@ class PMA_DisplayResults return $class; - } // end of the '_getResettedClassForInlineEdit()' function + } // end of the '_getClassesForColumn()' function /** diff --git a/test/classes/PMA_DisplayResults_test.php b/test/classes/PMA_DisplayResults_test.php index 157a41537d..9a6c4ba78f 100644 --- a/test/classes/PMA_DisplayResults_test.php +++ b/test/classes/PMA_DisplayResults_test.php @@ -450,11 +450,11 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase } /** - * Data provider for testGetResettedClassForInlineEdit + * Data provider for testGetClassesForColumn * * @return array parameters and output */ - public function dataProviderForTestGetResettedClassForInlineEdit() + public function dataProviderForTestGetClassesForColumn() { return array( array( @@ -470,7 +470,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase } /** - * Test for _getResettedClassForInlineEdit + * Test for _getClassesForColumn * * @param string $grid_edit_class the class for all editable columns * @param string $not_null_class the class for not null columns @@ -482,9 +482,9 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase * * @return void * - * @dataProvider dataProviderForTestGetResettedClassForInlineEdit + * @dataProvider dataProviderForTestGetClassesForColumn */ - public function testGetResettedClassForInlineEdit( + public function testGetClassesForColumn( $grid_edit_class, $not_null_class, $relation_class, $hide_class, $field_type_class, $row_no, $output ) { @@ -496,7 +496,7 @@ class PMA_DisplayResults_Test extends PHPUnit_Framework_TestCase $this->assertEquals( $output, $this->_callPrivateFunction( - '_getResettedClassForInlineEdit', + '_getClassesForColumn', array( $grid_edit_class, $not_null_class, $relation_class, $hide_class, $field_type_class, $row_no