mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +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 = '';
|
||||
$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);
|
||||
$conditions = array();
|
||||
$operators = array('AND', 'OR', '|');
|
||||
|
|
@ -475,6 +482,12 @@ class VariableBase
|
|||
continue;
|
||||
}
|
||||
|
||||
if($escaped_quot === true)
|
||||
{
|
||||
$value = str_replace('"', '"', $value);
|
||||
$escaped_quot = false;
|
||||
}
|
||||
|
||||
// process 'AND' or 'OR' operator
|
||||
if (in_array($item, $operators))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue