diff --git a/wire/core/Modules.php b/wire/core/Modules.php index 80ab0de6..d60bcb78 100644 --- a/wire/core/Modules.php +++ b/wire/core/Modules.php @@ -10,7 +10,7 @@ * in order to save resources. As a result, anything iterating through these Modules should check to make sure it's not a ModulePlaceholder * before using it. If it's a ModulePlaceholder, then the real Module can be instantiated/retrieved by $modules->get($className). * - * ProcessWire 3.x, Copyright 2016 by Ryan Cramer + * ProcessWire 3.x, Copyright 2019 by Ryan Cramer * https://processwire.com * * #pw-summary Loads and manages all modules in ProcessWire. @@ -3034,7 +3034,7 @@ class Modules extends WireArray { * */ public function getModuleInfoProperty($class, $property, array $options = array()) { - if(isset($this->moduleInfoVerboseKeys[$property])) { + if(in_array($property, $this->moduleInfoVerboseKeys)) { $info = $this->getModuleInfoVerbose($class, $options); $info['verbose'] = true; } else { @@ -3251,6 +3251,9 @@ class Modules extends WireArray { * $data = $modules->getConfig('HelloWorld'); * $data['greeting'] = 'Hello World! How are you today?'; * $modules->saveConfig('HelloWorld', $data); + * + * // Getting just one property 'apiKey' from module config data + * @apiKey = $modules->getConfig('HelloWorld', 'apiKey'); * ~~~~~~ * * #pw-group-configuration @@ -3258,8 +3261,8 @@ class Modules extends WireArray { * * @param string|Module $class * @param string $property Optionally just get value for a specific property (omit to get all config) - * @return array Module configuration data - * @see Modules::saveConfig() + * @return array|string|int|float Module configuration data, returns array unless a specific $property was requested + * @see Modules::saveConfig() * @since 3.0.16 Use method getModuleConfigData() with same arguments for prior versions (can also be used on any version). * */ @@ -3293,14 +3296,6 @@ class Modules extends WireArray { return $data; } - /** - * Alias of getConfig() for backwards compatibility - * - * @param string|Module $className - * @return array - * - */ - /** * Get the path + filename (or optionally URL) for this module * diff --git a/wire/core/Pages.php b/wire/core/Pages.php index 4bb223f1..20551876 100644 --- a/wire/core/Pages.php +++ b/wire/core/Pages.php @@ -1448,6 +1448,7 @@ class Pages extends Wire { $manager = $page->getPagesManager(); if($manager instanceof PagesType) $manager->added($page); } + $page->setQuietly('_added', true); } /** diff --git a/wire/core/WireDatabasePDO.php b/wire/core/WireDatabasePDO.php index 7d539b92..faf91a2c 100644 --- a/wire/core/WireDatabasePDO.php +++ b/wire/core/WireDatabasePDO.php @@ -398,7 +398,7 @@ class WireDatabasePDO extends Wire implements WireDatabase { static public function getQueryLog() { /** @var WireDatabasePDO $database */ $database = wire('database'); - $database->queryLog(); + return $database->queryLog(); } /** diff --git a/wire/modules/Process/ProcessPageSearch/ProcessPageSearch.min.js b/wire/modules/Process/ProcessPageSearch/ProcessPageSearch.min.js index 6b34cb32..98b6ea6a 100644 --- a/wire/modules/Process/ProcessPageSearch/ProcessPageSearch.min.js +++ b/wire/modules/Process/ProcessPageSearch/ProcessPageSearch.min.js @@ -1 +1 @@ -ProcessPageSearch={t:0,defaultLabel:"Search",lastQuery:"",search:function(){var a=$("#ProcessPageSearchQuery").val();if(a==this.lastQuery){return false}$("#ProcessPageSearchStatus").text("Searching");$("#ProcessPageSearchLiveResults").load(ProcessWire.config.urls.admin+"page/search/",{q:a},function(c){var b=parseInt($("#search_num_results").hide().text());if(b){$("#search_results").fadeIn("fast").find("a").click(function(){$("#search_results").css("overflow","hidden")});$("#search_status").text(b+" matches")}else{$("#search_status").text("No matches")}});this.lastQuery=a;return false},hide:function(){$("#search_results").fadeOut("fast",function(){$(this).remove()});$("#search_status").text("");$("#search_query").val(this.defaultLabel)},init:function(){this.lastQuery=this.defaultLabel;$("#container").append('
');$("#search_form").unbind().submit(function(){return this.search()});$("#search_query").attr("autocomplete","off").focus(function(){$(this).keyup(function(){if($(this).val().length<4){return}if(this.t){clearTimeout(this.t)}this.t=setTimeout("liveSearch.search()",500)})}).blur(function(){setTimeout("liveSearch.hide()",250)})}};$(document).ready(function(){}); \ No newline at end of file +ProcessPageSearch={t:0,defaultLabel:"Search",lastQuery:"",search:function(){var query=$("#ProcessPageSearchQuery").val();if(query==this.lastQuery)return false;$("#ProcessPageSearchStatus").text("Searching");$("#ProcessPageSearchLiveResults").load(ProcessWire.config.urls.admin+"page/search/",{q:query},function(data){var numResults=parseInt($("#search_num_results").hide().text());if(numResults){$("#search_results").fadeIn("fast").find("a").click(function(){$("#search_results").css("overflow","hidden")});$("#search_status").text(numResults+" matches")}else{$("#search_status").text("No matches")}});this.lastQuery=query;return false},hide:function(){$("#search_results").fadeOut("fast",function(){$(this).remove()});$("#search_status").text("");$("#search_query").val(this.defaultLabel)},init:function(){this.lastQuery=this.defaultLabel;$("#container").append('');$("#search_form").unbind().submit(function(){return this.search()});$("#search_query").attr("autocomplete","off").focus(function(){$(this).keyup(function(){if($(this).val().length<4)return;if(this.t)clearTimeout(this.t);this.t=setTimeout("liveSearch.search()",500)})}).blur(function(){setTimeout("liveSearch.hide()",250)})}};$(document).ready(function(){}); \ No newline at end of file diff --git a/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php b/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php index cd9bff0e..b8ca971b 100644 --- a/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php +++ b/wire/modules/Process/ProcessPageSearch/ProcessPageSearchLive.php @@ -597,7 +597,8 @@ class ProcessPageSearchLive extends Wire { $order++; } - if($n && $n < $result['total'] && !$this->isViewAll && !$help) { + //if($n && $n < $result['total'] && !$this->isViewAll && !$help) { + if($n && $n < $result['total'] && !$help) { $url = isset($result['url']) ? $result['url'] : ''; $items[$order] = $this->makeViewAllItem($liveSearch, $thisType, $item['group'], $result['total'], $url); } @@ -1110,25 +1111,45 @@ class ProcessPageSearchLive extends Wire { protected function ___renderList(array $items, $prefix = 'pw-search', $class = 'list') { $pagination = $this->pagination->renderPager(); - $a = array(); $group = ''; - - $out = "\n" . + "$item[title] $icon $groupLabel (" . $totals[$group] . ")
"; + } else { + $groups[$group] .= $this->renderItem($item, $prefix) . '