Skip to content

Commit

Permalink
Apply text length on geometry data
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Sep 9, 2012
1 parent 944f141 commit 66d537c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adminer/select.inc.php
Expand Up @@ -18,7 +18,7 @@
$name = $adminer->fieldName($field);
if (isset($field["privileges"]["select"]) && $name != "") {
$columns[$key] = html_entity_decode(strip_tags($name));
if (ereg('text|lob', $field["type"])) {
if (ereg('text|lob|geometry|point|linestring|polygon', $field["type"])) {
$text_length = $adminer->selectLengthProcess();
}
}
Expand Down Expand Up @@ -349,7 +349,7 @@
if ($val === "") { // === - may be int
$val = " ";
} elseif (is_utf8($val)) {
if ($text_length != "" && ereg('text|blob', $field["type"])) {
if ($text_length != "" && ereg('text|lob|geometry|point|linestring|polygon', $field["type"])) {
$val = shorten_utf8($val, max(0, +$text_length)); // usage of LEFT() would reduce traffic but complicate query - expected average speedup: .001 s VS .01 s on local network
} else {
$val = h($val);
Expand Down

0 comments on commit 66d537c

Please sign in to comment.