From 52e0087b0e25cc07857ef1dc1ce70c79e9492ccf Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 11 Nov 2014 17:45:59 +0530 Subject: [PATCH 1/5] Long messages wrapped Signed-off-by: Madhura Jayaratne --- import.php | 16 +++++++++++++--- libraries/common.inc.php | 5 ++++- setup/lib/index.lib.php | 5 ++++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/import.php b/import.php index 73e276ad98..90dc7b5787 100644 --- a/import.php +++ b/import.php @@ -553,7 +553,10 @@ if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_fil // Drizzle doesn't support other character sets, // so we can't fallback to SET NAMES - throw an error $message = PMA_Message::error( - __('Cannot convert file\'s character set without character set conversion library!') + __( + 'Cannot convert file\'s character' + . ' set without character set conversion library!' + ) ); PMA_stopImport($message); } else { @@ -656,11 +659,18 @@ if (! empty($id_bookmark) && $action_bookmark == 2) { // Did we hit timeout? Tell it user. if ($timeout_passed) { $message = PMA_Message::error( - __('Script timeout passed, if you want to finish import, please resubmit same file and import will resume.') + __( + 'Script timeout passed, if you want to finish import,' + . ' please resubmit same file and import will resume.' + ) ); if ($offset == 0 || (isset($original_skip) && $original_skip == $offset)) { $message->addString( - __('However on last run no data has been parsed, this usually means phpMyAdmin won\'t be able to finish this import unless you increase php time limits.') + __( + 'However on last run no data has been parsed,' + . ' this usually means phpMyAdmin won\'t be able to' + . ' finish this import unless you increase php time limits.' + ) ); } } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index d1104f611f..8df703181e 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -594,7 +594,10 @@ if ($GLOBALS['PMA_Config']->error_config_default_file) { } if ($GLOBALS['PMA_Config']->error_pma_uri) { trigger_error( - __('The [code]$cfg[\'PmaAbsoluteUri\'][/code] directive MUST be set in your configuration file!'), + __( + 'The [code]$cfg[\'PmaAbsoluteUri\'][/code]' + . ' directive MUST be set in your configuration file!' + ), E_USER_ERROR ); } diff --git a/setup/lib/index.lib.php b/setup/lib/index.lib.php index 5d838bf8ab..586c45b779 100644 --- a/setup/lib/index.lib.php +++ b/setup/lib/index.lib.php @@ -115,7 +115,10 @@ function PMA_versionCheck() 'error', $message_id, __('Version check'), - __('Reading of version failed. Maybe you\'re offline or the upgrade server does not respond.') + __( + 'Reading of version failed. ' + . 'Maybe you\'re offline or the upgrade server does not respond.' + ) ); return; } From 8c7e1a0b2ca336cc16cfcf7383d413c0766c4c49 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 11 Nov 2014 17:46:24 +0530 Subject: [PATCH 2/5] Long lines wrapped Signed-off-by: Madhura Jayaratne --- libraries/Console.class.php | 6 ++++-- libraries/display_create_table.lib.php | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libraries/Console.class.php b/libraries/Console.class.php index 19aab62c8e..0b4fd50fdf 100644 --- a/libraries/Console.class.php +++ b/libraries/Console.class.php @@ -246,8 +246,10 @@ class PMA_Console } $output .= ''; // .console_message_container - $output .= '
' - . ''; // Messages end + $output .= '
' + . '' + . '
'; + $output .= ''; // Messages end // Dark the console while other cards cover it $output .= '
'; diff --git a/libraries/display_create_table.lib.php b/libraries/display_create_table.lib.php index 219b6bc127..ad5e3c69a4 100644 --- a/libraries/display_create_table.lib.php +++ b/libraries/display_create_table.lib.php @@ -63,7 +63,8 @@ function PMA_getHtmlForCreateTable($db) $html .= ' '; $html .= '
'; $html .= __('Number of columns') . ":"; - $html .= ' '; + $html .= ' '; $html .= '
'; $html .= '
'; $html .= ''; From b94026494668af93d4f59117f87777dc0e031bfb Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 11 Nov 2014 17:48:08 +0530 Subject: [PATCH 3/5] Multi byte functions are not needed to match types Signed-off-by: Madhura Jayaratne --- libraries/db_designer.lib.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/db_designer.lib.php b/libraries/db_designer.lib.php index e7a2db717b..a46e912167 100644 --- a/libraries/db_designer.lib.php +++ b/libraries/db_designer.lib.php @@ -709,19 +709,19 @@ function PMA_getDatabaseTables( $html .= ' Date: Tue, 11 Nov 2014 17:57:52 +0530 Subject: [PATCH 4/5] Wrap long js lines Signed-off-by: Madhura Jayaratne --- libraries/display_import.lib.php | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 910d89b551..f804c6e2e2 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -490,12 +490,21 @@ function PMA_getHtmlForImportWithPlugin($upload_id) $html .= ' } else { '; $html .= ' var now = new Date(); '; $html .= ' now = Date.UTC( '; - $html .= ' now.getFullYear(), now.getMonth(), now.getDate(), '; - $html .= ' now.getHours(), now.getMinutes(), now.getSeconds()) '; + $html .= ' now.getFullYear(), '; + $html .= ' now.getMonth(), '; + $html .= ' now.getDate(), '; + $html .= ' now.getHours(), '; + $html .= ' now.getMinutes(), '; + $html .= ' now.getSeconds()) '; $html .= ' + now.getMilliseconds() - 1000; '; - $html .= ' var statustext = PMA_sprintf("' . $statustext_str . '", '; - $html .= ' formatBytes(complete, 1, PMA_messages.strDecimalSeparator), '; - $html .= ' formatBytes(total, 1, PMA_messages.strDecimalSeparator) '; + $html .= ' var statustext = PMA_sprintf('; + $html .= ' "' . $statustext_str . '", '; + $html .= ' formatBytes( '; + $html .= ' complete, 1, PMA_messages.strDecimalSeparator'; + $html .= ' ), '; + $html .= ' formatBytes('; + $html .= ' total, 1, PMA_messages.strDecimalSeparator'; + $html .= ' ) '; $html .= ' ); '; $html .= ' if ($("#importmain").is(":visible")) { '; @@ -526,7 +535,8 @@ function PMA_getHtmlForImportWithPlugin($upload_id) $html .= ' var estimated_time; '; $html .= ' if (minutes > 0) { '; $html .= ' estimated_time = "' . $remaining_min . '"'; - $html .= ' .replace("%MIN", minutes).replace("%SEC", seconds); '; + $html .= ' .replace("%MIN", minutes)'; + $html .= ' .replace("%SEC", seconds); '; $html .= ' } '; $html .= ' else { '; $html .= ' estimated_time = "' . $remaining_second . '"'; @@ -543,10 +553,12 @@ function PMA_getHtmlForImportWithPlugin($upload_id) // show percent in window title $html .= ' if (original_title !== false) { '; - $html .= ' parent.document.title = percent_str + " - " + original_title; '; + $html .= ' parent.document.title '; + $html .= ' = percent_str + " - " + original_title; '; $html .= ' } '; $html .= ' else { '; - $html .= ' document.title = percent_str + " - " + original_title; '; + $html .= ' document.title '; + $html .= ' = percent_str + " - " + original_title; '; $html .= ' } '; $html .= ' $("#statustext").html(statustext); '; $html .= ' } '; From b6f0d923b2303137723c916c8fceee225c00d55d Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Tue, 11 Nov 2014 18:01:58 +0530 Subject: [PATCH 5/5] More long lines Signed-off-by: Madhura Jayaratne --- libraries/plugins/export/ExportSql.class.php | 4 ++-- libraries/plugins/import/ImportSql.class.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index d33236e993..24f00d9973 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -401,8 +401,8 @@ class ExportSql extends ExportPlugin ), 'both' => __( 'both of the above
      Example:' - . ' INSERT INTO tbl_name (col_A,col_B,col_C) VALUES (1,2,3),' - . ' (4,5,6), (7,8,9)' + . ' INSERT INTO tbl_name (col_A,col_B,col_C) VALUES' + . ' (1,2,3), (4,5,6), (7,8,9)' ), 'none' => __( 'neither of the above
      Example:' diff --git a/libraries/plugins/import/ImportSql.class.php b/libraries/plugins/import/ImportSql.class.php index d0b7bc46d9..306d75abba 100644 --- a/libraries/plugins/import/ImportSql.class.php +++ b/libraries/plugins/import/ImportSql.class.php @@ -556,7 +556,8 @@ class ImportSql extends ImportPlugin //Don't look for the SQL delimiter if not found previously //or if it's still after current position. if (null === $firstSqlDelimiter - || (false !== $firstSqlDelimiter && $firstSqlDelimiter < $this->_delimiterPosition) + || (false !== $firstSqlDelimiter + && $firstSqlDelimiter < $this->_delimiterPosition) ) { // the cost of doing this one with preg_match() would be too high $firstSqlDelimiter = $this->_stringFctToUse['strpos'](