1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00

Some cleanup in ProcessPageAdd plus add support for disabling template suggestions when adding pages per processwire/processwire-issues#424 via $config->pageAdd('noSuggestTemplates', true); or specify space-separated list of template names (string) for the "true" value.

This commit is contained in:
Ryan Cramer
2017-12-04 09:51:11 -05:00
parent 337e59663b
commit a865e0a053
5 changed files with 266 additions and 63 deletions

View File

@@ -113,7 +113,10 @@ class Paths extends WireData {
public function get($key) {
static $_http = null;
if($key == 'root') return $this->_root;
if(strpos($key, 'http') === 0) {
$http = '';
if(is_object($key)) {
$key = "$key";
} else if(strpos($key, 'http') === 0) {
if(is_null($_http)) {
$scheme = $this->wire('input')->scheme;
if(!$scheme) $scheme = 'http';
@@ -123,8 +126,6 @@ class Paths extends WireData {
$http = $_http;
$key = substr($key, 4);
$key[0] = strtolower($key[0]);
} else {
$http = '';
}
if($key == 'root') {
$value = $http . $this->_root;