diff --git a/prefs_manage.php b/prefs_manage.php
index c15311598e..6de37a9033 100644
--- a/prefs_manage.php
+++ b/prefs_manage.php
@@ -21,7 +21,9 @@ require 'libraries/config/user_preferences.forms.php';
PMA_userprefs_pageinit();
$error = '';
-if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') == 'text_file') {
+if (isset($_POST['submit_export'])
+ && filter_input(INPUT_POST, 'export_type') == 'text_file'
+) {
// export to JSON file
PMA_Response::getInstance()->disable();
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
@@ -78,7 +80,8 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
if (! is_array($config)) {
$error = __('Could not import configuration');
} else {
- // sanitize input values: treat them as though they came from HTTP POST request
+ // sanitize input values: treat them as though
+ // they came from HTTP POST request
$form_display = new FormDisplay();
foreach ($forms as $formset_id => $formset) {
foreach ($formset as $form_name => $form) {
@@ -192,7 +195,9 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
if ($result === true) {
$params = array();
if ($_SESSION['PMA_Theme_Manager']->theme->getId() != 'original') {
- $GLOBALS['PMA_Config']->removeCookie($_SESSION['PMA_Theme_Manager']->getThemeCookieName());
+ $GLOBALS['PMA_Config']->removeCookie(
+ $_SESSION['PMA_Theme_Manager']->getThemeCookieName()
+ );
unset($_SESSION['PMA_Theme_Manager']);
unset($_SESSION['PMA_Theme']);
$params['reload_left_frame'] = true;
diff --git a/querywindow.php b/querywindow.php
index 62d5854e9b..0f872994d7 100644
--- a/querywindow.php
+++ b/querywindow.php
@@ -124,14 +124,14 @@ $scripts->addFile('common.js');
$scripts->addFile('querywindow.js');
if (PMA_isValid($_REQUEST['auto_commit'], 'identical', 'true')) {
- $scripts->addEvent('load','PMA_queryAutoCommit');
+ $scripts->addEvent('load', 'PMA_queryAutoCommit');
}
if (PMA_isValid($_REQUEST['init'])) {
- $scripts->addEvent('load','PMA_querywindowResize');
+ $scripts->addEvent('load', 'PMA_querywindowResize');
}
// always set focus to the textarea
if ($querydisplay_tab == 'sql' || $querydisplay_tab == 'full') {
- $scripts->addEvent('load','PMA_querywindowSetFocus');
+ $scripts->addEvent('load', 'PMA_querywindowSetFocus');
}
echo '
';
diff --git a/schema_export.php b/schema_export.php
index 26d2c6e6ae..ac399a2131 100644
--- a/schema_export.php
+++ b/schema_export.php
@@ -56,7 +56,11 @@ PMA_DBI_select_db($db);
$path = PMA_securePath(ucfirst($export_type));
if (!file_exists('libraries/schema/' . $path . '_Relation_Schema.class.php')) {
- PMA_Export_Relation_Schema::dieSchema($_POST['chpage'], $export_type, __('File doesn\'t exist'));
+ PMA_Export_Relation_Schema::dieSchema(
+ $_POST['chpage'],
+ $export_type,
+ __('File doesn\'t exist')
+ );
}
require "libraries/schema/".$path."_Relation_Schema.class.php";
$obj_schema = eval("new PMA_".$path."_Relation_Schema();");
diff --git a/server_binlog.php b/server_binlog.php
index ee616f35c3..e3d25dcd07 100644
--- a/server_binlog.php
+++ b/server_binlog.php
@@ -29,7 +29,9 @@ if (! isset($_REQUEST['pos'])) {
$pos = (int) $_REQUEST['pos'];
}
-if (! isset($_REQUEST['log']) || ! array_key_exists($_REQUEST['log'], $binary_logs)) {
+if (! isset($_REQUEST['log'])
+ || ! array_key_exists($_REQUEST['log'], $binary_logs)
+) {
$_REQUEST['log'] = '';
} else {
$url_params['log'] = $_REQUEST['log'];
diff --git a/tbl_get_field.php b/tbl_get_field.php
index 8d6d80aa3c..76d75f7c4f 100644
--- a/tbl_get_field.php
+++ b/tbl_get_field.php
@@ -32,7 +32,9 @@ if (!PMA_DBI_get_columns($db, $table)) {
}
/* Grab data */
-$sql = 'SELECT ' . $common_functions->backquote($transform_key) . ' FROM ' . $common_functions->backquote($table) . ' WHERE ' . $where_clause . ';';
+$sql = 'SELECT ' . $common_functions->backquote($transform_key)
+ . ' FROM ' . $common_functions->backquote($table)
+ . ' WHERE ' . $where_clause . ';';
$result = PMA_DBI_fetch_value($sql);
/* Check return code */
diff --git a/tbl_gis_visualization.php b/tbl_gis_visualization.php
index 73ea8210ab..3f05989c77 100644
--- a/tbl_gis_visualization.php
+++ b/tbl_gis_visualization.php
@@ -90,11 +90,14 @@ if (isset($_REQUEST['saveToFile'])) {
exit();
}
-$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8) ? false : true;
+$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
+ ? false : true;
$format = $svg_support ? 'svg' : 'png';
// get the chart and settings after chart generation
-$visualization = PMA_GIS_visualizationResults($data, $visualizationSettings, $format);
+$visualization = PMA_GIS_visualizationResults(
+ $data, $visualizationSettings, $format
+);
/**
* Displays the page
diff --git a/tbl_indexes.php b/tbl_indexes.php
index 2f5fd72fe2..d569f7443f 100644
--- a/tbl_indexes.php
+++ b/tbl_indexes.php
@@ -22,7 +22,7 @@ foreach (PMA_DBI_get_columns_full($db, $table) as $row) {
$tmp[2] = substr(
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
);
- $fields[$row['Field']] = $tmp[1] . '('
+ $fields[$row['Field']] = $tmp[1] . '('
. str_replace(',', ', ', $tmp[2]) . ')';
} else {
$fields[$row['Field']] = $row['Type'];
@@ -50,39 +50,41 @@ if (isset($_REQUEST['do_save_data'])) {
$error = false;
// $sql_query is the one displayed in the query box
- $sql_query = 'ALTER TABLE ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
+ $sql_query = 'ALTER TABLE ' . $common_functions->backquote($db)
+ . '.' . $common_functions->backquote($table);
// Drops the old index
if (! empty($_REQUEST['old_index'])) {
if ($_REQUEST['old_index'] == 'PRIMARY') {
$sql_query .= ' DROP PRIMARY KEY,';
} else {
- $sql_query .= ' DROP INDEX '
+ $sql_query .= ' DROP INDEX '
. $common_functions->backquote($_REQUEST['old_index']) . ',';
}
} // end if
// Builds the new one
switch ($index->getType()) {
- case 'PRIMARY':
- if ($index->getName() == '') {
- $index->setName('PRIMARY');
- } elseif ($index->getName() != 'PRIMARY') {
- $error = PMA_Message::error(__(
- 'The name of the primary key must be "PRIMARY"!'));
- }
- $sql_query .= ' ADD PRIMARY KEY';
- break;
- case 'FULLTEXT':
- case 'UNIQUE':
- case 'INDEX':
- case 'SPATIAL':
- if ($index->getName() == 'PRIMARY') {
- $error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
- }
- $sql_query .= ' ADD ' . $index->getType() . ' '
- . ($index->getName() ? $common_functions->backquote($index->getName()) : '');
- break;
+ case 'PRIMARY':
+ if ($index->getName() == '') {
+ $index->setName('PRIMARY');
+ } elseif ($index->getName() != 'PRIMARY') {
+ $error = PMA_Message::error(
+ __('The name of the primary key must be "PRIMARY"!')
+ );
+ }
+ $sql_query .= ' ADD PRIMARY KEY';
+ break;
+ case 'FULLTEXT':
+ case 'UNIQUE':
+ case 'INDEX':
+ case 'SPATIAL':
+ if ($index->getName() == 'PRIMARY') {
+ $error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
+ }
+ $sql_query .= ' ADD ' . $index->getType() . ' '
+ . ($index->getName() ? $common_functions->backquote($index->getName()) : '');
+ break;
} // end switch
$index_fields = array();
@@ -103,8 +105,9 @@ if (isset($_REQUEST['do_save_data'])) {
if (! $error) {
PMA_DBI_query($sql_query);
- $message = PMA_Message::success(__(
- 'Table %1$s has been altered successfully'));
+ $message = PMA_Message::success(
+ __('Table %1$s has been altered successfully')
+ );
$message->addParam($table);
if ($GLOBALS['is_ajax_request'] == true) {
@@ -161,8 +164,8 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
?>