mirror of
https://github.com/processwire/processwire.git
synced 2025-08-28 08:59:52 +02:00
Fix issue processwire/processwire-issues#565 with InputfieldSelector preview count and _custom selector option was not working before
This commit is contained in:
@@ -710,7 +710,7 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
|
|||||||
protected function renderTestSelector($selector) {
|
protected function renderTestSelector($selector) {
|
||||||
try {
|
try {
|
||||||
$selector = $this->sanitizeSelectorString($selector);
|
$selector = $this->sanitizeSelectorString($selector);
|
||||||
$cnt = $this->wire('pages')->count($selector);
|
$cnt = $this->wire('pages')->count($selector, array('allowCustom' => true));
|
||||||
$out = '';
|
$out = '';
|
||||||
// take into account a limit=n
|
// take into account a limit=n
|
||||||
if(strpos($selector, 'limit=') !== false && preg_match('/\blimit=(\d+)/', $selector, $matches)) {
|
if(strpos($selector, 'limit=') !== false && preg_match('/\blimit=(\d+)/', $selector, $matches)) {
|
||||||
|
Reference in New Issue
Block a user