1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-25 15:51:37 +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:
Ryan Cramer
2018-04-25 05:55:22 -04:00
parent f2912bcfd4
commit a9051a252f

View File

@@ -710,7 +710,7 @@ class InputfieldSelector extends Inputfield implements ConfigurableModule {
protected function renderTestSelector($selector) {
try {
$selector = $this->sanitizeSelectorString($selector);
$cnt = $this->wire('pages')->count($selector);
$cnt = $this->wire('pages')->count($selector, array('allowCustom' => true));
$out = '';
// take into account a limit=n
if(strpos($selector, 'limit=') !== false && preg_match('/\blimit=(\d+)/', $selector, $matches)) {