diff --git a/browse_foreigners.php b/browse_foreigners.php
index 74e4e993ac..dd9979bc69 100644
--- a/browse_foreigners.php
+++ b/browse_foreigners.php
@@ -223,22 +223,23 @@ if (is_array($foreignData['disp_row'])) {
$val_ordered_current_val = htmlspecialchars($val_ordered_current_val);
$val_ordered_current_val_title = '';
} else {
- $val_ordered_current_val_title =
- htmlspecialchars($val_ordered_current_val);
+ $val_ordered_current_val_title
+ = htmlspecialchars($val_ordered_current_val);
$val_ordered_current_val = htmlspecialchars(
PMA_substr($val_ordered_current_val, 0, $cfg['LimitChars'])
. '...'
- );
+ );
}
if (PMA_strlen($key_ordered_current_val) <= $cfg['LimitChars']) {
$key_ordered_current_val = htmlspecialchars($key_ordered_current_val);
$key_ordered_current_val_title = '';
} else {
- $key_ordered_current_val_title =
- htmlspecialchars($key_ordered_current_val);
- $key_ordered_current_val =
- htmlspecialchars(PMA_substr($key_ordered_current_val, 0,
- $cfg['LimitChars']) . '...');
+ $key_ordered_current_val_title
+ = htmlspecialchars($key_ordered_current_val);
+ $key_ordered_current_val
+ = htmlspecialchars(
+ PMA_substr($key_ordered_current_val, 0, $cfg['LimitChars']) . '...'
+ );
}
if (! empty($data)) {
diff --git a/db_search.php b/db_search.php
index 041242f222..68cb46302a 100644
--- a/db_search.php
+++ b/db_search.php
@@ -314,8 +314,8 @@ foreach ($tables_names_only as $each_table) {
} // end while
echo ' ' . "\n";
-$alter_select =
- '' . __('Select All') . ''
. ' / '
. ' $each_table) {
// Show Summary
if ($is_show_stats) {
list($sum_formatted, $unit) = PMA_formatByteDown($sum_size, 3, 1);
- list($overhead_formatted, $overhead_unit) =
- PMA_formatByteDown($overhead_size, 3, 1);
+ list($overhead_formatted, $overhead_unit)
+ = PMA_formatByteDown($overhead_size, 3, 1);
}
?>
diff --git a/enum_editor.php b/enum_editor.php
index 143d3c436c..10e0ba30a9 100644
--- a/enum_editor.php
+++ b/enum_editor.php
@@ -36,13 +36,15 @@ require_once './libraries/header_meta_style.inc.php';
$value) {
$values[$key] = htmlentities($value);
}
- } else if (isset($_GET['values']) && is_string($_GET['values'])){ // If the values are in a string
+ // If the values are in a string
+ } elseif (isset($_GET['values']) && is_string($_GET['values'])) {
// then this page was called via a link from some external page
$values_string = htmlentities($_GET['values']);
// There is a JS port of the below parser in functions.js
diff --git a/js/functions.js b/js/functions.js
index 829ae58151..b51ef7ce14 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -2722,17 +2722,17 @@ $(document).ready(function() {
});
// slider for choosing how many fields to add
$enum_editor_dialog.find(".slider").slider({
- animate: true,
- range: "min",
- value: 1,
- min: 1,
- max: 9,
- slide: function( event, ui ) {
- $(this).closest('table').find('input[type=submit]').val(
- PMA_messages['enum_addValue'].replace(/%d/, ui.value)
- );
- }
- });
+ animate: true,
+ range: "min",
+ value: 1,
+ min: 1,
+ max: 9,
+ slide: function( event, ui ) {
+ $(this).closest('table').find('input[type=submit]').val(
+ PMA_messages['enum_addValue'].replace(/%d/, ui.value)
+ );
+ }
+ });
// Focus the slider, otherwise it looks nearly transparent
$('.ui-slider-handle').addClass('ui-state-focus');
return false;
diff --git a/js/tbl_structure.js b/js/tbl_structure.js
index c9fd93bf13..651cab00c0 100644
--- a/js/tbl_structure.js
+++ b/js/tbl_structure.js
@@ -301,16 +301,16 @@ $(document).ready(function() {
PMA_convertFootnotesToTooltips($div);
// Add a slider for selecting how many columns to add to the index
$div.find('.slider').slider({
- animate: true,
- value: 1,
- min: 1,
- max: 16,
- slide: function( event, ui ) {
+ animate: true,
+ value: 1,
+ min: 1,
+ max: 16,
+ slide: function( event, ui ) {
$(this).closest('fieldset').find('input[type=submit]').val(
PMA_messages['strAddToIndex'].replace(/%d/, ui.value)
);
- }
- });
+ }
+ });
// Focus the slider, otherwise it looks nearly transparent
$('.ui-slider-handle').addClass('ui-state-focus');
}
diff --git a/libraries/Config.class.php b/libraries/Config.class.php
index 2d4b97840d..8364a65677 100644
--- a/libraries/Config.class.php
+++ b/libraries/Config.class.php
@@ -958,8 +958,8 @@ class PMA_Config
if (substr($pma_absolute_uri, 0, 7) != 'http://'
&& substr($pma_absolute_uri, 0, 8) != 'https://'
) {
- $pma_absolute_uri =
- ($is_https ? 'https' : 'http')
+ $pma_absolute_uri
+ = ($is_https ? 'https' : 'http')
. ':' . (substr($pma_absolute_uri, 0, 2) == '//' ? '' : '//')
. $pma_absolute_uri;
}
diff --git a/libraries/RecentTable.class.php b/libraries/RecentTable.class.php
index 1e858995a5..6642acb835 100644
--- a/libraries/RecentTable.class.php
+++ b/libraries/RecentTable.class.php
@@ -76,9 +76,9 @@ class PMA_RecentTable
public function getFromDb()
{
// Read from phpMyAdmin database, if recent tables is not in session
- $sql_query =
- " SELECT `tables` FROM " . $this->pma_table .
- " WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
+ $sql_query
+ = " SELECT `tables` FROM " . $this->pma_table .
+ " WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
$row = PMA_DBI_fetch_array(PMA_query_as_controluser($sql_query));
if (isset($row[0])) {
@@ -91,15 +91,15 @@ class PMA_RecentTable
/**
* Save recent tables into phpMyAdmin database.
*
- *
+ *
* @return true|PMA_Message
*/
public function saveToDb()
{
$username = $GLOBALS['cfg']['Server']['user'];
- $sql_query =
- " REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
- " VALUES ('" . $username . "', '" . PMA_sqlAddSlashes(json_encode($this->tables)) . "')";
+ $sql_query
+ = " REPLACE INTO " . $this->pma_table . " (`username`, `tables`)" .
+ " VALUES ('" . $username . "', '" . PMA_sqlAddSlashes(json_encode($this->tables)) . "')";
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
@@ -163,7 +163,7 @@ class PMA_RecentTable
$html .= '';
-
+
return $html;
}
diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php
index 4f98a4a60f..b325935114 100644
--- a/libraries/StorageEngine.class.php
+++ b/libraries/StorageEngine.class.php
@@ -274,8 +274,8 @@ class PMA_StorageEngine
if (!empty($storage_engines[$engine])) {
$this->engine = $engine;
$this->title = $storage_engines[$engine]['Engine'];
- $this->comment =
- (isset($storage_engines[$engine]['Comment'])
+ $this->comment
+ = (isset($storage_engines[$engine]['Comment'])
? $storage_engines[$engine]['Comment']
: '');
switch ($storage_engines[$engine]['Support']) {
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 16ccfc3905..a2db8b2075 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -1391,8 +1391,8 @@ class PMA_Table
$max_rows = $GLOBALS['cfg']['Server']['MaxTableUiprefs'];
if ($rows_count > $max_rows) {
$num_rows_to_delete = $rows_count - $max_rows;
- $sql_query =
- ' DELETE FROM ' . $pma_table .
+ $sql_query
+ = ' DELETE FROM ' . $pma_table .
' ORDER BY last_update ASC' .
' LIMIT ' . $num_rows_to_delete;
$success = PMA_DBI_try_query($sql_query, $GLOBALS['controllink']);
diff --git a/libraries/auth/swekey/swekey.auth.lib.php b/libraries/auth/swekey/swekey.auth.lib.php
index f7299d1701..78356fa97a 100644
--- a/libraries/auth/swekey/swekey.auth.lib.php
+++ b/libraries/auth/swekey/swekey.auth.lib.php
@@ -161,12 +161,11 @@ function Swekey_auth_error()
}
} else {
$result = __('No valid authentication key plugged');
- if ($_SESSION['SWEKEY']['CONF_DEBUG'])
- {
+ if ($_SESSION['SWEKEY']['CONF_DEBUG']) {
$result .= "
" . htmlspecialchars($swekey_id);
}
unset($_SESSION['SWEKEY']['CONF_LOADED']); // reload the conf file
- }
+ }
}
} else {
unset($_SESSION['SWEKEY']);
diff --git a/libraries/auth/swekey/swekey.php b/libraries/auth/swekey/swekey.php
index 453437eea5..3c6bd8079a 100644
--- a/libraries/auth/swekey/swekey.php
+++ b/libraries/auth/swekey/swekey.php
@@ -187,33 +187,28 @@ function Swekey_HttpGet($url, &$response_code)
$gSwekeyLastResult = "";
// use curl if available
- if (function_exists('curl_init'))
- {
+ if (function_exists('curl_init')) {
$sess = curl_init($url);
- if (substr($url, 0, 8) == "https://")
- {
+ if (substr($url, 0, 8) == "https://") {
global $gSwekeyCA;
- if (! empty($gSwekeyCA))
- {
- if (file_exists($gSwekeyCA))
- {
- if (! curl_setopt($sess, CURLOPT_CAINFO, $gSwekeyCA))
+ if (! empty($gSwekeyCA)) {
+ if (file_exists($gSwekeyCA)) {
+ if (! curl_setopt($sess, CURLOPT_CAINFO, $gSwekeyCA)) {
error_log("SWEKEY_ERROR:Could not set CA file : ".curl_error($sess));
- else
+ } else {
$caFileOk = true;
- }
- else
+ }
+ } else {
error_log("SWEKEY_ERROR:Could not find CA file $gSwekeyCA getting $url");
+ }
}
curl_setopt($sess, CURLOPT_SSL_VERIFYHOST, '2');
curl_setopt($sess, CURLOPT_SSL_VERIFYPEER, '2');
curl_setopt($sess, CURLOPT_CONNECTTIMEOUT, '20');
curl_setopt($sess, CURLOPT_TIMEOUT, '20');
- }
- else
- {
+ } else {
curl_setopt($sess, CURLOPT_CONNECTTIMEOUT, '3');
curl_setopt($sess, CURLOPT_TIMEOUT, '5');
}
@@ -224,18 +219,16 @@ function Swekey_HttpGet($url, &$response_code)
$curlerr = curl_error($sess);
curl_close($sess);
- if ($response_code == 200)
- {
+ if ($response_code == 200) {
$gSwekeyLastResult = $res;
return $res;
}
- if (! empty($response_code))
- {
+ if (! empty($response_code)) {
$gSwekeyLastError = $response_code;
error_log("SWEKEY_ERROR:Error $gSwekeyLastError ($curlerr) getting $url");
return "";
- }
+ }
$response_code = 408; // Request Timeout
$gSwekeyLastError = $response_code;
@@ -244,28 +237,28 @@ function Swekey_HttpGet($url, &$response_code)
}
// use pecl_http if available
- if (class_exists('HttpRequest'))
- {
+ if (class_exists('HttpRequest')) {
// retry if one of the server is down
- for ($num=1; $num <= 3; $num++ )
- {
+ for ($num=1; $num <= 3; $num++ ) {
$r = new HttpRequest($url);
$options = array('timeout' => '3');
- if (substr($url, 0, 6) == "https:")
- {
+ if (substr($url, 0, 6) == "https:") {
$sslOptions = array();
$sslOptions['verifypeer'] = true;
$sslOptions['verifyhost'] = true;
$capath = __FILE__;
$name = strrchr($capath, '/');
- if (empty($name)) // windows
+ // windows
+ if (empty($name)) {
$name = strrchr($capath, '\\');
+ }
$capath = substr($capath, 0, strlen($capath) - strlen($name) + 1).'musbe-ca.crt';
- if (! empty($gSwekeyCA))
+ if (! empty($gSwekeyCA)) {
$sslOptions['cainfo'] = $gSwekeyCA;
+ }
$options['ssl'] = $sslOptions;
}
@@ -304,8 +297,7 @@ function Swekey_HttpGet($url, &$response_code)
global $http_response_header;
$res = @file_get_contents($url);
$response_code = substr($http_response_header[0], 9, 3); //HTTP/1.0
- if ($response_code == 200)
- {
+ if ($response_code == 200) {
$gSwekeyLastResult = $res;
return $res;
}
@@ -355,51 +347,47 @@ function Swekey_GetFastHalfRndToken()
$cachefile = "";
// We check if we have a valid RT is the session
- if (isset($_SESSION['rnd-token-date']))
- if (time() - $_SESSION['rnd-token-date'] < 30)
+ if (isset($_SESSION['rnd-token-date'])) {
+ if (time() - $_SESSION['rnd-token-date'] < 30) {
$res = $_SESSION['rnd-token'];
+ }
+ }
// If not we try to get it from a temp file (PHP >= 5.2.1 only)
- if (strlen($res) != 32 && $gSwekeyTokenCacheEnabled)
- {
- if (function_exists('sys_get_temp_dir'))
- {
+ if (strlen($res) != 32 && $gSwekeyTokenCacheEnabled) {
+ if (function_exists('sys_get_temp_dir')) {
$tempdir = sys_get_temp_dir();
$cachefile = $tempdir."/swekey-rnd-token-".get_current_user();
$modif = filemtime($cachefile);
- if ($modif != false)
- if (time() - $modif < 30)
- {
+ if ($modif != false) {
+ if (time() - $modif < 30) {
$res = @file_get_contents($cachefile);
- if (strlen($res) != 32)
- $res = "";
- else
- {
- $_SESSION['rnd-token'] = $res;
- $_SESSION['rnd-token-date'] = $modif;
- }
+ if (strlen($res) != 32) {
+ $res = "";
+ } else {
+ $_SESSION['rnd-token'] = $res;
+ $_SESSION['rnd-token-date'] = $modif;
+ }
}
+ }
}
- }
+ }
- // If we don't have a valid RT here we have to get it from the server
- if (strlen($res) != 32)
- {
+ // If we don't have a valid RT here we have to get it from the server
+ if (strlen($res) != 32) {
$res = substr(Swekey_GetHalfRndToken(), 0, 32);
$_SESSION['rnd-token'] = $res;
$_SESSION['rnd-token-date'] = time();
- if (! empty($cachefile))
- {
+ if (! empty($cachefile)) {
// we unlink the file so no possible tempfile race attack
unlink($cachefile);
- $file = fopen($cachefile, "x");
- if ($file != false)
- {
- @fwrite($file, $res);
+ $file = fopen($cachefile, "x");
+ if ($file != false) {
+ @fwrite($file, $res);
@fclose($file);
}
}
- }
+ }
return $res."00000000000000000000000000000000";
}
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index c356b903fc..a142249ccd 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -942,9 +942,12 @@ function PMA_DBI_get_columns_full($database = null, $table = null,
$columns[$column_name]['TABLE_SCHEMA'] = $database;
$columns[$column_name]['TABLE_NAME'] = $table;
$columns[$column_name]['ORDINAL_POSITION'] = $ordinal_position;
- $columns[$column_name]['DATA_TYPE'] =
- substr($columns[$column_name]['COLUMN_TYPE'], 0,
- strpos($columns[$column_name]['COLUMN_TYPE'], '('));
+ $columns[$column_name]['DATA_TYPE']
+ = substr(
+ $columns[$column_name]['COLUMN_TYPE'],
+ 0,
+ strpos($columns[$column_name]['COLUMN_TYPE'], '(')
+ );
/**
* @todo guess CHARACTER_MAXIMUM_LENGTH from COLUMN_TYPE
*/
@@ -955,9 +958,12 @@ function PMA_DBI_get_columns_full($database = null, $table = null,
$columns[$column_name]['CHARACTER_OCTET_LENGTH'] = null;
$columns[$column_name]['NUMERIC_PRECISION'] = null;
$columns[$column_name]['NUMERIC_SCALE'] = null;
- $columns[$column_name]['CHARACTER_SET_NAME'] =
- substr($columns[$column_name]['COLLATION_NAME'], 0,
- strpos($columns[$column_name]['COLLATION_NAME'], '_'));
+ $columns[$column_name]['CHARACTER_SET_NAME']
+ = substr(
+ $columns[$column_name]['COLLATION_NAME'],
+ 0,
+ strpos($columns[$column_name]['COLLATION_NAME'], '_')
+ );
$ordinal_position++;
}
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 1dbe21a9ab..2792644f69 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -20,7 +20,7 @@ $GLOBALS['strLatexStructure'] = __('Structure of table @TABLE@');
*/
if (isset($plugin_list)) {
$hide_structure = false;
- if ($plugin_param['export_type'] == 'table' && !$plugin_param['single_table']) {
+ if ($plugin_param['export_type'] == 'table' && ! $plugin_param['single_table']) {
$hide_structure = true;
}
$plugin_list['latex'] = array(
@@ -36,62 +36,63 @@ if (isset($plugin_list)) {
);
/* what to dump (structure/data/both) */
- $plugin_list['latex']['options'][] =
- array('type' => 'begin_group', 'name' => 'dump_what', 'text' => __('Dump table'));
- $plugin_list['latex']['options'][] =
- array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
+ $plugin_list['latex']['options'][]
+ = array('type' => 'begin_group', 'name' => 'dump_what', 'text' => __('Dump table'));
+ $plugin_list['latex']['options'][]
+ = array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
$plugin_list['latex']['options'][] = array('type' => 'end_group');
/* Structure options */
- if (!$hide_structure) {
- $plugin_list['latex']['options'][] =
- array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'structure_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'structure_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'structure_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
- if (!empty($GLOBALS['cfgRelation']['relation'])) {
- $plugin_list['latex']['options'][] =
- array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
+ if (! $hide_structure) {
+ $plugin_list['latex']['options'][]
+ = array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'structure_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'structure_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'structure_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
+ if (! empty($GLOBALS['cfgRelation']['relation'])) {
+ $plugin_list['latex']['options'][]
+ = array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
}
- $plugin_list['latex']['options'][] =
- array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
- if (!empty($GLOBALS['cfgRelation']['mimework'])) {
- $plugin_list['latex']['options'][] =
- array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
+ $plugin_list['latex']['options'][]
+ = array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
+ if (! empty($GLOBALS['cfgRelation']['mimework'])) {
+ $plugin_list['latex']['options'][]
+ = array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
}
- $plugin_list['latex']['options'][] =
- array('type' => 'end_group');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'end_group');
}
/* Data */
- $plugin_list['latex']['options'][] =
- array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
- $plugin_list['latex']['options'][] =
- array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'data_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'data_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'data_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
- $plugin_list['latex']['options'][] =
- array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
- $plugin_list['latex']['options'][] =
- array('type' => 'end_group');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'data_caption', 'text' => __('Table caption'), 'doc' => 'faq6_27');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'data_continued_caption', 'text' => __('Table caption (continued)'), 'doc' => 'faq6_27');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'data_label', 'text' => __('Label key'), 'doc' => 'faq6_27');
+ $plugin_list['latex']['options'][]
+ = array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
+ $plugin_list['latex']['options'][]
+ = array('type' => 'end_group');
} else {
/**
* Escapes some special characters for use in TeX/LaTeX
*
- * @param string the string to convert
+ * @param string $string the string to convert
*
* @return string the converted string with escape codes
*
* @access private
*/
- function PMA_texEscape($string) {
+ function PMA_texEscape($string)
+ {
$escape = array('$', '%', '{', '}', '&', '#', '_', '^');
$cnt_escape = count($escape);
for ($k=0; $k < $cnt_escape; $k++) {
@@ -107,18 +108,20 @@ if (isset($plugin_list)) {
*
* @access public
*/
- function PMA_exportFooter() {
+ function PMA_exportFooter()
+ {
return true;
}
/**
* Outputs export header
*
- * @return bool Whether it suceeded
+ * @return bool Whether it suceeded
*
- * @access public
+ * @access public
*/
- function PMA_exportHeader() {
+ function PMA_exportHeader()
+ {
global $crlf;
global $cfg;
@@ -127,7 +130,7 @@ if (isset($plugin_list)) {
. '% http://www.phpmyadmin.net' . $crlf
. '%' . $crlf
. '% ' . __('Host') . ': ' . $cfg['Server']['host'];
- if (!empty($cfg['Server']['port'])) {
+ if (! empty($cfg['Server']['port'])) {
$head .= ':' . $cfg['Server']['port'];
}
$head .= $crlf
@@ -140,12 +143,14 @@ if (isset($plugin_list)) {
/**
* Outputs database header
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBHeader($db) {
+ function PMA_exportDBHeader($db)
+ {
global $crlf;
$head = '% ' . $crlf
. '% ' . __('Database') . ': ' . '\'' . $db . '\'' . $crlf
@@ -156,40 +161,46 @@ if (isset($plugin_list)) {
/**
* Outputs database footer
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBFooter($db) {
+ function PMA_exportDBFooter($db)
+ {
return true;
}
/**
* Outputs CREATE DATABASE statement
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBCreate($db) {
+ function PMA_exportDBCreate($db)
+ {
return true;
}
/**
* Outputs the content of a table in LaTeX table/sideways table environment
*
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
+ {
$result = PMA_DBI_try_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
$columns_cnt = PMA_DBI_num_fields($result);
@@ -198,20 +209,31 @@ if (isset($plugin_list)) {
}
unset($i);
- $buffer = $crlf . '%' . $crlf . '% ' . __('Data') . ': ' . $table . $crlf . '%' . $crlf
- . ' \\begin{longtable}{|';
+ $buffer = $crlf . '%' . $crlf . '% ' . __('Data') . ': ' . $table
+ . $crlf . '%' . $crlf . ' \\begin{longtable}{|';
- for ($index=0;$index<$columns_cnt;$index++) {
- $buffer .= 'l|';
+ for ($index = 0; $index < $columns_cnt; $index++) {
+ $buffer .= 'l|';
}
$buffer .= '} ' . $crlf ;
$buffer .= ' \\hline \\endhead \\hline \\endfoot \\hline ' . $crlf;
if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{' . PMA_expandUserString($GLOBALS['latex_data_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], null, array('table' => $table, 'database' => $db)) . '} \\\\';
+ $buffer .= ' \\caption{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_data_caption'],
+ 'PMA_texEscape',
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\label{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_data_label'],
+ null,
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\\\';
}
- if (!PMA_exportOutputHandler($buffer)) {
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
@@ -219,21 +241,32 @@ if (isset($plugin_list)) {
if (isset($GLOBALS['latex_columns'])) {
$buffer = '\\hline ';
for ($i = 0; $i < $columns_cnt; $i++) {
- $buffer .= '\\multicolumn{1}{|c|}{\\textbf{' . PMA_texEscape(stripslashes($columns[$i])) . '}} & ';
- }
+ $buffer .= '\\multicolumn{1}{|c|}{\\textbf{'
+ . PMA_texEscape(stripslashes($columns[$i])) . '}} & ';
+ }
$buffer = substr($buffer, 0, -2) . '\\\\ \\hline \hline ';
- if (!PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
+ if (! PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
return false;
}
if (isset($GLOBALS['latex_caption'])) {
- if (!PMA_exportOutputHandler('\\caption{' . PMA_expandUserString($GLOBALS['latex_data_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db)) . '} \\\\ ')) return false;
+ if (! PMA_exportOutputHandler(
+ '\\caption{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_data_continued_caption'],
+ 'PMA_texEscape',
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\\\ '
+ )) {
+ return false;
+ }
}
- if (!PMA_exportOutputHandler($buffer . '\\endhead \\endfoot' . $crlf)) {
+ if (! PMA_exportOutputHandler($buffer . '\\endhead \\endfoot' . $crlf)) {
return false;
}
} else {
- if (!PMA_exportOutputHandler('\\\\ \hline')) {
+ if (! PMA_exportOutputHandler('\\\\ \hline')) {
return false;
}
}
@@ -245,7 +278,8 @@ if (isset($plugin_list)) {
// print each row
for ($i = 0; $i < $columns_cnt; $i++) {
if (isset($record[$columns[$i]])
- && (! function_exists('is_null') || !is_null($record[$columns[$i]]))) {
+ && (! function_exists('is_null') || ! is_null($record[$columns[$i]]))
+ ) {
$column_value = PMA_texEscape(stripslashes($record[$columns[$i]]));
} else {
$column_value = $GLOBALS['latex_null'];
@@ -259,13 +293,13 @@ if (isset($plugin_list)) {
}
}
$buffer .= ' \\\\ \\hline ' . $crlf;
- if (!PMA_exportOutputHandler($buffer)) {
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
}
$buffer = ' \\end{longtable}' . $crlf;
- if (!PMA_exportOutputHandler($buffer)) {
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
@@ -277,23 +311,24 @@ if (isset($plugin_list)) {
/**
* Outputs table's structure
*
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param bool $do_relation whether to include relation comments
- * @param bool $do_comments whether to include the pmadb-style column comments
- * as comments in the structure; this is deprecated
- * but the parameter is left here because export.php
- * calls PMA_exportStructure() also for other export
- * types which use this parameter
- * @param bool $do_mime whether to include mime comments
- * @param bool $dates whether to include creation/update/check dates
- * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
- * @param string $export_type 'server', 'database', 'table'
- * @return bool Whether it suceeded
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param bool $do_relation whether to include relation comments
+ * @param bool $do_comments whether to include the pmadb-style column comments
+ * as comments in the structure; this is deprecated
+ * but the parameter is left here because export.php
+ * calls PMA_exportStructure() also for other export
+ * types which use this parameter
+ * @param bool $do_mime whether to include mime comments
+ * @param bool $dates whether to include creation/update/check dates
+ * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
+ * @param string $export_type 'server', 'database', 'table'
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
{
@@ -316,7 +351,7 @@ if (isset($plugin_list)) {
PMA_DBI_select_db($db);
// Check if we can use Relations
- if ($do_relation && !empty($cfgRelation['relation'])) {
+ if ($do_relation && ! empty($cfgRelation['relation'])) {
// Find which tables are related with the current one and write it in
// an array
$res_rel = PMA_getForeigners($db, $table);
@@ -333,9 +368,9 @@ if (isset($plugin_list)) {
/**
* Displays the table structure
*/
- $buffer = $crlf . '%' . $crlf . '% ' . __('Structure') . ': ' . $table . $crlf . '%' . $crlf
- . ' \\begin{longtable}{';
- if (!PMA_exportOutputHandler($buffer)) {
+ $buffer = $crlf . '%' . $crlf . '% ' . __('Structure') . ': ' . $table
+ . $crlf . '%' . $crlf . ' \\begin{longtable}{';
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
@@ -356,7 +391,10 @@ if (isset($plugin_list)) {
$buffer = $alignment . '} ' . $crlf ;
$header = ' \\hline ';
- $header .= '\\multicolumn{1}{|c|}{\\textbf{' . __('Column') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Type') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Null') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Default') . '}}';
+ $header .= '\\multicolumn{1}{|c|}{\\textbf{' . __('Column')
+ . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Type')
+ . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Null')
+ . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Default') . '}}';
if ($do_relation && $have_rel) {
$header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . __('Links to') . '}}';
}
@@ -371,19 +409,34 @@ if (isset($plugin_list)) {
// Table caption for first page and label
if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_structure_label'], null, array('table' => $table, 'database' => $db))
- . '} \\\\' . $crlf;
+ $buffer .= ' \\caption{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_structure_caption'],
+ 'PMA_texEscape',
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\label{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_structure_label'],
+ null,
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\\\' . $crlf;
}
$buffer .= $header . ' \\\\ \\hline \\hline' . $crlf . '\\endfirsthead' . $crlf;
// Table caption on next pages
if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\\\ ' . $crlf;
+ $buffer .= ' \\caption{'
+ . PMA_expandUserString(
+ $GLOBALS['latex_structure_continued_caption'],
+ 'PMA_texEscape',
+ array('table' => $table, 'database' => $db)
+ )
+ . '} \\\\ ' . $crlf;
}
$buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ' . $crlf;
- if (!PMA_exportOutputHandler($buffer)) {
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
@@ -395,7 +448,7 @@ if (isset($plugin_list)) {
$type = ' ';
}
- if (!isset($row['Default'])) {
+ if (! isset($row['Default'])) {
if ($row['Null'] != 'NO') {
$row['Default'] = 'NULL';
}
@@ -410,7 +463,8 @@ if (isset($plugin_list)) {
if ($do_relation && $have_rel) {
$local_buffer .= "\000";
if (isset($res_rel[$field_name])) {
- $local_buffer .= $res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')';
+ $local_buffer .= $res_rel[$field_name]['foreign_table'] . ' ('
+ . $res_rel[$field_name]['foreign_field'] . ')';
}
}
if ($do_comments && $cfgRelation['commwork']) {
@@ -437,7 +491,7 @@ if (isset($plugin_list)) {
$buffer = str_replace("\000", ' & ', $local_buffer);
$buffer .= ' \\\\ \\hline ' . $crlf;
- if (!PMA_exportOutputHandler($buffer)) {
+ if (! PMA_exportOutputHandler($buffer)) {
return false;
}
} // end while
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index 94a01fc123..7ee3ef77bb 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -28,38 +28,38 @@ if (isset($plugin_list)) {
);
/* what to dump (structure/data/both) */
- $plugin_list['odt']['options'][] =
- array('type' => 'begin_group', 'text' => __('Dump table') , 'name' => 'general_opts');
- $plugin_list['odt']['options'][] =
- array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'begin_group', 'text' => __('Dump table') , 'name' => 'general_opts');
+ $plugin_list['odt']['options'][]
+ = array('type' => 'radio', 'name' => 'structure_or_data', 'values' => array('structure' => __('structure'), 'data' => __('data'), 'structure_and_data' => __('structure and data')));
$plugin_list['odt']['options'][] = array('type' => 'end_group');
/* Structure options */
if (!$hide_structure) {
- $plugin_list['odt']['options'][] =
- array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
+ $plugin_list['odt']['options'][]
+ = array('type' => 'begin_group', 'name' => 'structure', 'text' => __('Object creation options'), 'force' => 'data');
if (!empty($GLOBALS['cfgRelation']['relation'])) {
- $plugin_list['odt']['options'][] =
- array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'bool', 'name' => 'relation', 'text' => __('Display foreign key relationships'));
}
- $plugin_list['odt']['options'][] =
- array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'bool', 'name' => 'comments', 'text' => __('Display comments'));
if (!empty($GLOBALS['cfgRelation']['mimework'])) {
- $plugin_list['odt']['options'][] =
- array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'bool', 'name' => 'mime', 'text' => __('Display MIME types'));
}
- $plugin_list['odt']['options'][] =
- array('type' => 'end_group');
+ $plugin_list['odt']['options'][]
+ = array('type' => 'end_group');
}
/* Data */
- $plugin_list['odt']['options'][] =
- array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
- $plugin_list['odt']['options'][] =
- array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
- $plugin_list['odt']['options'][] =
- array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
- $plugin_list['odt']['options'][] =
- array('type' => 'end_group');
+ $plugin_list['odt']['options'][]
+ = array('type' => 'begin_group', 'name' => 'data', 'text' => __('Data dump options'), 'force' => 'structure');
+ $plugin_list['odt']['options'][]
+ = array('type' => 'bool', 'name' => 'columns', 'text' => __('Put columns names in the first row'));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'text', 'name' => 'null', 'text' => __('Replace NULL with:'));
+ $plugin_list['odt']['options'][]
+ = array('type' => 'end_group');
} else {
$GLOBALS['odt_buffer'] = '';
@@ -68,15 +68,16 @@ if (isset($plugin_list)) {
/**
* Outputs export footer
*
- * @return bool Whether it suceeded
+ * @return bool Whether it suceeded
*
- * @access public
+ * @access public
*/
- function PMA_exportFooter() {
+ function PMA_exportFooter()
+ {
$GLOBALS['odt_buffer'] .= ''
. ''
. '';
- if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.text', $GLOBALS['odt_buffer']))) {
+ if (! PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.text', $GLOBALS['odt_buffer']))) {
return false;
}
return true;
@@ -85,11 +86,12 @@ if (isset($plugin_list)) {
/**
* Outputs export header
*
- * @return bool Whether it suceeded
+ * @return bool Whether it suceeded
*
- * @access public
+ * @access public
*/
- function PMA_exportHeader() {
+ function PMA_exportHeader()
+ {
$GLOBALS['odt_buffer'] .= ''
. ''
. ''
@@ -100,53 +102,62 @@ if (isset($plugin_list)) {
/**
* Outputs database header
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBHeader($db) {
- $GLOBALS['odt_buffer'] .= '' . __('Database') . ' ' . htmlspecialchars($db) . '';
+ function PMA_exportDBHeader($db)
+ {
+ $GLOBALS['odt_buffer'] .= ''
+ . __('Database') . ' ' . htmlspecialchars($db) . '';
return true;
}
/**
* Outputs database footer
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBFooter($db) {
+ function PMA_exportDBFooter($db)
+ {
return true;
}
/**
* Outputs CREATE DATABASE statement
*
- * @param string $db Database name
- * @return bool Whether it suceeded
+ * @param string $db Database name
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportDBCreate($db) {
+ function PMA_exportDBCreate($db)
+ {
return true;
}
/**
* Outputs the content of a table in ODT format
*
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
+ {
global $what;
// Gets the data from the database
@@ -158,7 +169,8 @@ if (isset($plugin_list)) {
$field_flags[$j] = PMA_DBI_field_flags($result, $j);
}
- $GLOBALS['odt_buffer'] .= '' . __('Dumping data for table') . ' ' . htmlspecialchars($table) . '';
+ $GLOBALS['odt_buffer'] .= ''
+ . __('Dumping data for table') . ' ' . htmlspecialchars($table) . '';
$GLOBALS['odt_buffer'] .= '';
$GLOBALS['odt_buffer'] .= '';
@@ -209,30 +221,32 @@ if (isset($plugin_list)) {
/**
* Outputs table's structure
*
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param bool $do_relation whether to include relation comments
- * @param bool $do_comments whether to include the pmadb-style column comments
- * as comments in the structure; this is deprecated
- * but the parameter is left here because export.php
- * calls PMA_exportStructure() also for other export
- * types which use this parameter
- * @param bool $do_mime whether to include mime comments
- * @param bool $dates whether to include creation/update/check dates
- * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
- * @param string $export_type 'server', 'database', 'table'
- * @return bool Whether it suceeded
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param bool $do_relation whether to include relation comments
+ * @param bool $do_comments whether to include the pmadb-style column comments
+ * as comments in the structure; this is deprecated
+ * but the parameter is left here because export.php
+ * calls PMA_exportStructure() also for other export
+ * types which use this parameter
+ * @param bool $do_mime whether to include mime comments
+ * @param bool $dates whether to include creation/update/check dates
+ * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
+ * @param string $export_type 'server', 'database', 'table'
*
- * @access public
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
{
global $cfgRelation;
/* Heading */
- $GLOBALS['odt_buffer'] .= '' . __('Table structure for table') . ' ' . htmlspecialchars($table) . '';
+ $GLOBALS['odt_buffer'] .= ''
+ . __('Table structure for table') . ' ' . htmlspecialchars($table) . '';
/**
* Get the unique keys in the table
diff --git a/libraries/gis/pma_gis_visualization.php b/libraries/gis/pma_gis_visualization.php
index f69d6d288f..32a5728e74 100644
--- a/libraries/gis/pma_gis_visualization.php
+++ b/libraries/gis/pma_gis_visualization.php
@@ -254,8 +254,8 @@ class PMA_GIS_Visualization
{
$this->init();
$scale_data = $this->_scaleDataSet($this->_data);
- $output =
- 'var options = {'
+ $output
+ = 'var options = {'
. 'projection: new OpenLayers.Projection("EPSG:900913"),'
. 'displayProjection: new OpenLayers.Projection("EPSG:4326"),'
. 'units: "m",'
diff --git a/libraries/import/csv.php b/libraries/import/csv.php
index 9d0e2aaa00..019412debd 100644
--- a/libraries/import/csv.php
+++ b/libraries/import/csv.php
@@ -34,12 +34,12 @@ if (isset($plugin_list)) {
);
if ($plugin_param !== 'table') {
- $plugin_list['csv']['options'][] =
- array('type' => 'bool', 'name' => 'col_names', 'text' => __('The first line of the file contains the table column names (if this is unchecked, the first line will become part of the data)'));
+ $plugin_list['csv']['options'][]
+ = array('type' => 'bool', 'name' => 'col_names', 'text' => __('The first line of the file contains the table column names (if this is unchecked, the first line will become part of the data)'));
} else {
$hint = new PMA_Message(__('If the data in each row of the file is not in the same order as in the database, list the corresponding column names here. Column names must be separated by commas and not enclosed in quotations.'));
- $plugin_list['csv']['options'][] =
- array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ') . PMA_showHint($hint));
+ $plugin_list['csv']['options'][]
+ = array('type' => 'text', 'name' => 'columns', 'text' => __('Column names: ') . PMA_showHint($hint));
}
$plugin_list['csv']['options'][] = array('type' => 'end_group');
@@ -129,7 +129,7 @@ if (!$analyze) {
}
}
if (!$found) {
- $message = PMA_Message::error(__('Invalid column (%s) specified! Ensure that columns names are spelled correctly, separated by commas, and not enclosed in quotes.' ));
+ $message = PMA_Message::error(__('Invalid column (%s) specified! Ensure that columns names are spelled correctly, separated by commas, and not enclosed in quotes.'));
$message->addParam($val);
$error = true;
break;
@@ -175,7 +175,8 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
unset($data);
// Do not parse string when we're not at the end and don't have new line inside
if (($csv_new_line == 'auto' && strpos($buffer, "\r") === false && strpos($buffer, "\n") === false)
- || ($csv_new_line != 'auto' && strpos($buffer, $csv_new_line) === false)) {
+ || ($csv_new_line != 'auto' && strpos($buffer, $csv_new_line) === false)
+ ) {
continue;
}
}
@@ -269,7 +270,10 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
}
}
// Are we at the end?
- if ($ch == $csv_new_line || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n")) || ($finished && $i == $len - 1)) {
+ if ($ch == $csv_new_line
+ || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n"))
+ || ($finished && $i == $len - 1)
+ ) {
$csv_finish = true;
}
// Go to next char
@@ -287,7 +291,10 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
}
// End of line
- if ($csv_finish || $ch == $csv_new_line || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n"))) {
+ if ($csv_finish
+ || $ch == $csv_new_line
+ || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n"))
+ ) {
if ($csv_new_line == 'auto' && $ch == "\r") { // Handle "\r\n"
if ($i >= ($len - 2) && !$finished) {
break; // We need more data to decide new line
@@ -377,7 +384,9 @@ if ($analyze) {
$col_names = $col_names[0];
}
- if ((isset($col_names) && count($col_names) != $max_cols) || !isset($col_names)) {
+ if ((isset($col_names) && count($col_names) != $max_cols)
+ || ! isset($col_names)
+ ) {
// Fill out column names
for ($i = 0; $i < $max_cols; ++$i) {
$col_names[] = 'COL '.($i+1);
diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php
index 83d7d77a1c..5af1bf7d50 100644
--- a/libraries/mysql_charsets.lib.php
+++ b/libraries/mysql_charsets.lib.php
@@ -47,8 +47,8 @@ if (! PMA_cacheExists('mysql_charsets', true)) {
}
//$mysql_collations_available[$row['Collation']] = ! isset($row['Compiled']) || $row['Compiled'] == 'Yes';
$mysql_collations_available[$row['COLLATION_NAME']] = true;
- $mysql_charsets_available[$row['CHARACTER_SET_NAME']] =
- !empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']])
+ $mysql_charsets_available[$row['CHARACTER_SET_NAME']]
+ = !empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']])
|| !empty($mysql_collations_available[$row['COLLATION_NAME']]);
}
PMA_DBI_free_result($res);
@@ -118,8 +118,8 @@ function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION,
if (!$mysql_charsets_available[$current_charset]) {
continue;
}
- $current_cs_descr =
- empty($mysql_charsets_descriptions[$current_charset])
+ $current_cs_descr
+ = empty($mysql_charsets_descriptions[$current_charset])
? $current_charset
: $mysql_charsets_descriptions[$current_charset];
diff --git a/libraries/pmd_common.php b/libraries/pmd_common.php
index 0a09d28687..d5f13e2e84 100644
--- a/libraries/pmd_common.php
+++ b/libraries/pmd_common.php
@@ -15,8 +15,8 @@ $GLOBALS['PMD']['STYLE'] = 'default';
$cfgRelation = PMA_getRelationsParam();
-$GLOBALS['script_display_field'] =
- '