diff --git a/wire/core/Pageimage.php b/wire/core/Pageimage.php index ed33aa63..ecff9392 100644 --- a/wire/core/Pageimage.php +++ b/wire/core/Pageimage.php @@ -617,13 +617,14 @@ class Pageimage extends Pagefile { * */ public function size($width, $height, $options = array()) { + if(!is_array($options)) $options = $this->sizeOptionsToArray($options); if($this->wire('hooks')->isHooked('Pageimage::size()')) { $result = $this->__call('size', array($width, $height, $options)); } else { $result = $this->___size($width, $height, $options); } - + $options['_width'] = $width; $options['_height'] = $height; self::$lastSizeOptions = $options; @@ -648,23 +649,7 @@ class Pageimage extends Pagefile { $this->error = ''; if($this->ext == 'svg') return $this; - - if(!is_array($options)) { - if(is_string($options)) { - // optionally allow a string to be specified with crop direction, for shorter syntax - if(strpos($options, ',') !== false) $options = explode(',', $options); // 30,40 - $options = array('cropping' => $options); - } else if(is_int($options)) { - // optionally allow an integer to be specified with quality, for shorter syntax - $options = array('quality' => $options); - } else if(is_bool($options)) { - // optionally allow a boolean to be specified with upscaling toggle on/off - $options = array('upscaling' => $options); - } else { - // unknown options type - $options = array(); - } - } + if(!is_array($options)) $options = $this->sizeOptionsToArray($options); // originally requested options $requestOptions = $options; @@ -899,6 +884,25 @@ class Pageimage extends Pagefile { return $pageimage; } + + protected function sizeOptionsToArray($options) { + if(is_array($options)) return $options; + if(is_string($options)) { + // optionally allow a string to be specified with crop direction, for shorter syntax + if(strpos($options, ',') !== false) $options = explode(',', $options); // 30,40 + $options = array('cropping' => $options); + } else if(is_int($options)) { + // optionally allow an integer to be specified with quality, for shorter syntax + $options = array('quality' => $options); + } else if(is_bool($options)) { + // optionally allow a boolean to be specified with upscaling toggle on/off + $options = array('upscaling' => $options); + } else { + // unknown options type + $options = array(); + } + return $options; + } /** * Same as size() but with width/height assumed to be hidpi width/height diff --git a/wire/modules/Process/ProcessPageLister/ProcessPageLister.module b/wire/modules/Process/ProcessPageLister/ProcessPageLister.module index 2a4ef838..f9e68068 100644 --- a/wire/modules/Process/ProcessPageLister/ProcessPageLister.module +++ b/wire/modules/Process/ProcessPageLister/ProcessPageLister.module @@ -690,6 +690,7 @@ class ProcessPageLister extends Process implements ConfigurableModule { protected function getSystemColumns() { $systemColumns = array_keys($this->systemLabels); $systemColumns = array_merge($systemColumns, array('id', 'name', 'path')); + sort($systemColumns); return $systemColumns; } diff --git a/wire/modules/Process/ProcessPageView.module b/wire/modules/Process/ProcessPageView.module index 8a4216ae..b2d6085d 100644 --- a/wire/modules/Process/ProcessPageView.module +++ b/wire/modules/Process/ProcessPageView.module @@ -808,7 +808,7 @@ class ProcessPageView extends Process { if($pageNum > 1 && $page->template->allowPageNum) { $prefix = $this->pageNumPrefix ? $this->pageNumPrefix : $this->wire('config')->pageNumUrlPrefix; if(!$prefix) $prefix = 'page'; - $url .= "$prefix$pageNum"; + $url = rtrim($url, '/') . "/$prefix$pageNum"; if($page->template->slashPageNum) { // defined setting for trailing slash if($page->template->slashPageNum == 1) $url .= '/';