Skip to content

Commit 99fcf2b

Browse files
author
Aaron Were
committed
Support for php 5.6
1 parent 3228adc commit 99fcf2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

class.AttachmentPreviewPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ private function getDom($html = '')
350350
// Because PJax isn't a full document, it kinda breaks DOMDocument
351351
// Which expects a full document! (You know with a DOCTYPE, <HTML> <BODY> etc.. )
352352
if (self::isPjax() && (strpos($html, '<!DOCTYPE') !== 0 || strpos($html, '<html') !== 0)) {
353-
$this->log('pjax prefix trick in operation..');
354353
// Prefix the non-doctyped html snippet with an xml prefix
355354
// This tricks DOMDocument into loading the HTML snippet
356355
$html = self::xml_prefix . $html;
@@ -726,6 +725,7 @@ private function wrap(DOMDocument $doc, DOMElement $source, DOMElement $new_chil
726725

727726
// I'm against dynamically generated scripts, however in this case
728727
// it makes it translateable.. so, win!
728+
$limit = $this->limit; // Support for php 5.6
729729
$toggle_script->nodeValue = <<<SCRIPT
730730
731731
// Setup handler to receive Attachments Preview Fetch events:
@@ -781,7 +781,7 @@ private function wrap(DOMDocument $doc, DOMElement $source, DOMElement $new_chil
781781
782782
$(document)
783783
.on('ready pjax:success', function () {
784-
console.log("Triggering AttachmentPreview initial fetch (admin limit set to {$this->limit}).");
784+
console.log("Triggering AttachmentPreview initial fetch (admin limit set to {$limit}).");
785785
$('.embedded:not(.hidden)')
786786
.trigger('ap:fetch');
787787
});

0 commit comments

Comments
 (0)