1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-23 14:56:51 +02:00
This commit is contained in:
Ryan Cramer
2017-06-22 07:03:28 -04:00
parent 571266c6c1
commit 3348f3f13a

View File

@@ -73,7 +73,10 @@ class MarkupQA extends Wire {
if($page) $this->setPage($page);
if($field) $this->setField($field);
$this->assetsURL = $this->wire('config')->urls->assets;
$this->debug = (bool) $this->wire('config')->debugMarkupQA && $this->wire('user')->isSuperuser();
if($this->wire('config')->debugMarkupQA) {
$user = $this->wire('user');
if($user) $this->debug = $user->isSuperuser();
}
}
/**
@@ -436,6 +439,10 @@ class MarkupQA extends Wire {
$langName = $this->debug && $language ? $language->name : '';
if($livePath) {
if($path && substr($path, -1) != '/') {
// no trailing slash, retain the editors wishes here
$livePath = rtrim($livePath, '/');
}
if(strpos($livePath, '/trash/') !== false) {
// linked page is in trash, we won't update it but we'll produce a warning
$this->linkWarning("$path => $livePath (" . $this->_('it is in the trash') . ')');