Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jun 11, 2013
2 parents b7fb315 + 22e0b6a commit a03a359
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 16 deletions.
6 changes: 4 additions & 2 deletions libraries/plugins/export/ExportCsv.class.php
Expand Up @@ -257,7 +257,9 @@ public function exportData($db, $table, $crlf, $error_url, $sql_query)
$schema_insert = '';
for ($i = 0; $i < $fields_cnt; $i++) {
if ($csv_enclosed == '') {
$schema_insert .= stripslashes($GLOBALS['dbi']->fieldName($result, $i));
$schema_insert .= stripslashes(
$GLOBALS['dbi']->fieldName($result, $i)
);
} else {
$schema_insert .= $csv_enclosed
. str_replace(
Expand Down Expand Up @@ -344,4 +346,4 @@ public function exportData($db, $table, $crlf, $error_url, $sql_query)
return true;
}
}
?>
?>
6 changes: 4 additions & 2 deletions libraries/plugins/import/ImportSql.class.php
Expand Up @@ -152,7 +152,9 @@ public function doImport(&$sql_data = array())
$sql_modes[] = 'NO_AUTO_VALUE_ON_ZERO';
}
if (count($sql_modes) > 0) {
$GLOBALS['dbi']->tryQuery('SET SQL_MODE="' . implode(',', $sql_modes) . '"');
$GLOBALS['dbi']->tryQuery(
'SET SQL_MODE="' . implode(',', $sql_modes) . '"'
);
}
unset($sql_modes);

Expand Down Expand Up @@ -437,4 +439,4 @@ public function doImport(&$sql_data = array())
PMA_importRunQuery('', substr($buffer, 0, $len), false, $sql_data);
PMA_importRunQuery('', '', false, $sql_data);
}
}
}
4 changes: 3 additions & 1 deletion libraries/tbl_views.lib.php
Expand Up @@ -27,7 +27,9 @@ function PMA_getColumnMap($sql_query, $view_columns)

if ($real_source_result !== false) {

$real_source_fields_meta = $GLOBALS['dbi']->getFieldsMeta($real_source_result);
$real_source_fields_meta = $GLOBALS['dbi']->getFieldsMeta(
$real_source_result
);

if (count($real_source_fields_meta) > 0) {

Expand Down
4 changes: 3 additions & 1 deletion tbl_addfield.php
Expand Up @@ -59,7 +59,9 @@
// on this db.
$GLOBALS['dbi']->selectDb($db)
or PMA_Util::mysqlDie(
$GLOBALS['dbi']->getError(), 'USE ' . PMA_Util::backquote($db), '', $err_url
$GLOBALS['dbi']->getError(),
'USE ' . PMA_Util::backquote($db), '',
$err_url
);
$sql_query = 'ALTER TABLE ' .
PMA_Util::backquote($table) . ' ' . $sql_statement . ';';
Expand Down
18 changes: 9 additions & 9 deletions test/classes/PMA_Index_test.php
Expand Up @@ -35,7 +35,7 @@ public function setup()
$this->_params['Index_comment'] = "PMA_Index_comment";
$this->_params['Non_unique'] = "PMA_Non_unique";
$this->_params['Packed'] = "PMA_Packed";

//test add columns
$column1 = array("Column_name"=>"column1","Seq_in_index"=>"index1",
"Collation"=>"Collation1","Cardinality"=>"Cardinality1",
Expand Down Expand Up @@ -94,7 +94,7 @@ public function testConstructor()
'INDEX',
$index->getChoice()
);

}

/**
Expand Down Expand Up @@ -141,16 +141,16 @@ public function testIsUniquer()
public function testAddColumns()
{
$index = new PMA_Index();
$index->addColumns($this->_params['columns']);
$this->assertTrue($index->hasColumn("column1"));
$this->assertTrue($index->hasColumn("column2"));
$index->addColumns($this->_params['columns']);
$this->assertTrue($index->hasColumn("column1"));
$this->assertTrue($index->hasColumn("column2"));
$this->assertTrue($index->hasColumn("column3"));
$this->assertEquals(
3,
$index->getColumnCount()
);
}

/**
* Test for get Name & set Name
*
Expand All @@ -165,17 +165,17 @@ public function testName()
$index->getName()
);
}

/**
* Test for PMA_Index_Column
*
* @return void
*/
public function testPMA_Index_Column()
public function testColumns()
{
$index = new PMA_Index();
$index->addColumns($this->_params['columns']);

$index_columns = $index->getColumns();
$index_column = $index_columns['column1'];
$this->assertEquals(
Expand Down
2 changes: 1 addition & 1 deletion test/classes/PMA_Types_MySQL_test.php
Expand Up @@ -38,7 +38,7 @@ protected function setUp()
/**
* Test for getTypeDescription
*
* @param string $type The data type to get a description.
* @param string $type The data type to get a description.
*
* @return void
*
Expand Down
10 changes: 10 additions & 0 deletions test/libraries/core/PMA_securePath_test.php
Expand Up @@ -9,8 +9,18 @@

require_once 'libraries/core.lib.php';

/**
* Test for securing path.
*
* @package PhpMyAdmin-test
*/
class PMA_SecurePath extends PHPUnit_Framework_TestCase
{
/**
* Test for replacing dots.
*
* @return void
*/
public function testReplaceDots()
{
$this->assertEquals(
Expand Down
1 change: 1 addition & 0 deletions themes.php
@@ -1,6 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Displays list of themes.
*
* @package PhpMyAdmin
*/
Expand Down
1 change: 1 addition & 0 deletions transformation_overview.php
@@ -1,6 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Lists available transformation plugins
*
* @package PhpMyAdmin
*/
Expand Down
1 change: 1 addition & 0 deletions view_operations.php
@@ -1,6 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* View manipulations
*
* @package PhpMyAdmin
*/
Expand Down

0 comments on commit a03a359

Please sign in to comment.