1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Minor fixes

This commit is contained in:
Ryan Cramer
2024-06-14 15:52:28 -04:00
parent cf0832c330
commit abe1216c89
2 changed files with 6 additions and 6 deletions

View File

@@ -245,7 +245,7 @@ class DatabaseQuerySelectFulltext extends Wire {
* *
*/ */
protected function escapeLike($str) { protected function escapeLike($str) {
return str_replace(array('%', '_'), array('\\%', '\\_'), $str); return str_replace(array('%', '_'), array('\\%', '\\_'), "$str");
} }
/** /**
@@ -258,7 +258,7 @@ class DatabaseQuerySelectFulltext extends Wire {
* *
*/ */
protected function escapeAgainst($str) { protected function escapeAgainst($str) {
$str = str_replace(array('@', '+', '-', '*', '~', '<', '>', '(', ')', ':', '"', '&', '|', '=', '.'), ' ', $str); $str = str_replace(array('@', '+', '-', '*', '~', '<', '>', '(', ')', ':', '"', '&', '|', '=', '.'), ' ', "$str");
while(strpos($str, ' ')) $str = str_replace(' ', ' ', $str); while(strpos($str, ' ')) $str = str_replace(' ', ' ', $str);
return $str; return $str;
} }
@@ -270,7 +270,7 @@ class DatabaseQuerySelectFulltext extends Wire {
*/ */
protected function value($value) { protected function value($value) {
$maxLength = self::maxQueryValueLength; $maxLength = self::maxQueryValueLength;
$value = trim($value); $value = trim("$value");
if(strlen($value) < $maxLength && strpos($value, "\n") === false && strpos($value, "\r") === false) return $value; if(strlen($value) < $maxLength && strpos($value, "\n") === false && strpos($value, "\r") === false) return $value;
$value = $this->sanitizer->trunc($value, $maxLength); $value = $this->sanitizer->trunc($value, $maxLength);
return $value; return $value;

View File

@@ -3465,9 +3465,9 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
*/ */
public function getModuleConfigInputfields(array $data) { public function getModuleConfigInputfields(array $data) {
$config = $this->config; $config = $this->wire()->config;
$pages = $this->pages; $pages = $this->wire()->pages;
$modules = $this->modules; $modules = $this->wire()->modules;
$inputfields = new InputfieldWrapper(); $inputfields = new InputfieldWrapper();
$this->wire($inputfields); $this->wire($inputfields);