resolves gh-91 to insure that int and floats are not set as strings in SQL defaults

This commit is contained in:
2017-06-05 21:18:32 +01:00
parent 5e36ede2ac
commit 3ad9ae8b8f
271 changed files with 485 additions and 474 deletions

View File

@ -4864,7 +4864,14 @@ class Interpretation extends Fields
}
elseif ($default == 0 || $default)
{
$default = $data['null_switch']." DEFAULT '".$default."'";
if (is_numeric($default))
{
$default = $data['null_switch']." DEFAULT ".$default;
}
else
{
$default = $data['null_switch']." DEFAULT '".$default."'";
}
}
elseif ($data['null_switch'] === 'NULL')
{
@ -6814,8 +6821,8 @@ class Interpretation extends Fields
* @param $parentKey
* @param $parent_key
* @param $globalKey
* @return string
*/
* @return string
*/
public function setListQueryLinked($viewName_single, $viewName_list, $functionName, $key, $_key, $parentKey, $parent_key, $globalKey)
{
// check if this view has category added

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage componentbuilder.php
@ -2219,7 +2219,8 @@ abstract class ComponentbuilderHelper
// If you don't need to handle multi-byte characters
// you can use preg_replace rather than mb_ereg_replace
// Thanks @Łukasz Rysiak!
$string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string);
// $string = mb_ereg_replace("([^\w\s\d\-_\(\)])", '', $string);
$string = preg_replace("([^\w\s\d\-_\(\)])", '', $string);
// http://stackoverflow.com/a/2021729/1429677
return preg_replace('/\s+/', ' ', $string);
}

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage headercheck.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage batch_.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage indenter.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage js.php

View File

@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.4.6
@build 28th May, 2017
@build 5th June, 2017
@created 30th April, 2015
@package Component Builder
@subpackage minify.php