Skip to content

Commit

Permalink
Soap: adjust references.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastocker committed Sep 13, 2023
1 parent 24a25e7 commit ccb2415
Show file tree
Hide file tree
Showing 39 changed files with 175 additions and 176 deletions.
2 changes: 1 addition & 1 deletion components/ILIAS/OrgUnit/classes/Webservices/SOAP/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace ILIAS\OrgUnit\Webservices\SOAP;

require_once('./webservice/soap/classes/class.ilSoapAdministration.php');
require_once('./components/ILIAS/soap/classes/class.ilSoapAdministration.php');
require_once('./components/ILIAS/WebServices/SOAP/classes/class.ilSoapPluginException.php');

use ilOrgUnitSOAPServicesPlugin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private function initClient(): void
$this->uri .= ('/' . $this->server_uri);
}

require_once './webservice/soap/lib/nusoap.php';
require_once './components/ILIAS/soap/lib/nusoap.php';
$this->client = new nusoap_client($this->uri);
}

Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/SOAPAuth/classes/class.ilSOAPAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

declare(strict_types=1);

include_once("./webservice/soap/lib/nusoap.php");
include_once("./components/ILIAS/soap/lib/nusoap.php");

class ilSOAPAuth
{
Expand Down Expand Up @@ -47,7 +47,7 @@ public static function testConnection(string $a_ext_uid, string $a_soap_pw, bool
$uri .= "/" . $server_uri;
}

require_once './webservice/soap/lib/nusoap.php';
require_once './components/ILIAS/soap/lib/nusoap.php';
$soap_client = new nusoap_client($uri);
if ($err = $soap_client->getError()) {
return "SOAP Authentication Initialisation Error: " . $err;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author Alex Killing <[email protected]>
*/

include_once './webservice/soap/lib/nusoap.php';
include_once './components/ILIAS/soap/lib/nusoap.php';

function isValidSession(string $ext_uid, string $soap_pw, bool $new_user): array
{
Expand Down
4 changes: 2 additions & 2 deletions components/ILIAS/SOAPAuth/examples/dummy_client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*****************************************************************************/

exit;
include_once './webservice/soap/lib/nusoap.php';
include_once './components/ILIAS/soap/lib/nusoap.php';

$server = $_GET["server"] ?: "http://localhost/components/ILIAS/SOAPAuth/dummy_server.php";

Expand All @@ -39,7 +39,7 @@
echo "<br /><br />----------------------------------------------<br /><br /> Calling Server...";

// initialize soap client
require_once './webservice/soap/lib/nusoap.php';
require_once './components/ILIAS/soap/lib/nusoap.php';
$client = new nusoap_client($server);
if ($err = $client->getError()) {
echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

chdir("../..");
require_once "./cli/inc.header.php";
include_once "./webservice/soap/include/inc.soap_functions.php";
include_once "./components/ILIAS/soap/include/inc.soap_functions.php";
$results = array();
foreach ($_POST as $key => $value) {
if (preg_match("/value_(\d+)_1/", $key, $matches)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static function suite(): self
include_once("./components/ILIAS/WebServices/test/ilRPCServerSettingsTest.php");
$suite->addTestSuite(ilRPCServerSettingsTest::class);

include_once './webservice/soap/test/ilSoapFunctionsTest.php';
include_once './components/ILIAS/soap/test/ilSoapFunctionsTest.php';
$suite->addTestSuite(ilSoapFunctionsTest::class);

return $suite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
use ILIAS\OrgUnit\Webservices\SOAP\UserIdsOfPosition;
use ILIAS\OrgUnit\Webservices\SOAP\UserIdsOfPositionAndOrgUnit;

include_once './webservice/soap/lib/nusoap.php';
include_once './webservice/soap/include/inc.soap_functions.php';
include_once './components/ILIAS/soap/lib/nusoap.php';
include_once './components/ILIAS/soap/include/inc.soap_functions.php';
require_once('./components/ILIAS/WebServices/SOAP/classes/class.ilSoapHook.php');
require_once('./components/ILIAS/Init/classes/class.ilInitialisation.php');

Expand Down
6 changes: 3 additions & 3 deletions components/ILIAS/soap/classes/class.ilSoapAdministration.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Stefan Meyer <[email protected]>
*/

include_once './webservice/soap/lib/nusoap.php';
include_once './components/ILIAS/soap/lib/nusoap.php';
include_once("./components/ILIAS/Authentication/classes/class.ilAuthUtils.php"); // to get auth mode constants

class ilSoapAdministration
Expand Down Expand Up @@ -252,7 +252,7 @@ public function getInstallationInfoXML(): string
ilInitialisation::initILIAS();

$clientdirs = glob(ILIAS_WEB_DIR . "/*", GLOB_ONLYDIR);
require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
require_once("components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
$writer = new ilSoapInstallationInfoXMLWriter();
$writer->start();
if (is_array($clientdirs)) {
Expand All @@ -276,7 +276,7 @@ public function getClientInfoXML(string $clientid)
ilInitialisation::initILIAS();

$clientdir = ILIAS_WEB_DIR . "/" . $clientid;
require_once("webservice/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
require_once("components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php");
$writer = new ilSoapInstallationInfoXMLWriter();
$writer->start();
if (!$writer->addClient($clientdir)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @version $Id$
* @package ilias
*/
include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

class ilSoapCourseAdministration extends ilSoapAdministration
{
Expand Down Expand Up @@ -422,7 +422,7 @@ public function getCoursesForUser(string $sid, string $parameters)
$ilObjDataCache = $DIC['ilObjDataCache'];
$tree = $DIC['tree'];

include_once 'webservice/soap/classes/class.ilXMLResultSetParser.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSetParser.php';
$parser = new ilXMLResultSetParser($parameters);
try {
$parser->startParsing();
Expand Down Expand Up @@ -507,7 +507,7 @@ public function getCoursesForUser(string $sid, string $parameters)

$ref_ids = array_unique($ref_ids);

include_once 'webservice/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/Course/classes/class.ilObjCourse.php';
include_once 'components/ILIAS/Course/classes/class.ilCourseXMLWriter.php';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
| Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
+-----------------------------------------------------------------------------+
*/
require_once('./webservice/soap/classes/class.ilSoapAdministration.php');
require_once('./components/ILIAS/soap/classes/class.ilSoapAdministration.php');

/**
* Soap data-collection administration methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* Soap exercise administration methods
* @author Roland Küstermann <[email protected]>
*/
include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

class ilSoapExerciseAdministration extends ilSoapAdministration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Soap file administration methods
* @author Roland Küstermann <[email protected]>
*/
include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

class ilSoapFileAdministration extends ilSoapAdministration
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
+-----------------------------------------------------------------------------+
*/

include_once "./webservice/soap/classes/class.ilSoapStructureReader.php";
include_once "./webservice/soap/classes/class.ilSoapStructureObjectFactory.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureReader.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php";

/**
* class reading a glossary to transform it into a structure object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @package ilias
*/

include_once "./webservice/soap/classes/class.ilSoapStructureObject.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObject.php";

class ilSoapGLOTermDefinitionStructureObject extends ilSoapStructureObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @package ilias
*/

include_once "./webservice/soap/classes/class.ilSoapStructureObject.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObject.php";

class ilSoapGLOTermStructureObject extends ilSoapStructureObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
+-----------------------------------------------------------------------------+
*/

include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

/**
* Soap grp administration methods
Expand Down Expand Up @@ -350,7 +350,7 @@ public function getGroupsForUser(string $sid, string $parameters)
$ilObjDataCache = $DIC['ilObjDataCache'];
$tree = $DIC['tree'];

include_once 'webservice/soap/classes/class.ilXMLResultSetParser.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSetParser.php';
$parser = new ilXMLResultSetParser($parameters);
try {
$parser->startParsing();
Expand Down Expand Up @@ -428,7 +428,7 @@ public function getGroupsForUser(string $sid, string $parameters)
}
$ref_ids = array_unique($ref_ids);

include_once 'webservice/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/Group/classes/class.ilObjGroup.php';
include_once 'components/ILIAS/Group/classes/class.ilGroupXMLWriter.php';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @package ilias
*/

include_once "./webservice/soap/classes/class.ilSoapStructureObject.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObject.php";

class ilSoapLMChapterStructureObject extends ilSoapStructureObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @package ilias
*/

include_once "./webservice/soap/classes/class.ilSoapStructureObject.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObject.php";

class ilSoapLMPageStructureObject extends ilSoapStructureObject
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
+-----------------------------------------------------------------------------+
*/

include_once "./webservice/soap/classes/class.ilSoapStructureReader.php";
include_once "./webservice/soap/classes/class.ilSoapStructureObjectFactory.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureReader.php";
include_once "./components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php";

/**
* class for reading a learning module as structure object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */

include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

/**
* This class handles all DB changes necessary for fraunhofer
Expand Down
30 changes: 15 additions & 15 deletions components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @version $Id$
* @package ilias
*/
include_once './webservice/soap/classes/class.ilSoapAdministration.php';
include_once './components/ILIAS/soap/classes/class.ilSoapAdministration.php';

class ilSoapObjectAdministration extends ilSoapAdministration
{
Expand Down Expand Up @@ -174,7 +174,7 @@ public function getObjectByReference(string $sid, int $a_ref_id, int $user_id)
if (ilObject::_isInTrash($a_ref_id)) {
return $this->raiseError("Object with ID $a_ref_id has been deleted.", 'Client');
}
include_once './webservice/soap/classes/class.ilObjectXMLWriter.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLWriter.php';

$xml_writer = new ilObjectXMLWriter();
$xml_writer->enablePermissionCheck(true);
Expand Down Expand Up @@ -247,7 +247,7 @@ public function getObjectsByTitle(string $sid, string $a_title, int $user_id)
return '';
}

include_once './webservice/soap/classes/class.ilObjectXMLWriter.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLWriter.php';

$xml_writer = new ilObjectXMLWriter();
$xml_writer->enablePermissionCheck(true);
Expand Down Expand Up @@ -363,7 +363,7 @@ public function searchObjects(string $sid, array $types, string $key, string $co
return '';
}

include_once './webservice/soap/classes/class.ilObjectXMLWriter.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLWriter.php';
$xml_writer = new ilObjectXMLWriter();
if (ilSearchSettings::getInstance()->enabledLucene()) {
$xml_writer->enableReferences(false);
Expand Down Expand Up @@ -431,7 +431,7 @@ public function getTreeChilds(string $sid, int $ref_id, array $types, int $user_
}
}

include_once './webservice/soap/classes/class.ilObjectXMLWriter.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLWriter.php';
$xml_writer = new ilObjectXMLWriter();
$xml_writer->enablePermissionCheck(true);
$xml_writer->setObjects($objs);
Expand Down Expand Up @@ -483,7 +483,7 @@ public function getXMLTree(string $sid, int $ref_id, array $types, int $user_id)
}
}

include_once './webservice/soap/classes/class.ilObjectXMLWriter.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLWriter.php';
$xml_writer = new ilObjectXMLWriter();
$xml_writer->enablePermissionCheck(true);
$xml_writer->setObjects($nodes);
Expand Down Expand Up @@ -553,7 +553,7 @@ public function addObject(string $sid, int $a_target_id, string $a_xml)
}
}

include_once './webservice/soap/classes/class.ilObjectXMLParser.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLParser.php';

$xml_parser = new ilObjectXMLParser($a_xml, true);
try {
Expand Down Expand Up @@ -930,7 +930,7 @@ public function updateObjects(string $sid, string $a_xml)
$ilAccess = $DIC['ilAccess'];
$objDefinition = $DIC['objDefinition'];

include_once './webservice/soap/classes/class.ilObjectXMLParser.php';
include_once './components/ILIAS/soap/classes/class.ilObjectXMLParser.php';
$xml_parser = new ilObjectXMLParser($a_xml, true);
try {
$xml_parser->startParsing();
Expand Down Expand Up @@ -1048,7 +1048,7 @@ public function moveObject(string $sid, int $ref_id, int $target_id)
return $this->raiseError($this->getMessage(), $this->getMessageCode());
}

include_once './webservice/soap/classes/class.ilSoapUtils.php';
include_once './components/ILIAS/soap/classes/class.ilSoapUtils.php';
global $DIC;

$rbacreview = $DIC['rbacreview'];
Expand Down Expand Up @@ -1116,7 +1116,7 @@ public function copyObject(string $sid, string $copy_settings_xml)
return $this->raiseError($this->getMessage(), $this->getMessageCode());
}

include_once './webservice/soap/classes/class.ilSoapUtils.php';
include_once './components/ILIAS/soap/classes/class.ilSoapUtils.php';
global $DIC;

$rbacreview = $DIC['rbacreview'];
Expand All @@ -1125,7 +1125,7 @@ public function copyObject(string $sid, string $copy_settings_xml)
$lng = $DIC['lng'];
$ilUser = $DIC['ilUser'];

include_once './webservice/soap/classes/class.ilCopyWizardSettingsXMLParser.php';
include_once './components/ILIAS/soap/classes/class.ilCopyWizardSettingsXMLParser.php';
$xml_parser = new ilCopyWizardSettingsXMLParser($copy_settings_xml);
try {
$xml_parser->startParsing();
Expand Down Expand Up @@ -1231,8 +1231,8 @@ public function getPathForRefId(string $sid, int $ref_id)
$lng = $DIC['lng'];
$items = $tree->getPathFull($ref_id);

include_once 'webservice/soap/classes/class.ilXMLResultSet.php';
include_once 'webservice/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSet.php';
include_once 'components/ILIAS/soap/classes/class.ilXMLResultSetWriter.php';
include_once 'components/ILIAS/Course/classes/class.ilCourseXMLWriter.php';

$xmlResultSet = new ilXMLResultSet();
Expand Down Expand Up @@ -1370,7 +1370,7 @@ private function updateReferences(array $a_object_data): void

foreach ($a_object_data['references'] as $ref_data) {
if (isset($ref_data['time_target'])) {
include_once('./webservice/soap/classes/class.ilObjectXMLWriter.php');
include_once('./components/ILIAS/soap/classes/class.ilObjectXMLWriter.php');
include_once('./components/ILIAS/Object/classes/class.ilObjectActivation.php');
$old = ilObjectActivation::getItem($ref_data['ref_id']);

Expand Down Expand Up @@ -1425,7 +1425,7 @@ private function addReferences(ilObject $source, array $a_object_data): void
$source->setPermissions($ref_data['parent_id']);
}
if (isset($ref_data['time_target']) /* and ($crs_ref_id = $tree->checkForParentType($new_ref_id,'crs')) */) {
include_once('./webservice/soap/classes/class.ilObjectXMLWriter.php');
include_once('./components/ILIAS/soap/classes/class.ilObjectXMLWriter.php');
include_once('./components/ILIAS/Object/classes/class.ilObjectActivation.php');

if (!isset($ref_data['time_target']['starting_time'])) {
Expand Down
Loading

0 comments on commit ccb2415

Please sign in to comment.