Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
989d6b4f23
@ -2807,7 +2807,7 @@ if ($cfg['ShowFunctionFields']) {
|
||||
'FUNC_CHAR' => '',
|
||||
'FUNC_DATE' => '',
|
||||
'FUNC_NUMBER' => '',
|
||||
'FUNC_SPATIAL' => 'GeomFromText',
|
||||
'FUNC_SPATIAL' => 'GeomFromText',
|
||||
'FUNC_UUID' => 'UUID',
|
||||
'first_timestamp' => 'NOW',
|
||||
);
|
||||
|
||||
@ -32,7 +32,7 @@ if (isset($plugin_list)) {
|
||||
'type' => 'begin_group',
|
||||
'name' => 'structure',
|
||||
'text' => __('Object creation options (all are recommended)')
|
||||
);
|
||||
);
|
||||
if (!PMA_DRIZZLE) {
|
||||
$plugin_list['xml']['options'][] = array(
|
||||
'type' => 'bool',
|
||||
@ -43,7 +43,7 @@ if (isset($plugin_list)) {
|
||||
'type' => 'bool',
|
||||
'name' => 'export_procedures',
|
||||
'text' => __('Procedures')
|
||||
);
|
||||
);
|
||||
}
|
||||
$plugin_list['xml']['options'][] = array(
|
||||
'type' => 'bool',
|
||||
@ -60,8 +60,8 @@ if (isset($plugin_list)) {
|
||||
'type' => 'bool',
|
||||
'name' => 'export_views',
|
||||
'text' => __('Views')
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
$plugin_list['xml']['options'][] = array(
|
||||
'type' => 'end_group'
|
||||
);
|
||||
|
||||
@ -119,12 +119,12 @@ class PMA_Scatter_Plot
|
||||
$this->_dataPoints = array();
|
||||
if (! is_null($this->_userSpecifiedSettings)) {
|
||||
foreach (array_keys($this->_userSpecifiedSettings) as $key){
|
||||
$this->_settings[$key] = $this->_userSpecifiedSettings[$key];
|
||||
}
|
||||
$this->_settings[$key] = $this->_userSpecifiedSettings[$key];
|
||||
}
|
||||
}
|
||||
if ($this->_settings['dataLabel'] == '') {
|
||||
$labels = array_keys($this->_data[0]);
|
||||
$this->_settings['dataLabel'] = $labels[0];
|
||||
$labels = array_keys($this->_data[0]);
|
||||
$this->_settings['dataLabel'] = $labels[0];
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ class PMA_Scatter_Plot
|
||||
. ' height="' . $this->_settings['height'] . '">';
|
||||
$output .= '<g id="groupPanel">';
|
||||
$output .= '<defs>
|
||||
<path id="myTextPath1"
|
||||
<path id="myTextPath1"
|
||||
d="M10,190 L10,50"/>
|
||||
<path id="myTextPath2"
|
||||
d="M250,10 L370,10"/>
|
||||
@ -194,41 +194,38 @@ class PMA_Scatter_Plot
|
||||
// Currently assuming only numeric fields are selected
|
||||
$coordinates = array();
|
||||
foreach ($data as $row) {
|
||||
$coordinates[0][] = $row[$xField];
|
||||
$coordinates[1][] = $row[$yField];
|
||||
}
|
||||
$coordinates[0][] = $row[$xField];
|
||||
$coordinates[1][] = $row[$yField];
|
||||
}
|
||||
for ($i = 0 ; $i < 2 ; $i++) {
|
||||
|
||||
$maxC = ($i == 0) ? 500 : 320;
|
||||
|
||||
if( !is_numeric($coordinates[$i][0])) {
|
||||
if ( !is_numeric($coordinates[$i][0])) {
|
||||
$uniqueC = array_unique($coordinates[$i]);
|
||||
$countC = count(array_unique($coordinates[$i]));
|
||||
$map = $tmp = array();
|
||||
$map = $tmp = array();
|
||||
foreach ($uniqueC as $uc) {
|
||||
$tmp[] = $uc;
|
||||
}
|
||||
$tmp[] = $uc;
|
||||
}
|
||||
for ($j = 0 ; $j < $countC ; $j++) {
|
||||
$map[$tmp[$j]] = 20 + $j * $maxC / $countC;
|
||||
}
|
||||
for($j = 0 ; $j < count($coordinates[$i]) ; $j++) {
|
||||
$coordinates[$i][$j] = $map[$coordinates[$i][$j]];
|
||||
}
|
||||
|
||||
}
|
||||
elseif (is_numeric($coordinates[$i][0])) {
|
||||
|
||||
$maxC = max($coordinates[$i]);
|
||||
for($j = 0 ; $j < count($coordinates[$i]) ; $j++) {
|
||||
|
||||
if ($i == 0)
|
||||
$coordinates[$i][$j] = 20 + 500 * $coordinates[$i][$j] / $maxC;
|
||||
else
|
||||
$coordinates[$i][$j] = 20 + 320 * (1 - $coordinates[$i][$j] / $maxC);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $coordinates;
|
||||
}
|
||||
for ($j = 0 ; $j < count($coordinates[$i]) ; $j++) {
|
||||
$coordinates[$i][$j] = $map[$coordinates[$i][$j]];
|
||||
}
|
||||
}
|
||||
else if (is_numeric($coordinates[$i][0])) {
|
||||
$maxC = max($coordinates[$i]);
|
||||
for ($j = 0 ; $j < count($coordinates[$i]) ; $j++) {
|
||||
if ($i == 0) {
|
||||
$coordinates[$i][$j] = 20 + 500 * $coordinates[$i][$j] / $maxC;
|
||||
} else {
|
||||
$coordinates[$i][$j] = 20 + 320 * (1 - $coordinates[$i][$j] / $maxC);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $coordinates;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -238,15 +235,13 @@ class PMA_Scatter_Plot
|
||||
* @param int $color_number Start index to the color array
|
||||
* @param array $scale_data Data related to scaling
|
||||
* @param string $label Label for the data points
|
||||
* @param image $results Image object in the case of png
|
||||
*
|
||||
* @return the formatted array of data.
|
||||
* @return string the formatted array of data.
|
||||
*/
|
||||
private function _prepareDataSet($data, $color_number, $scale_data, $label)
|
||||
{
|
||||
$result = '';
|
||||
// loop through the rows
|
||||
for($i = 0 ; $i < count($data) ; $i++) {
|
||||
for ($i = 0 ; $i < count($data) ; $i++) {
|
||||
|
||||
$index = $color_number % sizeof($this->_settings['colors']);
|
||||
|
||||
@ -255,11 +250,10 @@ class PMA_Scatter_Plot
|
||||
$options = array('color' => $this->_settings['colors'][$index], 'id' => $i);
|
||||
$this->_dataPoints[] = $data_element;
|
||||
|
||||
$result .= $data_element->prepareRowAsSVG($options);
|
||||
$result .= $data_element->prepareRowAsSVG($options);
|
||||
$color_number++;
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,9 +25,8 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
|
||||
public function __construct($cx, $cy, $label, $dataRow)
|
||||
{
|
||||
parent::__construct($label,$dataRow);
|
||||
$this->cx = $cx;
|
||||
$this->cy = $cy;
|
||||
|
||||
$this->cx = $cx;
|
||||
$this->cy = $cy;
|
||||
}
|
||||
|
||||
public function prepareRowAsSVG($options)
|
||||
@ -39,10 +38,8 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
|
||||
* Prepares and returns the code related to a row in the query result as SVG.
|
||||
*
|
||||
* @param array $options Array containing options related to properties of the point
|
||||
*
|
||||
* @return the code related to a row in the query result.
|
||||
*/
|
||||
|
||||
protected function prepareSvg($options)
|
||||
{
|
||||
$point_options = array(
|
||||
|
||||
@ -162,9 +162,9 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params);
|
||||
|
||||
$foreignData = PMA_getForeignData($foreigners, $field, false, '', '');
|
||||
|
||||
echo PMA_getForeignFields_Values($foreigners, $foreignData, $field, $fields_type, $i, $db, $table, $titles,$GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true);
|
||||
echo PMA_getForeignFields_Values($foreigners, $foreignData, $field, $fields_type, $i, $db, $table, $titles,$GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true);
|
||||
|
||||
?>
|
||||
?>
|
||||
<input type="hidden" name="names[<?php echo $i; ?>]"
|
||||
value="<?php echo htmlspecialchars($fields_list[$i]); ?>" />
|
||||
<input type="hidden" name="types[<?php echo $i; ?>]"
|
||||
@ -290,16 +290,15 @@ else {
|
||||
reset($func);
|
||||
while (list($i, $func_type) = each($func)) {
|
||||
|
||||
list($charsets[$i]) = explode('_', $collations[$i]);
|
||||
list($charsets[$i]) = explode('_', $collations[$i]);
|
||||
$unaryFlag = (isset($GLOBALS['cfg']['UnaryOperators'][$func_type]) && $GLOBALS['cfg']['UnaryOperators'][$func_type] == 1) ? true : false;
|
||||
|
||||
$tmp_geom_func = isset($geom_func[$i]) ? $geom_func[$i] : null;
|
||||
$whereClause = PMA_tbl_search_getWhereClause($fields[$i],$names[$i], $types[$i], $collations[$i], $func_type, $unaryFlag, $tmp_geom_func);
|
||||
$whereClause = PMA_tbl_search_getWhereClause($fields[$i],$names[$i], $types[$i], $collations[$i], $func_type, $unaryFlag, $tmp_geom_func);
|
||||
|
||||
if($whereClause)
|
||||
$w[] = $whereClause;
|
||||
if($whereClause)
|
||||
$w[] = $whereClause;
|
||||
} // end for
|
||||
//print_r($w);
|
||||
if ($w) {
|
||||
$sql_query .= ' WHERE ' . implode(' AND ', $w);
|
||||
}
|
||||
|
||||
@ -507,8 +507,8 @@ foreach ($fields as $row) {
|
||||
}
|
||||
} ?>
|
||||
</div>
|
||||
<?php if (!PMA_DRIZZLE) { ?>
|
||||
<div class="action_spatial">
|
||||
<?php if (!PMA_DRIZZLE) { ?>
|
||||
<div class="action_spatial">
|
||||
<?php
|
||||
if (isset($spatial_enabled)) {
|
||||
if ($spatial_enabled) { ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user