diff --git a/gis_data_editor.php b/gis_data_editor.php index ab1dc6687d..229e36bdbe 100644 --- a/gis_data_editor.php +++ b/gis_data_editor.php @@ -1,5 +1,24 @@ -
- -
-

-'; +echo ''; +echo '
'; + +echo '

'; printf( - __('Value for the column "%s"'), htmlspecialchars($_REQUEST['field']) + __('Value for the column "%s"'), + htmlspecialchars($_REQUEST['field']) ); echo '

'; + echo ''; // The input field to which the final result should be added @@ -101,40 +123,32 @@ if (isset($_REQUEST['input_name'])) { . htmlspecialchars($_REQUEST['input_name']) . '" />'; } echo PMA_generate_common_hidden_inputs(); -?> - -
' . $visualization; -?>
-
-
-
- /> - -
- - - -
- '; +echo ''; +echo '
'; + +echo ''; +echo ''; + + +echo ''; +echo '
'; +echo ' - - -
- +echo ''; +echo '    '; +echo ''; +echo ''; +echo '
'; +echo ''; + +echo ''; +echo '
'; - -
-'; + . ' value="' . $geom_count . '" />'; } + for ($a = 0; $a < $geom_count; $a++) { + if ($geom_type == 'GEOMETRYCOLLECTION') { - echo('

'); echo __("Geometry"); echo($a + 1 . ':
'); + echo '

'; + echo __("Geometry") . ' ' . ($a + 1) . ': '; + echo '
'; if (isset($gis_data[$a]['gis_type'])) { $type = $gis_data[$a]['gis_type']; } else { $type = $gis_types[0]; } - echo(''; foreach (array_slice($gis_types, 0, 6) as $gis_type) { - echo(''); + echo '>' . $gis_type . ''; } - echo(''); + echo ''; } else { $type = $geom_type; } if ($type == 'POINT') { - echo('
'); echo __("Point"); echo(' :'); -?> - - - -'; + echo __("Point") . ': '; + echo ''; + echo ''; + echo ''; + echo ''; + } elseif ($type == 'MULTIPOINT' || $type == 'LINESTRING') { $no_of_points = isset($gis_data[$a][$type]['no_of_points']) ? $gis_data[$a][$type]['no_of_points'] : 1; @@ -203,22 +224,26 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type]['add_point'])) { $no_of_points++; } - echo(''); + echo ''; for ($i = 0; $i < $no_of_points; $i++) { echo '
'; printf(__('Point %d'), $i + 1); - echo ':'; -?> - - - -' . __("X") . ''; + echo ''; + echo ''; + echo ''; } -?> - "> -'; + } elseif ($type == 'MULTILINESTRING' || $type == 'POLYGON') { $no_of_lines = isset($gis_data[$a][$type]['no_of_lines']) ? $gis_data[$a][$type]['no_of_lines'] : 1; @@ -228,18 +253,18 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type]['add_line'])) { $no_of_lines++; } - echo ''; + echo ''; for ($i = 0; $i < $no_of_lines; $i++) { echo '
'; if ($type == 'MULTILINESTRING') { - echo __("Linestring"); echo ($i + 1) . ':'; + echo __("Linestring") . ' ' . ($i + 1) . ':'; } else { if ($i == 0) { echo __("Outer Ring") . ':'; } else { - echo __("Inner Ring"); echo $i . ':'; + echo __("Inner Ring") . ' ' . $i . ':'; } } @@ -254,26 +279,34 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type][$i]['add_point'])) { $no_of_points++; } - echo ''; + echo ''; for ($j = 0; $j < $no_of_points; $j++) { echo('
'); printf(__('Point %d'), $j + 1); - echo ':'; -?> - - - -' . __("X") . ''; + echo ''; + echo ''; + echo ''; } -?> "> -'; } $caption = ($type == 'MULTILINESTRING') - ? __('Add a linestring') : __('Add an inner ring'); -?>
-'; + echo ''; + } elseif ($type == 'MULTIPOLYGON') { $no_of_polygons = isset($gis_data[$a][$type]['no_of_polygons']) ? $gis_data[$a][$type]['no_of_polygons'] : 1; @@ -283,11 +316,13 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type]['add_polygon'])) { $no_of_polygons++; } - echo(''); + echo ''; for ($k = 0; $k < $no_of_polygons; $k++) { - echo('
'); echo __("Polygon"); echo($k + 1 . ':'); + echo '
'; + echo __("Polygon") . ' ' . ($k + 1) . ':'; $no_of_lines = isset($gis_data[$a][$type][$k]['no_of_lines']) ? $gis_data[$a][$type][$k]['no_of_lines'] : 1; if ($no_of_lines < 1) { @@ -296,15 +331,16 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type][$k]['add_line'])) { $no_of_lines++; } - echo(''); + echo ''; for ($i = 0; $i < $no_of_lines; $i++) { - echo('

'); + echo '

'; if ($i == 0) { echo __("Outer Ring") . ':'; } else { - echo __("Inner Ring"); echo($i . ':'); + echo __("Inner Ring") . ' ' . $i . ':'; } $no_of_points = isset($gis_data[$a][$type][$k][$i]['no_of_points']) @@ -315,54 +351,65 @@ for ($a = 0; $a < $geom_count; $a++) { if (isset($gis_data[$a][$type][$k][$i]['add_point'])) { $no_of_points++; } - echo(''); + echo ''; for ($j = 0; $j < $no_of_points; $j++) { - echo('
'); + echo '
'; printf(__('Point %d'), $j + 1); - echo ':'; -?> - " value="" /> - - " value="" /> -' . __("X") . ''; + echo ''; + echo ''; + echo ''; } -?> " class="add addPoint" value=""> -'; } -?>
" class="add addLine" value="">
-'; + echo ''; + echo '
'; } -?>
" class="add addPolygon" value=""> -'; + echo ''; } } if ($geom_type == 'GEOMETRYCOLLECTION') { -?>

" /> -
'; + echo ''; } -?>
- +echo '
'; +echo ''; -
-
-

-

'; +echo ''; + +echo '

'; +echo '

' . __('Output') . '

'; +echo '

'; echo __( 'Choose "GeomFromText" from the "Function" column and paste the' . ' string below into the "Value" field' -); -?>

- -
-
- -'; +echo '

'; + +echo ''; +echo ''; PMA_Response::getInstance()->addJSON('gis_editor', ob_get_contents()); ob_end_clean(); diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 9cba83659d..c3146ad738 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -56,10 +56,10 @@ function prepareJSVersion() { * @returns the HTML for a data point */ function addDataPoint(pointNumber, prefix) { - return '
' + $.sprintf(PMA_messages['strPointN'], (pointNumber + 1)) + ':' - + '' + return '
' + $.sprintf(PMA_messages['strPointN'], (pointNumber + 1)) + ': ' + + '' + '' - + '' + + '' + ''; } @@ -300,10 +300,10 @@ $(function() { // Add the new linesting of inner ring based on the type var html = '
'; if (type == 'MULTILINESTRING') { - html += PMA_messages['strLineString'] + (noOfLines + 1) + ':'; + html += PMA_messages['strLineString'] + ' ' + (noOfLines + 1) + ':'; var noOfPoints = 2; } else { - html += PMA_messages['strInnerRing'] + noOfLines + ':'; + html += PMA_messages['strInnerRing'] + ' ' + noOfLines + ':'; var noOfPoints = 4; } html += ''; @@ -330,7 +330,7 @@ $(function() { var noOfPolygons = parseInt($noOfPolygonsInput.val()); // Add the new polygon - var html = PMA_messages['strPolygon'] + (noOfPolygons + 1) + ':
'; + var html = PMA_messages['strPolygon'] + ' ' + (noOfPolygons + 1) + ':
'; html += ''; + '
' + PMA_messages['strOuterRing'] + ':'; + ''; @@ -356,7 +356,7 @@ $(function() { var $noOfGeomsInput = $("input[name='" + prefix + "[geom_count]" + "']"); var noOfGeoms = parseInt($noOfGeomsInput.val()); - var html1 = PMA_messages['strGeometry'] + (noOfGeoms + 1) + ':
'; + var html1 = PMA_messages['strGeometry'] + ' ' + (noOfGeoms + 1) + ':
'; var $geomType = $("select[name='gis_data[" + (noOfGeoms - 1) + "][gis_type]']").clone(); $geomType.attr('name', 'gis_data[' + noOfGeoms + '][gis_type]').val('POINT'); var html2 = '
' + PMA_messages['strPoint'] + ' :' diff --git a/libraries/Message.class.php b/libraries/Message.class.php index 93fe1df2c9..cc412ecfac 100644 --- a/libraries/Message.class.php +++ b/libraries/Message.class.php @@ -410,8 +410,7 @@ class PMA_Message /** * set string (does not take effect if raw message is set) * - * @param string $string - * + * @param string $string * @param boolean $sanitize whether to sanitize $string or not * * @return void @@ -427,7 +426,7 @@ class PMA_Message /** * set message type number * - * @param integer $number + * @param integer $number message type number to set * * @return void */ diff --git a/libraries/dbi/drizzle-wrappers.lib.php b/libraries/dbi/drizzle-wrappers.lib.php index 07219f00b5..3f58043849 100644 --- a/libraries/dbi/drizzle-wrappers.lib.php +++ b/libraries/dbi/drizzle-wrappers.lib.php @@ -162,6 +162,7 @@ class PMA_Drizzle extends Drizzle * Wrapper around DrizzleCon class * * Its main task is to wrap results with PMA_DrizzleResult class + * * @package PhpMyAdmin-DBI * @subpackage Drizzle */ @@ -183,6 +184,8 @@ class PMA_DrizzleCon * Constructor * * @param DrizzleCon $dcon + * + * @return void */ public function __construct(DrizzleCon $dcon) { @@ -258,6 +261,7 @@ class PMA_DrizzleCon * * Allows for reading result rows as an associative array and hides complexity * behind buffering. + * * @package PhpMyAdmin-DBI * @subpackage Drizzle */ @@ -313,6 +317,8 @@ class PMA_DrizzleResult * Sets fetch mode * * @param int $fetchMode + * + * @return void */ public function setFetchMode($fetchMode) { @@ -323,6 +329,8 @@ class PMA_DrizzleResult /** * Reads information about columns contained in current result * set into {@see $columns} and {@see $columnNames} arrays + * + * @return void */ private function _readColumns() { @@ -372,6 +380,8 @@ class PMA_DrizzleResult * * @param mixed &$row * @param int $fetchMode + * + * @return void */ private function _transformResultRow(&$row, $fetchMode) { @@ -479,6 +489,8 @@ class PMA_DrizzleResult /** * Frees resources taken by this result + * + * @return void */ public function free() {_dlog(); diff --git a/libraries/dbi/drizzle.dbi.lib.php b/libraries/dbi/drizzle.dbi.lib.php index c7e9ec799e..05ab5769e9 100644 --- a/libraries/dbi/drizzle.dbi.lib.php +++ b/libraries/dbi/drizzle.dbi.lib.php @@ -287,7 +287,7 @@ function PMA_DBI_next_result() /** * Returns a string representing the type of connection used * - * @param PMA_DrizzleCon $link connection object + * @param PMA_DrizzleCon $link connection object * * @return string type of connection used */ @@ -310,7 +310,7 @@ function PMA_DBI_get_host_info($link = null) /** * Returns the version of the Drizzle protocol used * - * @param PMA_DrizzleCon $link connection object + * @param PMA_DrizzleCon $link connection object * * @return int version of the Drizzle protocol used */ @@ -329,6 +329,7 @@ function PMA_DBI_get_proto_info($link = null) /** * returns a string that represents the client library version + * * @return string Drizzle client library version */ function PMA_DBI_get_client_info()