Skip to content

Commit

Permalink
improve coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
ruleant committed Jan 19, 2013
1 parent d3ff37d commit 6291ee0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions libraries/Partition.class.php
Expand Up @@ -11,6 +11,7 @@

/**
* base Partition Class
*
* @package PhpMyAdmin
*/
class PMA_Partition
Expand All @@ -24,7 +25,11 @@ class PMA_Partition
static public function getPartitionNames($db, $table)
{
if (PMA_Partition::havePartitioning()) {
return PMA_DBI_fetch_result("select `PARTITION_NAME` from `information_schema`.`PARTITIONS` where `TABLE_SCHEMA` = '" . $db . "' and `TABLE_NAME` = '" . $table . "'");
return PMA_DBI_fetch_result(
"select `PARTITION_NAME` from `information_schema`.`PARTITIONS`"
. " where `TABLE_SCHEMA` = '" . $db
. "' and `TABLE_NAME` = '" . $table . "'"
);
} else {
return array();
}
Expand All @@ -49,11 +54,11 @@ static public function havePartitioning()
if (PMA_MYSQL_INT_VERSION < 50600) {
if (PMA_DBI_fetch_value(
"SHOW VARIABLES LIKE 'have_partitioning';"
)) {
)) {
$have_partitioning = true;
}
}
} else {
// see http://dev.mysql.com/doc/refman/5.6/en/partitioning.html
// see http://dev.mysql.com/doc/refman/5.6/en/partitioning.html
$plugins = PMA_DBI_fetch_result("SHOW PLUGINS");
foreach ($plugins as $key => $value) {
if ($value['Name'] == 'partition') {
Expand All @@ -62,12 +67,10 @@ static public function havePartitioning()
}
}
}
$already_checked = true;
$already_checked = true;
}
}
return $have_partitioning;
}

}

?>

0 comments on commit 6291ee0

Please sign in to comment.