MDL-42150 Edit PDF: Fix error on saving annotations + comments.

Everything is an instanceof stdClass - need to reverse the logic.
This commit is contained in:
Damyon Wiese
2013-10-04 15:15:58 +08:00
parent 56cc9b387e
commit c921825977
@@ -73,7 +73,7 @@ class page_editor {
$added = 0;
foreach ($comments as $record) {
// Force these.
if ($record instanceof stdClass) {
if (!($record instanceof comment)) {
$comment = new comment($record);
} else {
$comment = $record;
@@ -163,7 +163,7 @@ class page_editor {
$added = 0;
foreach ($annotations as $record) {
// Force these.
if ($record instanceof stdClass) {
if (!($record instanceof annotation)) {
$annotation = new annotation($record);
} else {
$annotation = $record;