1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-23 06:44:38 +02:00

Various minor updates

This commit is contained in:
Ryan Cramer
2025-01-10 10:27:09 -05:00
parent 4604c09abc
commit 4e678c1584
5 changed files with 41 additions and 19 deletions

View File

@@ -5,7 +5,7 @@
*
* Matches selector strings to pages
*
* ProcessWire 3.x, Copyright 2024 by Ryan Cramer
* ProcessWire 3.x, Copyright 2025 by Ryan Cramer
* https://processwire.com
*
* Hookable methods:
@@ -1860,7 +1860,15 @@ class PageFinder extends Wire {
$q->set('joinType', $joinType);
$q->bindOption('global', true); // ensures bound value key are globally unique
$q->bindOption('prefix', 'pf'); // pf=PageFinder
/* @todo To be implemented after 3.0.245
if(strpos($subfields, 'JSON.') === 0) {
if($this->getMatchQueryJSON($q, $tableAlias, $subfields, $selector->operator, $value)) {
continue;
}
}
*/
$q = $fieldtype->getMatchQuery($q, $tableAlias, $subfield, $selector->operator, $value);
$q->copyTo($query, array('select', 'join', 'leftjoin', 'orderby', 'groupby'));
$q->copyBindValuesTo($query);
@@ -1981,6 +1989,22 @@ class PageFinder extends Wire {
return $query;
}
/**
* Get match query when data is stored in a JSON DB column (future use)
*
* @param PageFinderDatabaseQuerySelect DatabaseQuerySelect $q
* @param string $tableAlias
* @param string $subfields
* @param string $operator
* @param string|int|array $value
* @return bool
*
*/
protected function getMatchQueryJSON(DatabaseQuerySelect $q, $tableAlias, $subfields, $operator, $value) {
// @todo to be implemented after 3.0.245
return false;
}
/**
* Post process a DatabaseQuerySelect for page finder
*