Merge pull request #1239 from D-storm/scrutinizer
scrutinizer issues fix
This commit is contained in:
commit
30de95fc0a
@ -278,7 +278,7 @@ function aliasSelectHandler(event) {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function createAliasModal(event) {
|
||||
function createAliasModal(event) {
|
||||
event.preventDefault();
|
||||
$('#alias_modal').dialog({
|
||||
width: Math.min($(window).width() - 100, 700),
|
||||
@ -314,7 +314,7 @@ function aliasSelectHandler(event) {
|
||||
},
|
||||
position: 'center'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
AJAX.registerOnload('export.js', function () {
|
||||
$("input[type='radio'][name='quick_or_custom']").change(toggle_quick_or_custom);
|
||||
|
||||
@ -2465,17 +2465,19 @@ class PMA_DisplayResults
|
||||
/**
|
||||
* Adds the relevant classes.
|
||||
*
|
||||
* @param string $class class of table cell
|
||||
* @param bool $condition_field whether to add CSS class condition
|
||||
* @param object $meta the meta-information about the field
|
||||
* @param string $nowrap avoid wrapping
|
||||
* @param bool $is_field_truncated is field truncated (display ...)
|
||||
* @param string $transformation_plugin transformation plugin.
|
||||
* Can also be the default function:
|
||||
* PMA_mimeDefaultFunction
|
||||
* @param string $default_function default transformation function
|
||||
* @param string $class class of table cell
|
||||
* @param bool $condition_field whether to add CSS class
|
||||
* condition
|
||||
* @param object $meta the meta-information about the
|
||||
* field
|
||||
* @param string $nowrap avoid wrapping
|
||||
* @param bool $is_field_truncated is field truncated (display ...)
|
||||
* @param object|string $transformation_plugin transformation plugin.
|
||||
* Can also be the default function:
|
||||
* PMA_mimeDefaultFunction
|
||||
* @param string $default_function default transformation function
|
||||
*
|
||||
* @return string the list of classes
|
||||
* @return string the list of classes
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
@ -3643,21 +3645,22 @@ class PMA_DisplayResults
|
||||
/**
|
||||
* Prepare data cell for numeric type fields
|
||||
*
|
||||
* @param string $column the relevant column in data row
|
||||
* @param string $class the html class for column
|
||||
* @param boolean $condition_field the column should highlighted
|
||||
* or not
|
||||
* @param object $meta the meta-information about this
|
||||
* field
|
||||
* @param array $map the list of relations
|
||||
* @param boolean $is_field_truncated the condition for blob data
|
||||
* replacements
|
||||
* @param array $analyzed_sql the analyzed query
|
||||
* @param string $transformation_plugin the name of transformation plugin
|
||||
* @param string $default_function the default transformation function
|
||||
* @param string $transform_options the transformation parameters
|
||||
* @param string $column the relevant column in data row
|
||||
* @param string $class the html class for column
|
||||
* @param boolean $condition_field the column should highlighted
|
||||
* or not
|
||||
* @param object $meta the meta-information about this
|
||||
* field
|
||||
* @param array $map the list of relations
|
||||
* @param boolean $is_field_truncated the condition for blob data
|
||||
* replacements
|
||||
* @param array $analyzed_sql the analyzed query
|
||||
* @param object|string $transformation_plugin the name of transformation plugin
|
||||
* @param string $default_function the default transformation
|
||||
* function
|
||||
* @param string $transform_options the transformation parameters
|
||||
*
|
||||
* @return string $cell the prepared cell, html content
|
||||
* @return string $cell the prepared cell, html content
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
@ -3825,7 +3828,7 @@ class PMA_DisplayResults
|
||||
* have to be displayed
|
||||
* @param integer $col_index the column index
|
||||
*
|
||||
* @return string $cell the prepared data cell, html content
|
||||
* @return string $cell the prepared data cell, html content
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
@ -5451,22 +5454,23 @@ class PMA_DisplayResults
|
||||
* Prepares the displayable content of a data cell in Browse mode,
|
||||
* taking into account foreign key description field and transformations
|
||||
*
|
||||
* @param string $class css classes for the td element
|
||||
* @param bool $condition_field whether the column is a part of the
|
||||
* where clause
|
||||
* @param string $analyzed_sql the analyzed query
|
||||
* @param object $meta the meta-information about the field
|
||||
* @param array $map the list of relations
|
||||
* @param string $data data
|
||||
* @param string $transformation_plugin transformation plugin.
|
||||
* Can also be the default function:
|
||||
* PMA_mimeDefaultFunction
|
||||
* @param string $default_function default function
|
||||
* @param string $nowrap 'nowrap' if the content should not
|
||||
* be wrapped
|
||||
* @param string $where_comparison data for the where clause
|
||||
* @param array $transform_options array of options for transformation
|
||||
* @param bool $is_field_truncated whether the field is truncated
|
||||
* @param string $class css classes for the td element
|
||||
* @param bool $condition_field whether the column is a part of
|
||||
* the where clause
|
||||
* @param string $analyzed_sql the analyzed query
|
||||
* @param object $meta the meta-information about the
|
||||
* field
|
||||
* @param array $map the list of relations
|
||||
* @param string $data data
|
||||
* @param object|string $transformation_plugin transformation plugin.
|
||||
* Can also be the default function:
|
||||
* PMA_mimeDefaultFunction
|
||||
* @param string $default_function default function
|
||||
* @param string $nowrap 'nowrap' if the content should
|
||||
* not be wrapped
|
||||
* @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
|
||||
*
|
||||
* @return string formatted data
|
||||
*
|
||||
|
||||
@ -767,6 +767,7 @@ function PMA_getHtmlForAliasModalDialog($db = '', $table = '')
|
||||
. '</label><select id="db_alias_select">';
|
||||
$table_html = '<label class="col-2">' . __('Select table') . ': </label>';
|
||||
$first_db = true;
|
||||
$table_input_html = $db_input_html = '';
|
||||
foreach ($databases as $db => $tables) {
|
||||
$db = htmlspecialchars($db);
|
||||
$name_attr = 'aliases[' . $db . '][alias]';
|
||||
|
||||
@ -453,10 +453,10 @@ function PMA_getHtmlForDisplayedExportHeader($export_type, $db, $table)
|
||||
* @param string $crlf end of line character(s)
|
||||
* @param string $err_url the URL in case of error
|
||||
* @param string $export_type the export type
|
||||
* @param string $do_relation whether to export relation info
|
||||
* @param string $do_comments whether to add comments
|
||||
* @param string $do_mime whether to add MIME info
|
||||
* @param string $do_dates whether to add dates
|
||||
* @param bool $do_relation whether to export relation info
|
||||
* @param bool $do_comments whether to add comments
|
||||
* @param bool $do_mime whether to add MIME info
|
||||
* @param bool $do_dates whether to add dates
|
||||
* @param array $aliases Alias information for db/table/column
|
||||
*
|
||||
* @return void
|
||||
@ -495,10 +495,10 @@ function PMA_exportServer(
|
||||
* @param string $crlf end of line character(s)
|
||||
* @param string $err_url the URL in case of error
|
||||
* @param string $export_type the export type
|
||||
* @param string $do_relation whether to export relation info
|
||||
* @param string $do_comments whether to add comments
|
||||
* @param string $do_mime whether to add MIME info
|
||||
* @param string $do_dates whether to add dates
|
||||
* @param bool $do_relation whether to export relation info
|
||||
* @param bool $do_comments whether to add comments
|
||||
* @param bool $do_mime whether to add MIME info
|
||||
* @param bool $do_dates whether to add dates
|
||||
* @param array $aliases Alias information for db/table/column
|
||||
*
|
||||
* @return void
|
||||
@ -644,10 +644,10 @@ function PMA_exportDatabase(
|
||||
* @param string $crlf end of line character(s)
|
||||
* @param string $err_url the URL in case of error
|
||||
* @param string $export_type the export type
|
||||
* @param string $do_relation whether to export relation info
|
||||
* @param string $do_comments whether to add comments
|
||||
* @param string $do_mime whether to add MIME info
|
||||
* @param string $do_dates whether to add dates
|
||||
* @param bool $do_relation whether to export relation info
|
||||
* @param bool $do_comments whether to add comments
|
||||
* @param bool $do_mime whether to add MIME info
|
||||
* @param bool $do_dates whether to add dates
|
||||
* @param string $allrows whether "dump all rows" was ticked
|
||||
* @param string $limit_to upper limit
|
||||
* @param string $limit_from starting limit
|
||||
|
||||
@ -66,7 +66,7 @@ class PMA_SQLParser_Test extends PHPUnit_Framework_TestCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testPMA_SQP_isKeyWord()
|
||||
public function testPmaSqpIsKeyWord()
|
||||
{
|
||||
PMA_SQP_resetError();
|
||||
$this->assertTrue(PMA_SQP_isKeyWord("ACCESSIBLE"));
|
||||
@ -80,7 +80,7 @@ class PMA_SQLParser_Test extends PHPUnit_Framework_TestCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testPMA_SQP_typeCheck()
|
||||
public function testPmaSqpTypeCheck()
|
||||
{
|
||||
$this->assertTrue(
|
||||
PMA_SQP_typeCheck("VARCHAR", "VARCHAR")
|
||||
@ -104,7 +104,7 @@ class PMA_SQLParser_Test extends PHPUnit_Framework_TestCase
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testPMA_SQP_throwError()
|
||||
public function testPmaSqpThrowError()
|
||||
{
|
||||
global $SQP_errorString;
|
||||
$message = "error from testPMA_SQP_throwError";
|
||||
@ -335,7 +335,7 @@ class PMA_SQLParser_Test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for testPMA_SQP_getAliasesFromQuery
|
||||
* Data provider for testPmaSqpGetAliasesFromQuery
|
||||
*
|
||||
* @return array with test data
|
||||
*/
|
||||
@ -424,7 +424,7 @@ class PMA_SQLParser_Test extends PHPUnit_Framework_TestCase
|
||||
* @dataProvider aliasDataProvider
|
||||
* @group medium
|
||||
*/
|
||||
public function testPMA_SQP_getAliasesFromQuery($select_query, $db, $expected)
|
||||
public function testPmaSqpGetAliasesFromQuery($select_query, $db, $expected)
|
||||
{
|
||||
$this->assertEquals(
|
||||
$expected,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user