1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-13 02:04:35 +02:00

Bump version to 3.0.217

This commit is contained in:
Ryan Cramer
2023-05-05 13:00:14 -04:00
parent 013f9ebade
commit 47086751d2
6 changed files with 49 additions and 33 deletions

View File

@@ -5,7 +5,7 @@
*
* Provides implementation for Page access functions.
*
* ProcessWire 3.x, Copyright 2016 by Ryan Cramer
* ProcessWire 3.x, Copyright 2023 by Ryan Cramer
* https://processwire.com
*
*/
@@ -85,7 +85,7 @@ class PageAccess {
$parent = null;
if($type === 'edit' && $page->isTrash() && $page->id != $page->wire('config')->trashPageID) {
if($type === 'edit' && $page->isTrash() && $page->id != $page->wire()->config->trashPageID) {
// pages in trash have an edit access parent as whatever it was prior to being trashed
$info = $pages->trasher()->parseTrashPageName($page->name);
if(!empty($info['parent_id'])) $parent = $pages->get((int) $info['parent_id']);
@@ -160,9 +160,13 @@ class PageAccess {
*
*/
public function wire($name = '', $value = null, $lock = false) {
if(!is_null($value)) return $this->wire->wire($name, $value, $lock);
else if($name instanceof WireFuelable && $this->wire) $name->setWire($this->wire);
else if($name) return $this->wire->wire($name);
if(!is_null($value)) {
return $this->wire->wire($name, $value, $lock);
} else if($name instanceof WireFuelable && $this->wire) {
$name->setWire($this->wire);
} else if($name) {
return $this->wire->wire($name);
}
return $this->wire;
}