mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
commit
af372f900a
1 changed files with 9 additions and 1 deletions
|
|
@ -450,6 +450,10 @@ class VariableBase
|
||||||
|
|
||||||
// flag to mark transformed quotation mark.
|
// flag to mark transformed quotation mark.
|
||||||
$escaped_quot = false;
|
$escaped_quot = false;
|
||||||
|
|
||||||
|
// flag to mark escaped hypen in the quotation block
|
||||||
|
$escaped_hyphen = false;
|
||||||
|
|
||||||
// parse the value (text);
|
// parse the value (text);
|
||||||
if (strpos ($value, '"') !== false)
|
if (strpos ($value, '"') !== false)
|
||||||
{
|
{
|
||||||
|
|
@ -476,6 +480,10 @@ class VariableBase
|
||||||
if (strlen($item) > 2 && (substr($item, 0, 1) === substr($item, -1)) && substr($item, -1) === '"')
|
if (strlen($item) > 2 && (substr($item, 0, 1) === substr($item, -1)) && substr($item, -1) === '"')
|
||||||
{
|
{
|
||||||
$item = substr($item, 1, -1);
|
$item = substr($item, 1, -1);
|
||||||
|
if (substr($item, 0, 1) === '-')
|
||||||
|
{
|
||||||
|
$escaped_hyphen = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif (strlen($item) > 3 && (substr($item, 0, 1) === '-') && (substr($item, 1, 1) === substr($item, -1)) && substr($item, -1) === '"')
|
elseif (strlen($item) > 3 && (substr($item, 0, 1) === '-') && (substr($item, 1, 1) === substr($item, -1)) && substr($item, -1) === '"')
|
||||||
{
|
{
|
||||||
|
|
@ -512,7 +520,7 @@ class VariableBase
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (substr($item, 0, 1) === '-')
|
if (substr($item, 0, 1) === '-' && $escaped_hyphen !== true)
|
||||||
{
|
{
|
||||||
$conditions[] = sprintf('%s NOT LIKE ?', $column);
|
$conditions[] = sprintf('%s NOT LIKE ?', $column);
|
||||||
$item = substr($item, 1);
|
$item = substr($item, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue