mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Treat quotation mark
This commit is contained in:
parent
a247ec8335
commit
46110f0915
1 changed files with 14 additions and 1 deletions
|
|
@ -442,7 +442,14 @@ class VariableBase
|
||||||
$where = '';
|
$where = '';
|
||||||
$params = array();
|
$params = array();
|
||||||
|
|
||||||
// parse the value (text)
|
// flag to mark transformed quotation mark.
|
||||||
|
$escaped_quot = false;
|
||||||
|
// parse the value (text);
|
||||||
|
if (strpos ($value, '"'))
|
||||||
|
{
|
||||||
|
$escaped_quot = true;
|
||||||
|
$value = str_replace('"', '"', $value);
|
||||||
|
}
|
||||||
$keywords = preg_split('/(\([^\)]*\))|("[^"]*")|[\s,]+/', trim($value), 10, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
|
$keywords = preg_split('/(\([^\)]*\))|("[^"]*")|[\s,]+/', trim($value), 10, \PREG_SPLIT_NO_EMPTY | \PREG_SPLIT_DELIM_CAPTURE);
|
||||||
$conditions = array();
|
$conditions = array();
|
||||||
$operators = array('AND', 'OR', '|');
|
$operators = array('AND', 'OR', '|');
|
||||||
|
|
@ -475,6 +482,12 @@ class VariableBase
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($escaped_quot === true)
|
||||||
|
{
|
||||||
|
$value = str_replace('"', '"', $value);
|
||||||
|
$escaped_quot = false;
|
||||||
|
}
|
||||||
|
|
||||||
// process 'AND' or 'OR' operator
|
// process 'AND' or 'OR' operator
|
||||||
if (in_array($item, $operators))
|
if (in_array($item, $operators))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue