';
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'])) {
?>
'
+ );
+ }
+
+ /**
+ * Test for _getResultDivs
+ */
+ public function testGetResultDivs(){
+ $this->assertEquals(
+ $this->_callProtectedFunction(
+ '_getResultDivs',
+ array()
+ ),
+ '
'
+ );
+ }
+
+}