From 34e1aa3300e8d7cfa0c92e7c02d8009d184350fb Mon Sep 17 00:00:00 2001 From: David Siegfried <david.siegfried@uni-vechta.de> Date: Wed, 27 Sep 2023 07:55:38 +0000 Subject: [PATCH] fix undefined constants, refs #3239 Merge request studip/studip!2199 --- lib/ilias_interface/IliasSoap.class.php | 13 ++----------- lib/models/Courseware/StructuralElement.php | 6 +++--- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lib/ilias_interface/IliasSoap.class.php b/lib/ilias_interface/IliasSoap.class.php index e140a9f5705..0ba7dd3d719 100644 --- a/lib/ilias_interface/IliasSoap.class.php +++ b/lib/ilias_interface/IliasSoap.class.php @@ -377,18 +377,9 @@ class IliasSoap extends StudipSoapClient if ($user_id != "") $param["user_id"] = $user_id; $result = $this->call('searchObjects', $param); - if ($result != false) + if ($result) { - //$objects = $this->parseXML($result); - $objects = $this->parseIliasObject($result); -// var_dump($objects); - return $objects; - if (count(objects)){ - foreach($all_objects as $one_object){ - $ret[$one_object['ref_id']] = $one_object; - } - return $ret; - } + return $this->parseIliasObject($result); } return false; diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php index 11227d233c7..8c6d1ded615 100644 --- a/lib/models/Courseware/StructuralElement.php +++ b/lib/models/Courseware/StructuralElement.php @@ -177,10 +177,10 @@ class StructuralElement extends \SimpleORMap implements \PrivacyObject { if (is_null($image)) { $this->image_id = null; - } elseif (is_a($image, \FileRef)) { + } elseif (is_a($image, \FileRef::class)) { $this->image_id = $image->getId(); $this->image_type = \FileRef::class; - } elseif (is_a($image, \StockImage)) { + } elseif (is_a($image, \StockImage::class)) { $this->image_id = $image->getId(); $this->image_type = \StockImage::class; } else { @@ -1167,6 +1167,6 @@ SQL; if ($structuralElements) { $storage->addTabularData(_('Courseware Seiten'), 'cw_structural_elements', $structuralElements); } - + } } -- GitLab