mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 09:32:15 +09:00
code refining2
This commit is contained in:
parent
9e847dadcb
commit
21bf8cdaca
1 changed files with 3 additions and 4 deletions
|
|
@ -451,7 +451,7 @@ class VariableBase
|
||||||
|
|
||||||
// parse the value (text);
|
// parse the value (text);
|
||||||
$value = str_replace('"', '"', $value);
|
$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', '|');
|
||||||
// loop the parsed keywords or operators
|
// loop the parsed keywords or operators
|
||||||
|
|
@ -484,9 +484,9 @@ class VariableBase
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$value = str_replace('"', '"', $value);
|
$item = str_replace('"', '"', $item);
|
||||||
|
|
||||||
if (substr($item, 0, 1) === '-' && $escaped_hyphen !== true)
|
if (substr($item, 0, 1) === '-')
|
||||||
{
|
{
|
||||||
$conditions[] = sprintf('%s NOT LIKE ?', $column);
|
$conditions[] = sprintf('%s NOT LIKE ?', $column);
|
||||||
$item = substr($item, 1);
|
$item = substr($item, 1);
|
||||||
|
|
@ -500,7 +500,6 @@ class VariableBase
|
||||||
if (substr($item, 0, 6) === substr($item, -6) && substr($item, -6) === '"')
|
if (substr($item, 0, 6) === substr($item, -6) && substr($item, -6) === '"')
|
||||||
{
|
{
|
||||||
$item = substr($item, 6, -6);
|
$item = substr($item, 6, -6);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pass blank text
|
// pass blank text
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue