1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-14 02:34:24 +02:00

Improvements to Comment and CommentList class to support hookable modification of individual comments during rendering

This commit is contained in:
Ryan Cramer
2019-08-16 14:10:25 -04:00
parent 0392e9babf
commit 742ed9c479
3 changed files with 98 additions and 18 deletions

View File

@@ -784,7 +784,7 @@ class MarkupQA extends Wire {
if(file_exists($this->page->filesManager()->path() . basename($src))) {
// file exists, but we just don't know what it is - leave it alone
} else {
$this->error("Image file no longer exists: " . basename($src) . ")");
$this->error("Image file no longer exists: $src");
if($this->page->of()) $value = str_replace($img, '', $value);
$info['img_unresolved']++;
}
@@ -912,7 +912,7 @@ class MarkupQA extends Wire {
*
*/
public function error($text, $flags = 0) {
$logText = "$text (page={$this->page->path}, field={$this->field->name})";
$logText = "$text (field={$this->field->name}, id={$this->page->id}, path={$this->page->path})";
$this->wire('log')->save(self::errorLogName, $logText);
/*
if($this->wire('modules')->isInstalled('SystemNotifications')) {