mirror of
https://github.com/processwire/processwire.git
synced 2025-08-31 10:21:44 +02:00
Bump version to 3.0.49 and adjustment to debug info generated in WireMarkupRegions.php
This commit is contained in:
@@ -45,7 +45,7 @@ class ProcessWire extends Wire {
|
|||||||
* Reversion revision number
|
* Reversion revision number
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
const versionRevision = 48;
|
const versionRevision = 49;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version suffix string (when applicable)
|
* Version suffix string (when applicable)
|
||||||
|
@@ -963,7 +963,8 @@ class WireMarkupRegions extends Wire {
|
|||||||
$populatedNotes = array();
|
$populatedNotes = array();
|
||||||
$rejectedNotes = array();
|
$rejectedNotes = array();
|
||||||
$numUpdates = 0;
|
$numUpdates = 0;
|
||||||
$debug = $this->wire('config')->debug && $this->wire('user')->isSuperuser();
|
$debugLandmark = "<!--PW-REGION-DEBUG-->";
|
||||||
|
$debug = ($this->wire('config')->debug || strpos($htmlDocument, $debugLandmark)) && $this->wire('user')->isSuperuser();
|
||||||
|
|
||||||
foreach($regions as $regionKey => $region) {
|
foreach($regions as $regionKey => $region) {
|
||||||
|
|
||||||
@@ -1016,10 +1017,9 @@ class WireMarkupRegions extends Wire {
|
|||||||
if(count($populatedNotes)) $debugNotes .= "\n Populated: $bull" . implode($bull, $populatedNotes);
|
if(count($populatedNotes)) $debugNotes .= "\n Populated: $bull" . implode($bull, $populatedNotes);
|
||||||
if(count($rejectedNotes)) $debugNotes .= "\n Skipped: $bull" . implode($bull, $rejectedNotes);
|
if(count($rejectedNotes)) $debugNotes .= "\n Skipped: $bull" . implode($bull, $rejectedNotes);
|
||||||
if($leftoverBytes) $debugNotes .= "\n $leftoverBytes non-region bytes skipped";
|
if($leftoverBytes) $debugNotes .= "\n $leftoverBytes non-region bytes skipped";
|
||||||
$landmark = "<!--PW-REGION-DEBUG-->";
|
if(strpos($htmlDocument, $debugLandmark) !== false) {
|
||||||
if(strpos($htmlDocument, $landmark) !== false) {
|
$debugNotes = "<pre>" . $this->wire('sanitizer')->entities($debugNotes) . "</pre>" . $debugLandmark;
|
||||||
$debugNotes = "<pre>" . $this->wire('sanitizer')->entities($debugNotes) . "</pre>" . $landmark;
|
$htmlDocument = str_replace($debugLandmark, $debugNotes, $htmlDocument);
|
||||||
$htmlDocument = str_replace($landmark, $debugNotes, $htmlDocument);
|
|
||||||
} else {
|
} else {
|
||||||
$htmlDocument .= "<!--" . $debugNotes . "\n-->";
|
$htmlDocument .= "<!--" . $debugNotes . "\n-->";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user