Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/classes/Plugins/Export/ExportPhparray.php')
-rw-r--r--libraries/classes/Plugins/Export/ExportPhparray.php33
1 files changed, 16 insertions, 17 deletions
diff --git a/libraries/classes/Plugins/Export/ExportPhparray.php b/libraries/classes/Plugins/Export/ExportPhparray.php
index 0ae8e66d1f..29753e3386 100644
--- a/libraries/classes/Plugins/Export/ExportPhparray.php
+++ b/libraries/classes/Plugins/Export/ExportPhparray.php
@@ -22,6 +22,8 @@ use function preg_replace;
use function strtr;
use function var_export;
+use const PHP_EOL;
+
/**
* Handles the export for the PHP Array class
*/
@@ -80,11 +82,11 @@ class ExportPhparray extends ExportPlugin
public function exportHeader(): bool
{
$this->export->outputHandler(
- '<?php' . $GLOBALS['crlf']
- . '/**' . $GLOBALS['crlf']
- . ' * Export to PHP Array plugin for PHPMyAdmin' . $GLOBALS['crlf']
- . ' * @version ' . Version::VERSION . $GLOBALS['crlf']
- . ' */' . $GLOBALS['crlf'] . $GLOBALS['crlf']
+ '<?php' . PHP_EOL
+ . '/**' . PHP_EOL
+ . ' * Export to PHP Array plugin for PHPMyAdmin' . PHP_EOL
+ . ' * @version ' . Version::VERSION . PHP_EOL
+ . ' */' . PHP_EOL . PHP_EOL
);
return true;
@@ -111,9 +113,9 @@ class ExportPhparray extends ExportPlugin
}
$this->export->outputHandler(
- '/**' . $GLOBALS['crlf']
+ '/**' . PHP_EOL
. ' * Database ' . $this->commentString(Util::backquote($dbAlias))
- . $GLOBALS['crlf'] . ' */' . $GLOBALS['crlf']
+ . PHP_EOL . ' */' . PHP_EOL
);
return true;
@@ -146,7 +148,6 @@ class ExportPhparray extends ExportPlugin
*
* @param string $db database name
* @param string $table table name
- * @param string $crlf the end of line sequence
* @param string $errorUrl the url to go back in case of error
* @param string $sqlQuery SQL query for obtaining data
* @param array $aliases Aliases of db/table/columns
@@ -154,7 +155,6 @@ class ExportPhparray extends ExportPlugin
public function exportData(
$db,
$table,
- $crlf,
$errorUrl,
$sqlQuery,
array $aliases = []
@@ -197,9 +197,9 @@ class ExportPhparray extends ExportPlugin
$buffer = '';
$record_cnt = 0;
// Output table name as comment
- $buffer .= $crlf . '/* '
+ $buffer .= PHP_EOL . '/* '
. $this->commentString(Util::backquote($db_alias)) . '.'
- . $this->commentString(Util::backquote($table_alias)) . ' */' . $crlf;
+ . $this->commentString(Util::backquote($table_alias)) . ' */' . PHP_EOL;
$buffer .= '$' . $tablefixed . ' = array(';
if (! $this->export->outputHandler($buffer)) {
return false;
@@ -211,9 +211,9 @@ class ExportPhparray extends ExportPlugin
$record_cnt++;
if ($record_cnt == 1) {
- $buffer .= $crlf . ' array(';
+ $buffer .= PHP_EOL . ' array(';
} else {
- $buffer .= ',' . $crlf . ' array(';
+ $buffer .= ',' . PHP_EOL . ' array(';
}
for ($i = 0; $i < $columns_cnt; $i++) {
@@ -231,7 +231,7 @@ class ExportPhparray extends ExportPlugin
$buffer = '';
}
- $buffer .= $crlf . ');' . $crlf;
+ $buffer .= PHP_EOL . ');' . PHP_EOL;
return $this->export->outputHandler($buffer);
}
@@ -241,10 +241,9 @@ class ExportPhparray extends ExportPlugin
*
* @param string $errorUrl the url to go back in case of error
* @param string $sqlQuery the rawquery to output
- * @param string $crlf the end of line sequence
*/
- public function exportRawQuery(string $errorUrl, string $sqlQuery, string $crlf): bool
+ public function exportRawQuery(string $errorUrl, string $sqlQuery): bool
{
- return $this->exportData('', '', $crlf, $errorUrl, $sqlQuery);
+ return $this->exportData('', '', $errorUrl, $sqlQuery);
}
}