|
@@ 266-269 (lines=4) @@
|
| 263 |
|
//if both before and after are false, LIKE allows custom placeholders, % and _ are always treated as normal chars |
| 264 |
|
$options = $this->settings[$Model->alias]; |
| 265 |
|
$from = $to = $substFrom = $substTo = array(); |
| 266 |
|
if ($options['wildcardAny'] !== '%' || ($field['before'] !== false || $field['after'] !== false)) { |
| 267 |
|
$from[] = '%'; |
| 268 |
|
$to[] = '\%'; |
| 269 |
|
} |
| 270 |
|
if ($options['wildcardOne'] !== '_' || ($field['before'] !== false || $field['after'] !== false)) { |
| 271 |
|
$from[] = '_'; |
| 272 |
|
$to[] = '\_'; |
|
@@ 270-273 (lines=4) @@
|
| 267 |
|
$from[] = '%'; |
| 268 |
|
$to[] = '\%'; |
| 269 |
|
} |
| 270 |
|
if ($options['wildcardOne'] !== '_' || ($field['before'] !== false || $field['after'] !== false)) { |
| 271 |
|
$from[] = '_'; |
| 272 |
|
$to[] = '\_'; |
| 273 |
|
} |
| 274 |
|
$value = $data[$field['name']]; |
| 275 |
|
if (!empty($from)) { |
| 276 |
|
$value = str_replace($from, $to, $value); |