mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 07:47:00 +02:00
Minor fixes
This commit is contained in:
@@ -245,7 +245,7 @@ class DatabaseQuerySelectFulltext extends Wire {
|
||||
*
|
||||
*/
|
||||
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) {
|
||||
$str = str_replace(array('@', '+', '-', '*', '~', '<', '>', '(', ')', ':', '"', '&', '|', '=', '.'), ' ', $str);
|
||||
$str = str_replace(array('@', '+', '-', '*', '~', '<', '>', '(', ')', ':', '"', '&', '|', '=', '.'), ' ', "$str");
|
||||
while(strpos($str, ' ')) $str = str_replace(' ', ' ', $str);
|
||||
return $str;
|
||||
}
|
||||
@@ -270,7 +270,7 @@ class DatabaseQuerySelectFulltext extends Wire {
|
||||
*/
|
||||
protected function value($value) {
|
||||
$maxLength = self::maxQueryValueLength;
|
||||
$value = trim($value);
|
||||
$value = trim("$value");
|
||||
if(strlen($value) < $maxLength && strpos($value, "\n") === false && strpos($value, "\r") === false) return $value;
|
||||
$value = $this->sanitizer->trunc($value, $maxLength);
|
||||
return $value;
|
||||
|
@@ -3465,9 +3465,9 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
|
||||
*/
|
||||
public function getModuleConfigInputfields(array $data) {
|
||||
|
||||
$config = $this->config;
|
||||
$pages = $this->pages;
|
||||
$modules = $this->modules;
|
||||
$config = $this->wire()->config;
|
||||
$pages = $this->wire()->pages;
|
||||
$modules = $this->wire()->modules;
|
||||
$inputfields = new InputfieldWrapper();
|
||||
|
||||
$this->wire($inputfields);
|
||||
|
Reference in New Issue
Block a user