Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Commit

Permalink
Preparing release 1.0.0 pl 2
Browse files Browse the repository at this point in the history
- Fixed error "Couldn't fetch DOMElement. Node no longer exists"
  • Loading branch information
SoftCreatR committed Mar 1, 2019
1 parent 3729da7 commit 3b56d67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace wcf\system\event\listener;
use wcf\system\application\ApplicationHandler;
use wcf\system\WCF;
use wcf\util\DOMUtil;
use DateTime;

/**
Expand Down Expand Up @@ -87,12 +88,14 @@ public function execute($eventObj, $className, $eventName, array &$parameters) {
}

foreach ($nodeList as $node) {
$scImage = $eventObj->renameTag($node['element'], 'p');
$scImage->setAttribute('class', 'error scBlockedImage');

$fragment = $node['element']->ownerDocument->createDocumentFragment();
$fragment->appendXML(WCF::getLanguage()->getDynamicVariable('wcf.message.error.scUploadFilter', ['type' => $node['type']]));
$scImage->appendChild($fragment);
if (!DOMUtil::isRemoved($node['element'])) {
$scImage = $eventObj->renameTag($node['element'], 'p');
$scImage->setAttribute('class', 'error scBlockedImage');

$fragment = $node['element']->ownerDocument->createDocumentFragment();
$fragment->appendXML(WCF::getLanguage()->getDynamicVariable('wcf.message.error.scUploadFilter', ['type' => $node['type']]));
$scImage->appendChild($fragment);
}
}
}
}
7 changes: 6 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<packagedescription><![CDATA[Provides functionalities for the "upload free sunday" on 03rd March 2019.]]></packagedescription>
<packagedescription language="de"><![CDATA[Stellt Funktionalitäten für den "Uploadfreien Sonntag" am 03. März 2019 zur Verfügung.]]></packagedescription>
<packageurl><![CDATA[https://support.softcreatr.com/thread/2985-artikel-13-uploadfreier-sonntag-wsc-plugin/]]></packageurl>
<version>1.0.0 pl 1</version>
<version>1.0.0 pl 2</version>
<date>2019-03-01</date>
<license><![CDATA[GNU General Public License <https://www.gnu.org/licenses/gpl-3.0.txt>]]></license>
</packageinformation>
Expand Down Expand Up @@ -58,4 +58,9 @@
<instruction type="option" />
<instruction type="language" />
</instructions>

<instructions type="update" fromversion="1.0.0 pl 1">
<!-- files -->
<instruction type="file" />
</instructions>
</package>

0 comments on commit 3b56d67

Please sign in to comment.