diff --git a/cli/setup.php b/cli/setup.php index c20e6086fced..74119d90e426 100644 --- a/cli/setup.php +++ b/cli/setup.php @@ -34,7 +34,7 @@ * @package ilias-setup */ if (false === file_exists(__DIR__ . '/../vendor/composer/vendor/autoload.php')) { - echo 'Could not find composers "autoload.php". Try to run "composer install" in the directory ".libs/composer"'; + echo 'Could not find composers "autoload.php". Try to run "composer install" in the directory ".vendor/composer"'; exit; } diff --git a/components/ILIAS/ADT_/test/ilComponentsADTSuite.php b/components/ILIAS/ADT_/test/ilComponentsADTSuite.php index fa0420612f14..3d734ed440ef 100644 --- a/components/ILIAS/ADT_/test/ilComponentsADTSuite.php +++ b/components/ILIAS/ADT_/test/ilComponentsADTSuite.php @@ -12,7 +12,7 @@ public static function suite(): ilComponentsADTSuite { $suite = new ilComponentsADTSuite(); - include_once("./components/ILIAS/ADT_/test/ilADTFactoryTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ADT_/test/ilADTFactoryTest.php"); $suite->addTestSuite(ilADTFactoryTest::class); return $suite; } diff --git a/components/ILIAS/AccessControl_/test/ilComponentsAccessControlSuite.php b/components/ILIAS/AccessControl_/test/ilComponentsAccessControlSuite.php index b056f575b1bf..085ec73ad127 100644 --- a/components/ILIAS/AccessControl_/test/ilComponentsAccessControlSuite.php +++ b/components/ILIAS/AccessControl_/test/ilComponentsAccessControlSuite.php @@ -26,7 +26,7 @@ public static function suite(): TestSuite { $suite = new ilComponentsAccessControlSuite(); /** @noRector */ - include_once("./components/ILIAS/AccessControl_/test/ilRBACTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/test/ilRBACTest.php"); $suite->addTestSuite(ilRBACTest::class); return $suite; } diff --git a/components/ILIAS/Accessibility_/test/ilComponentsAccessibilitySuite.php b/components/ILIAS/Accessibility_/test/ilComponentsAccessibilitySuite.php index d784751c37c9..1c775378ac76 100644 --- a/components/ILIAS/Accessibility_/test/ilComponentsAccessibilitySuite.php +++ b/components/ILIAS/Accessibility_/test/ilComponentsAccessibilitySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/Accessibility_/test/AccessibilityCriterionConfigTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Accessibility_/test/AccessibilityCriterionConfigTest.php"); $suite->addTestSuite("AccessibilityCriterionConfigTest"); return $suite; diff --git a/components/ILIAS/Accordion_/test/ilComponentsAccordionSuite.php b/components/ILIAS/Accordion_/test/ilComponentsAccordionSuite.php index 0840696b028c..d356efe3d121 100644 --- a/components/ILIAS/Accordion_/test/ilComponentsAccordionSuite.php +++ b/components/ILIAS/Accordion_/test/ilComponentsAccordionSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Accordion_/test/AccordionStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Accordion_/test/AccordionStandardGUIRequestTest.php"); $suite->addTestSuite("AccordionStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/ActiveRecord_/Fields/Converter/class.arConverter.php b/components/ILIAS/ActiveRecord_/Fields/Converter/class.arConverter.php index 144bb7efeb4a..1190c7c2d392 100644 --- a/components/ILIAS/ActiveRecord_/Fields/Converter/class.arConverter.php +++ b/components/ILIAS/ActiveRecord_/Fields/Converter/class.arConverter.php @@ -69,7 +69,7 @@ public function readStructure(): void public function downloadClassFile(): void { $header = "addTestSuite("ilServicesActiveRecordConnectorTest"); /** @noRector */ - require_once("./components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordFieldTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/test/ilServicesActiveRecordFieldTest.php"); $self->addTestSuite("ilServicesActiveRecordFieldTest"); return $self; diff --git a/components/ILIAS/Administration_/test/ilComponentsAdministrationSuite.php b/components/ILIAS/Administration_/test/ilComponentsAdministrationSuite.php index 5d9dbd110dd5..5394dd6bdb1a 100644 --- a/components/ILIAS/Administration_/test/ilComponentsAdministrationSuite.php +++ b/components/ILIAS/Administration_/test/ilComponentsAdministrationSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Administration_/test/AdminGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Administration_/test/AdminGUIRequestTest.php"); $suite->addTestSuite("AdminGUIRequestTest"); return $suite; diff --git a/components/ILIAS/AdministrativeNotification_/test/ilComponentsAdministrativeNotificationSuite.php b/components/ILIAS/AdministrativeNotification_/test/ilComponentsAdministrativeNotificationSuite.php index cade2ebb02b1..ac2e890c6f5b 100644 --- a/components/ILIAS/AdministrativeNotification_/test/ilComponentsAdministrativeNotificationSuite.php +++ b/components/ILIAS/AdministrativeNotification_/test/ilComponentsAdministrativeNotificationSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsAdministrativeNotificationSuite extends TestSuite { @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/AdministrativeNotification_/test/ilServicesAdministrativeNotificationTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AdministrativeNotification_/test/ilServicesAdministrativeNotificationTest.php"); $suite->addTestSuite("ilServicesAdministrativeNotificationTest"); return $suite; diff --git a/components/ILIAS/AdvancedEditing_/test/ilComponentsAdvancedEditingSuite.php b/components/ILIAS/AdvancedEditing_/test/ilComponentsAdvancedEditingSuite.php index 4b9700359d8a..7a3645978ca0 100644 --- a/components/ILIAS/AdvancedEditing_/test/ilComponentsAdvancedEditingSuite.php +++ b/components/ILIAS/AdvancedEditing_/test/ilComponentsAdvancedEditingSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/AdvancedEditing_/test/AdveStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AdvancedEditing_/test/AdveStandardGUIRequestTest.php"); $suite->addTestSuite("AdveStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/AdvancedMetaData_/test/ilComponentsAdvancedMetaDataSuite.php b/components/ILIAS/AdvancedMetaData_/test/ilComponentsAdvancedMetaDataSuite.php index 246a2cf57766..8f12d9b6870f 100644 --- a/components/ILIAS/AdvancedMetaData_/test/ilComponentsAdvancedMetaDataSuite.php +++ b/components/ILIAS/AdvancedMetaData_/test/ilComponentsAdvancedMetaDataSuite.php @@ -11,7 +11,7 @@ public static function suite(): self { $suite = new self(); - include_once './components/ILIAS/AdvancedMetaData_/test/record/ilAdvancedMDRecordObjectOrderingsTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AdvancedMetaData_/test/record/ilAdvancedMDRecordObjectOrderingsTest.php'; $suite->addTestSuite(ilAdvancedMDRecordObjectOrderingsTest::class); return $suite; diff --git a/components/ILIAS/AuthApache_/test/bootstrap.php b/components/ILIAS/AuthApache_/test/bootstrap.php index 6787e064ffaa..892a49ffad76 100644 --- a/components/ILIAS/AuthApache_/test/bootstrap.php +++ b/components/ILIAS/AuthApache_/test/bootstrap.php @@ -16,4 +16,4 @@ * *****************************************************************************/ -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/AuthShibboleth_/test/ilComponentsAuthShibbolethSuite.php b/components/ILIAS/AuthShibboleth_/test/ilComponentsAuthShibbolethSuite.php index 37df74bdfee0..a995214dd9bd 100644 --- a/components/ILIAS/AuthShibboleth_/test/ilComponentsAuthShibbolethSuite.php +++ b/components/ILIAS/AuthShibboleth_/test/ilComponentsAuthShibbolethSuite.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsAuthShibbolethSuite extends TestSuite { @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/AuthShibboleth_/test/ilServicesAuthShibbolethTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AuthShibboleth_/test/ilServicesAuthShibbolethTest.php"); $suite->addTestSuite("ilServicesAuthShibbolethTest"); return $suite; diff --git a/components/ILIAS/Awareness_/test/ilComponentsAwarenessSuite.php b/components/ILIAS/Awareness_/test/ilComponentsAwarenessSuite.php index aec61fdf006a..d363b6317a58 100644 --- a/components/ILIAS/Awareness_/test/ilComponentsAwarenessSuite.php +++ b/components/ILIAS/Awareness_/test/ilComponentsAwarenessSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php"); $suite->addTestSuite("AwarenessSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/BackgroundTasks/tests/BasicPersistenceTest.php b/components/ILIAS/BackgroundTasks/tests/BasicPersistenceTest.php index daf409e02569..3d41b2be45ad 100644 --- a/components/ILIAS/BackgroundTasks/tests/BasicPersistenceTest.php +++ b/components/ILIAS/BackgroundTasks/tests/BasicPersistenceTest.php @@ -37,9 +37,9 @@ use Mockery; use PHPUnit\Framework\TestCase; -require_once("vendor/composer/vendor/autoload.php"); -require_once("./components/ILIAS/ActiveRecord_/Connector/class.arConnector.php"); -require_once("./components/ILIAS/ActiveRecord_/Connector/class.arConnectorMap.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/Connector/class.arConnector.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ActiveRecord_/Connector/class.arConnectorMap.php"); /** * Class BackgroundTaskTest diff --git a/components/ILIAS/BackgroundTasks/tests/Implementation/Observer/BasicObserverTest.php b/components/ILIAS/BackgroundTasks/tests/Implementation/Observer/BasicObserverTest.php index 45493a50b8e8..f3746c06e075 100644 --- a/components/ILIAS/BackgroundTasks/tests/Implementation/Observer/BasicObserverTest.php +++ b/components/ILIAS/BackgroundTasks/tests/Implementation/Observer/BasicObserverTest.php @@ -30,7 +30,7 @@ use ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger; use Mockery\Adapter\Phpunit\MockeryTestCase; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); class BasicObserverTest extends MockeryTestCase { diff --git a/components/ILIAS/BackgroundTasks/tests/TaskTest.php b/components/ILIAS/BackgroundTasks/tests/TaskTest.php index 38c3c092d64c..8f0f1cf3befc 100644 --- a/components/ILIAS/BackgroundTasks/tests/TaskTest.php +++ b/components/ILIAS/BackgroundTasks/tests/TaskTest.php @@ -18,7 +18,7 @@ use ILIAS\BackgroundTasks\Types\SingleType; use PHPUnit\Framework\TestCase; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); /** * Class BackgroundTaskTest diff --git a/components/ILIAS/BackgroundTasks/tests/ValueTest.php b/components/ILIAS/BackgroundTasks/tests/ValueTest.php index cd6d60e1ac94..727141aad905 100644 --- a/components/ILIAS/BackgroundTasks/tests/ValueTest.php +++ b/components/ILIAS/BackgroundTasks/tests/ValueTest.php @@ -8,7 +8,7 @@ use ILIAS\BackgroundTasks\Types\SingleType; use PHPUnit\Framework\TestCase; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); /** * Class BackgroundTaskTest diff --git a/components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php b/components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php index 96b7e9edc076..08e7c7966043 100644 --- a/components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php +++ b/components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php @@ -17,7 +17,7 @@ *********************************************************************/ /** @noRector */ -require_once __DIR__ . "/../../../../vendor/composer/vendor/autoload.php"; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"; use ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager; use ILIAS\BackgroundTasks\Persistence; diff --git a/components/ILIAS/Badge_/test/ilComponentsBadgeSuite.php b/components/ILIAS/Badge_/test/ilComponentsBadgeSuite.php index 897260b873a3..3d1db19b6c88 100644 --- a/components/ILIAS/Badge_/test/ilComponentsBadgeSuite.php +++ b/components/ILIAS/Badge_/test/ilComponentsBadgeSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Badge_/test/BadgeManagementSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Badge_/test/BadgeManagementSessionRepositoryTest.php"); $suite->addTestSuite("BadgeManagementSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/Bibliographic_/test/ilComponentsBibliographicSuite.php b/components/ILIAS/Bibliographic_/test/ilComponentsBibliographicSuite.php index f12111c51ab2..8ceebecafdeb 100644 --- a/components/ILIAS/Bibliographic_/test/ilComponentsBibliographicSuite.php +++ b/components/ILIAS/Bibliographic_/test/ilComponentsBibliographicSuite.php @@ -40,10 +40,10 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/Bibliographic_/test/ilBibtechParserTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Bibliographic_/test/ilBibtechParserTest.php"); $suite->addTestSuite("ilBibtechParserTest"); /** @noRector */ - require_once("./components/ILIAS/Bibliographic_/test/ilRisParserTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Bibliographic_/test/ilRisParserTest.php"); $suite->addTestSuite("ilRisParserTest"); return $suite; diff --git a/components/ILIAS/Block_/test/ilComponentsBlockSuite.php b/components/ILIAS/Block_/test/ilComponentsBlockSuite.php index a23dba51c106..052db816374d 100644 --- a/components/ILIAS/Block_/test/ilComponentsBlockSuite.php +++ b/components/ILIAS/Block_/test/ilComponentsBlockSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): ilComponentsBlockSuite { $suite = new self(); - require_once("./components/ILIAS/Block_/test/BlockSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Block_/test/BlockSessionRepositoryTest.php"); $suite->addTestSuite("BlockSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/Blog_/test/ilComponentsBlogSuite.php b/components/ILIAS/Blog_/test/ilComponentsBlogSuite.php index e3f73824a466..3d9fa96febd6 100644 --- a/components/ILIAS/Blog_/test/ilComponentsBlogSuite.php +++ b/components/ILIAS/Blog_/test/ilComponentsBlogSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): ilComponentsBlogSuite { $suite = new self(); - require_once("./components/ILIAS/Blog_/test/BlogStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Blog_/test/BlogStandardGUIRequestTest.php"); $suite->addTestSuite("BlogStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/BookingManager_/test/ilComponentsBookingManagerSuite.php b/components/ILIAS/BookingManager_/test/ilComponentsBookingManagerSuite.php index 292b874da6ab..97966831a9fa 100644 --- a/components/ILIAS/BookingManager_/test/ilComponentsBookingManagerSuite.php +++ b/components/ILIAS/BookingManager_/test/ilComponentsBookingManagerSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/BookingManager_/test/BookManStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/BookingManager_/test/BookManStandardGUIRequestTest.php"); $suite->addTestSuite("BookManStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/COPage_/classes/class.ilCOPageExporter.php b/components/ILIAS/COPage_/classes/class.ilCOPageExporter.php index 61fb464fdc79..a10f0b42d34e 100644 --- a/components/ILIAS/COPage_/classes/class.ilCOPageExporter.php +++ b/components/ILIAS/COPage_/classes/class.ilCOPageExporter.php @@ -63,7 +63,7 @@ public function init(): void foreach ($component_repository->getPluginSlotById("pgcp")->getActivePlugins() as $plugin) { $plugin_name = $plugin->getName(); if ($plugin->supportsExport()) { - require_once('components/SERVICEPROVIDER/COPage/PageComponent/' + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/SERVICEPROVIDER/COPage/PageComponent/' . $plugin_name . '/classes/class.il' . $plugin_name . 'Exporter.php'); $this->plugin_dependencies[$plugin_name] = array( diff --git a/components/ILIAS/COPage_/classes/class.ilCOPageImporter.php b/components/ILIAS/COPage_/classes/class.ilCOPageImporter.php index 2bd6c7e4c4e1..b59ecdb40486 100644 --- a/components/ILIAS/COPage_/classes/class.ilCOPageImporter.php +++ b/components/ILIAS/COPage_/classes/class.ilCOPageImporter.php @@ -44,7 +44,7 @@ public function init(): void foreach ($component_repository->getPluginSlotById("pgcp")->getActivePlugins() as $plugin) { $plugin_name = $plugin->getName(); if ($plugin->supportsExport()) { - require_once('components/SERVICEPROVIDER/COPage/PageComponent/' + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/SERVICEPROVIDER/COPage/PageComponent/' . $plugin_name . '/classes/class.il' . $plugin_name . 'Importer.php'); $this->importer_plugins[] = $plugin_name; diff --git a/components/ILIAS/COPage_/classes/class.ilPCDataTableGUI.php b/components/ILIAS/COPage_/classes/class.ilPCDataTableGUI.php index 362a3c9511dc..a56bf4b12a67 100644 --- a/components/ILIAS/COPage_/classes/class.ilPCDataTableGUI.php +++ b/components/ILIAS/COPage_/classes/class.ilPCDataTableGUI.php @@ -274,7 +274,7 @@ protected function getCellContent(int $i, int $j): string true, false ); - include_once("./components/ILIAS/COPage_/classes/class.ilPCParagraphGUI.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/classes/class.ilPCParagraphGUI.php"); $s_text = ilPCParagraphGUI::xml2outputJS( $s_text, "TableContent", diff --git a/components/ILIAS/COPage_/classes/class.ilQuestionExporter.php b/components/ILIAS/COPage_/classes/class.ilQuestionExporter.php index db4b8d244fe4..6edd4bc09c9a 100644 --- a/components/ILIAS/COPage_/classes/class.ilQuestionExporter.php +++ b/components/ILIAS/COPage_/classes/class.ilQuestionExporter.php @@ -16,7 +16,7 @@ *********************************************************************/ -require_once("./components/ILIAS/TestQuestionPool_/classes/class.assQuestionGUI.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/classes/class.assQuestionGUI.php"); /** * Scorm 2004 Question Exporter diff --git a/components/ILIAS/COPage_/test/PCInteractiveImageTest.php b/components/ILIAS/COPage_/test/PCInteractiveImageTest.php index e01bf8bb3e06..558558b190ca 100644 --- a/components/ILIAS/COPage_/test/PCInteractiveImageTest.php +++ b/components/ILIAS/COPage_/test/PCInteractiveImageTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; -require_once("./components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php"); /** * @author Alexander Killing diff --git a/components/ILIAS/COPage_/test/PCMediaObjectTest.php b/components/ILIAS/COPage_/test/PCMediaObjectTest.php index af233310b763..3c6785b5f1a3 100644 --- a/components/ILIAS/COPage_/test/PCMediaObjectTest.php +++ b/components/ILIAS/COPage_/test/PCMediaObjectTest.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestCase; -require_once("./components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/ImageMap/class.ilMapArea.php"); /** * @author Alexander Killing diff --git a/components/ILIAS/COPage_/test/ilComponentsCOPageSuite.php b/components/ILIAS/COPage_/test/ilComponentsCOPageSuite.php index 7e0fda2823db..a42c1e059c9b 100644 --- a/components/ILIAS/COPage_/test/ilComponentsCOPageSuite.php +++ b/components/ILIAS/COPage_/test/ilComponentsCOPageSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,117 +31,117 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/COPage_/test/COPageTestBase.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/COPageTestBase.php"); - require_once("./components/ILIAS/COPage_/test/EditorEditSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/EditorEditSessionRepositoryTest.php"); $suite->addTestSuite("EditorEditSessionRepositoryTest"); - require_once("./components/ILIAS/COPage_/test/PCMapEditorSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCMapEditorSessionRepositoryTest.php"); $suite->addTestSuite("PCMapEditorSessionRepositoryTest"); - require_once("./components/ILIAS/COPage_/test/PCParagraphTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCParagraphTest.php"); $suite->addTestSuite("PCParagraphTest"); - require_once("./components/ILIAS/COPage_/test/PCSectionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCSectionTest.php"); $suite->addTestSuite("PCSectionTest"); - require_once("./cli/inc.xml5compliance.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/cli/inc.xml5compliance.php"); require_once("./cli/inc.xsl5compliance.php"); - require_once("./components/ILIAS/COPage_/test/class.ilUnitTestPageConfig.php"); - require_once("./components/ILIAS/COPage_/test/PageObjectTest.php"); - require_once("./components/ILIAS/COPage_/test/class.ilUnitTestPageObject.php"); - require_once("./components/ILIAS/COPage_/test/class.ilUnitTestPageManager.php"); - require_once("./components/ILIAS/COPage_/test/class.ilUnitTestPCDefinition.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/class.ilUnitTestPageConfig.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PageObjectTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/class.ilUnitTestPageObject.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/class.ilUnitTestPageManager.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/class.ilUnitTestPCDefinition.php"); $suite->addTestSuite("PageObjectTest"); - require_once("./components/ILIAS/COPage_/test/PCBlogTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCBlogTest.php"); $suite->addTestSuite("PCBlogTest"); - require_once("./components/ILIAS/COPage_/test/PCContentIncludeTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCContentIncludeTest.php"); $suite->addTestSuite("PCContentIncludeTest"); - require_once("./components/ILIAS/COPage_/test/PCDataTableTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCDataTableTest.php"); $suite->addTestSuite("PCDataTableTest"); - require_once("./components/ILIAS/COPage_/test/PCTableDataTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCTableDataTest.php"); $suite->addTestSuite("PCTableDataTest"); - require_once("./components/ILIAS/COPage_/test/PCContentTemplateTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCContentTemplateTest.php"); $suite->addTestSuite("PCContentTemplateTest"); - require_once("./components/ILIAS/COPage_/test/PCFileListTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCFileListTest.php"); $suite->addTestSuite("PCFileListTest"); - require_once("./components/ILIAS/COPage_/test/PCGridTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCGridTest.php"); $suite->addTestSuite("PCGridTest"); - require_once("./components/ILIAS/COPage_/test/PCInteractiveImageTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCInteractiveImageTest.php"); $suite->addTestSuite("PCInteractiveImageTest"); - require_once("./components/ILIAS/COPage_/test/PCListTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCListTest.php"); $suite->addTestSuite("PCListTest"); - require_once("./components/ILIAS/COPage_/test/PCLoginPageElementTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCLoginPageElementTest.php"); $suite->addTestSuite("PCLoginPageElementTest"); - require_once("./components/ILIAS/COPage_/test/PCMapTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCMapTest.php"); $suite->addTestSuite("PCMapTest"); - require_once("./components/ILIAS/COPage_/test/PCMediaObjectTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCMediaObjectTest.php"); $suite->addTestSuite("PCMediaObjectTest"); - require_once("./components/ILIAS/COPage_/test/PCPlaceholderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCPlaceholderTest.php"); $suite->addTestSuite("PCPlaceHolderTest"); - require_once("./components/ILIAS/COPage_/test/PCPluggedTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCPluggedTest.php"); $suite->addTestSuite("PCPluggedTest"); - require_once("./components/ILIAS/COPage_/test/PCProfileTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCProfileTest.php"); $suite->addTestSuite("PCProfileTest"); - require_once("./components/ILIAS/COPage_/test/PCQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCQuestionTest.php"); $suite->addTestSuite("PCQuestionTest"); - require_once("./components/ILIAS/COPage_/test/PCQuestionOverviewTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCQuestionOverviewTest.php"); $suite->addTestSuite("PCQuestionOverviewTest"); - require_once("./components/ILIAS/COPage_/test/PCResourcesTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCResourcesTest.php"); $suite->addTestSuite("PCResourcesTest"); - require_once("./components/ILIAS/COPage_/test/PCSkillsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCSkillsTest.php"); $suite->addTestSuite("PCSkillsTest"); - require_once("./components/ILIAS/COPage_/test/PCSourceCodeTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCSourceCodeTest.php"); $suite->addTestSuite("PCSourceCodeTest"); - require_once("./components/ILIAS/COPage_/test/PCTabsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCTabsTest.php"); $suite->addTestSuite("PCTabsTest"); - require_once("./components/ILIAS/COPage_/test/PCVerificationTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PCVerificationTest.php"); $suite->addTestSuite("PCVerificationTest"); - require_once("./components/ILIAS/COPage_/test/ID/ContentIdManagerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/ID/ContentIdManagerTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\ID\ContentIdManagerTest::class); - require_once("./components/ILIAS/COPage_/test/Compare/PageCompareTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/Compare/PageCompareTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\Compare\PageCompareTest::class); - require_once("./components/ILIAS/COPage_/test/Page/PageContentManagerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/Page/PageContentManagerTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\Page\PageContentManagerTest::class); - require_once("./components/ILIAS/COPage_/test/PC/PCFactoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PC/PCFactoryTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\PC\PCFactoryTest::class); - require_once("./components/ILIAS/COPage_/test/PC/PCDefinitionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PC/PCDefinitionTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\PC\PCDefinitionTest::class); - require_once("./components/ILIAS/COPage_/test/Link/LinkManagerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/Link/LinkManagerTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\Link\LinkManagerTest::class); - require_once("./components/ILIAS/COPage_/test/PC/FileList/FileListManagerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/PC/FileList/FileListManagerTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\PC\FileList\FileListManagerTest::class); - require_once("./components/ILIAS/COPage_/test/Layout/PageLayoutTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/COPage_/test/Layout/PageLayoutTest.php"); $suite->addTestSuite(\ILIAS\COPage\Test\Layout\PageLayoutTest::class); return $suite; diff --git a/components/ILIAS/Cache/tests/CacheTest.php b/components/ILIAS/Cache/tests/CacheTest.php index 983f3a4ac211..88b23248b297 100644 --- a/components/ILIAS/Cache/tests/CacheTest.php +++ b/components/ILIAS/Cache/tests/CacheTest.php @@ -32,7 +32,7 @@ use ILIAS\Cache\Nodes\NodeRepository; use ILIAS\Cache\Nodes\NullNodeRepository; -require_once(__DIR__ . '/../../../../vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * @author Fabian Schmid diff --git a/components/ILIAS/Cache_/test/ilComponentsCacheSuite.php b/components/ILIAS/Cache_/test/ilComponentsCacheSuite.php index 7cf95426f35c..f01f2ab6c624 100644 --- a/components/ILIAS/Cache_/test/ilComponentsCacheSuite.php +++ b/components/ILIAS/Cache_/test/ilComponentsCacheSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Personal workspace test suite @@ -29,7 +29,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Cache_/test/ilCacheTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Cache_/test/ilCacheTest.php"); $suite->addTestSuite("ilCacheTest"); return $suite; diff --git a/components/ILIAS/Calendar_/classes/class.ilCalendarRemoteAccessHandler.php b/components/ILIAS/Calendar_/classes/class.ilCalendarRemoteAccessHandler.php index a3a0314d4f22..cd70af3e2b6a 100644 --- a/components/ILIAS/Calendar_/classes/class.ilCalendarRemoteAccessHandler.php +++ b/components/ILIAS/Calendar_/classes/class.ilCalendarRemoteAccessHandler.php @@ -120,13 +120,13 @@ protected function initTokenHandler(): void protected function initIlias() { - include_once './components/ILIAS/Context_/classes/class.ilContext.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_ICAL); - include_once './components/ILIAS/Authentication_/classes/class.ilAuthFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthFactory.php'; ilAuthFactory::setContext(ilAuthFactory::CONTEXT_CALENDAR_TOKEN); - include_once './components/ILIAS/Init_/classes/class.ilInitialisation.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); global $DIC; diff --git a/components/ILIAS/Calendar_/test/ilComponentsCalendarSuite.php b/components/ILIAS/Calendar_/test/ilComponentsCalendarSuite.php index 6176d48db619..e7576f58d47b 100644 --- a/components/ILIAS/Calendar_/test/ilComponentsCalendarSuite.php +++ b/components/ILIAS/Calendar_/test/ilComponentsCalendarSuite.php @@ -16,7 +16,7 @@ class ilComponentsCalendarSuite extends TestSuite public static function suite(): self { $suite = new ilComponentsCalendarSuite(); - include_once './components/ILIAS/Calendar_/test/class.ilCalendarRecurrenceCalculationTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Calendar_/test/class.ilCalendarRecurrenceCalculationTest.php'; $suite->addTestSuite(ilCalendarRecurrenceCalculationTest::class); return $suite; } diff --git a/components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReferenceListGUI.php b/components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReferenceListGUI.php index 30fdc4a154c0..656d9e71668a 100644 --- a/components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReferenceListGUI.php +++ b/components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReferenceListGUI.php @@ -103,7 +103,7 @@ public function initItem( $this->reference_ref_id = $ref_id; $this->reference_obj_id = $obj_id; - include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); $target_obj_id = ilContainerReference::_lookupTargetId($obj_id); $target_ref_ids = ilObject::_getAllReferences($target_obj_id); diff --git a/components/ILIAS/CategoryReference_/test/ilComponentsCategoryReferenceSuite.php b/components/ILIAS/CategoryReference_/test/ilComponentsCategoryReferenceSuite.php index 058bef2d4af8..4fbdf0915ba0 100644 --- a/components/ILIAS/CategoryReference_/test/ilComponentsCategoryReferenceSuite.php +++ b/components/ILIAS/CategoryReference_/test/ilComponentsCategoryReferenceSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/CategoryReference_/test/CategoryReferenceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/CategoryReference_/test/CategoryReferenceTest.php"); $suite->addTestSuite("CategoryReferenceTest"); return $suite; diff --git a/components/ILIAS/Category_/test/ilComponentsCategorySuite.php b/components/ILIAS/Category_/test/ilComponentsCategorySuite.php index 42774abf310b..2a188d4f23f6 100644 --- a/components/ILIAS/Category_/test/ilComponentsCategorySuite.php +++ b/components/ILIAS/Category_/test/ilComponentsCategorySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Category_/test/CatStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Category_/test/CatStandardGUIRequestTest.php"); $suite->addTestSuite("CatStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Certificate_/classes/Helper/ilCertificateDateHelper.php b/components/ILIAS/Certificate_/classes/Helper/ilCertificateDateHelper.php index 80782d2c8b84..18676acd749d 100644 --- a/components/ILIAS/Certificate_/classes/Helper/ilCertificateDateHelper.php +++ b/components/ILIAS/Certificate_/classes/Helper/ilCertificateDateHelper.php @@ -29,7 +29,7 @@ class ilCertificateDateHelper public function formatDate($date, ?int $dateFormat = null): string { if (null === $dateFormat) { - require_once 'components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE $dateFormat = IL_CAL_DATETIME; } @@ -50,7 +50,7 @@ public function formatDate($date, ?int $dateFormat = null): string public function formatDateTime($dateTime, ?int $dateFormat = null): string { if (null === $dateFormat) { - require_once 'components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE $dateFormat = IL_CAL_DATETIME; } diff --git a/components/ILIAS/Certificate_/classes/Placeholder/Values/class.ilDefaultPlaceholderValues.php b/components/ILIAS/Certificate_/classes/Placeholder/Values/class.ilDefaultPlaceholderValues.php index 4d5d5af7f77e..4894f4eebf90 100644 --- a/components/ILIAS/Certificate_/classes/Placeholder/Values/class.ilDefaultPlaceholderValues.php +++ b/components/ILIAS/Certificate_/classes/Placeholder/Values/class.ilDefaultPlaceholderValues.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Calendar_/classes/class.ilDateTime.php'; // Required because of global contant IL_CAL_DATE /** * Collection of basic placeholder values that can be used diff --git a/components/ILIAS/Certificate_/test/bootstrap.php b/components/ILIAS/Certificate_/test/bootstrap.php index 1a96e285cab4..4f998ee46c37 100644 --- a/components/ILIAS/Certificate_/test/bootstrap.php +++ b/components/ILIAS/Certificate_/test/bootstrap.php @@ -21,5 +21,5 @@ /** * @author Niels Theen */ -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once __DIR__ . '/ilCertificateBaseTestCase.php'; diff --git a/components/ILIAS/Chart_/test/ilComponentsChartSuite.php b/components/ILIAS/Chart_/test/ilComponentsChartSuite.php index a8d2a48254ab..1114900918f9 100644 --- a/components/ILIAS/Chart_/test/ilComponentsChartSuite.php +++ b/components/ILIAS/Chart_/test/ilComponentsChartSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Chart_/test/ChartDataLinesTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Chart_/test/ChartDataLinesTest.php"); $suite->addTestSuite("ChartDataLinesTest"); return $suite; diff --git a/components/ILIAS/Chatroom_/test/bootstrap.php b/components/ILIAS/Chatroom_/test/bootstrap.php index 4caacc082f2c..131c4124c732 100644 --- a/components/ILIAS/Chatroom_/test/bootstrap.php +++ b/components/ILIAS/Chatroom_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Classification_/classes/class.ilClassificationBlockGUI.php b/components/ILIAS/Classification_/classes/class.ilClassificationBlockGUI.php index 84ce0d66bc02..ce9a85a4a6ca 100644 --- a/components/ILIAS/Classification_/classes/class.ilClassificationBlockGUI.php +++ b/components/ILIAS/Classification_/classes/class.ilClassificationBlockGUI.php @@ -251,7 +251,7 @@ protected function filterContainer(): void $valid_objects = array(); // :TODO: not sure if this makes sense... - include_once "components/ILIAS/Object_/classes/class.ilObjectListGUIPreloader.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectListGUIPreloader.php"; $preloader = new ilObjectListGUIPreloader(ilObjectListGUI::CONTEXT_REPOSITORY); foreach ($matching as $item) { @@ -362,7 +362,7 @@ protected function filterContainer(): void protected function initProviders(bool $a_check_post = false): void { if (!isset(self::$providers_cache[$this->parent_ref_id])) { - include_once "components/ILIAS/Classification_/classes/class.ilClassificationProvider.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Classification_/classes/class.ilClassificationProvider.php"; self::$providers_cache[$this->parent_ref_id] = ilClassificationProvider::getValidProviders( $this->parent_ref_id, $this->parent_obj_id, diff --git a/components/ILIAS/Classification_/test/ilComponentsClassificationSuite.php b/components/ILIAS/Classification_/test/ilComponentsClassificationSuite.php index 5be4a46bbf4f..dfd284d7ccb3 100644 --- a/components/ILIAS/Classification_/test/ilComponentsClassificationSuite.php +++ b/components/ILIAS/Classification_/test/ilComponentsClassificationSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Classification_/test/ClassificationSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Classification_/test/ClassificationSessionRepositoryTest.php"); $suite->addTestSuite("ClassificationSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/CmiXapi_/classes/XapiProxy/DataService.php b/components/ILIAS/CmiXapi_/classes/XapiProxy/DataService.php index 5b081ac976ab..80a247e5cf0f 100644 --- a/components/ILIAS/CmiXapi_/classes/XapiProxy/DataService.php +++ b/components/ILIAS/CmiXapi_/classes/XapiProxy/DataService.php @@ -36,7 +36,7 @@ public static function initIlias(string $client_id): void // define('IL_COOKIE_EXPIRE', 0); // define('IL_COOKIE_PATH', '/'); // define('IL_COOKIE_DOMAIN', ''); - require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); \ilContext::init(\ilContext::CONTEXT_SCORM); \ilInitialisation::initILIAS(); // Remember original values @@ -49,7 +49,7 @@ public static function initIlias(string $client_id): void // $_SERVER['REQUEST_URI'] = ''; // $_SERVER['PHP_SELF'] = '/index.php'; // $_SERVER['HTTP_HOST'] = self::getIniHost(); - // require_once "./components/ILIAS/Utilities_/classes/class.ilUtil.php"; + // require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Utilities_/classes/class.ilUtil.php"; // //ilInitialisation::initIliasIniFile(); // ilInitialisation::initClientIniFile(); // ilInitialisation::initDatabase(); diff --git a/components/ILIAS/CmiXapi_/classes/class.ilCmiXapiExporter.php b/components/ILIAS/CmiXapi_/classes/class.ilCmiXapiExporter.php index 65c47433ab98..1fb1648bb4bd 100644 --- a/components/ILIAS/CmiXapi_/classes/class.ilCmiXapiExporter.php +++ b/components/ILIAS/CmiXapi_/classes/class.ilCmiXapiExporter.php @@ -44,7 +44,7 @@ public function __construct() /* $this->main_object = $a_main_object; - include_once("./components/ILIAS/CmiXapi_/classes/class.ilCmiXapiDataSet.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/CmiXapi_/classes/class.ilCmiXapiDataSet.php"); $this->dataset = new ilCmiXapiDataSet($this->main_object->getRefId()); $this->getXmlRepresentation(self::ENTITY, self::SCHEMA_VERSION, $this->main_object->getRefId()); */ diff --git a/components/ILIAS/CmiXapi_/xapiproxy.php b/components/ILIAS/CmiXapi_/xapiproxy.php index 7afb48eb5510..6e2753b1a7a6 100644 --- a/components/ILIAS/CmiXapi_/xapiproxy.php +++ b/components/ILIAS/CmiXapi_/xapiproxy.php @@ -73,7 +73,7 @@ } else { chdir("../../../"); } -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); //instead of DataService \ilContext::init(\ilContext::CONTEXT_SCORM); \ilInitialisation::initILIAS(); diff --git a/components/ILIAS/CmiXapi_/xapitoken.php b/components/ILIAS/CmiXapi_/xapitoken.php index 9e4c7c1ac08f..e87f11352dfd 100644 --- a/components/ILIAS/CmiXapi_/xapitoken.php +++ b/components/ILIAS/CmiXapi_/xapitoken.php @@ -19,7 +19,7 @@ *********************************************************************/ chdir("../../../"); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * see: https://github.com/AICC/CMI-5_Spec_Current/blob/quartz/cmi5_spec.md#fetch_url diff --git a/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettings.php b/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettings.php index 76f2848e13da..ca7a13042a9a 100644 --- a/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettings.php +++ b/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettings.php @@ -16,7 +16,7 @@ ******************************************************************** */ -require_once "./components/ILIAS/Object_/classes/class.ilObject.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObject.php"; /** * Settings for components (modules, services, plugins). diff --git a/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettingsAccess.php b/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettingsAccess.php index 304bd9ee2ad3..b3f37b4af627 100644 --- a/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettingsAccess.php +++ b/components/ILIAS/Component_/classes/Settings/class.ilObjComponentSettingsAccess.php @@ -16,7 +16,7 @@ ******************************************************************** */ -include_once("./components/ILIAS/Object_/classes/class.ilObjectAccess.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectAccess.php"); /** * Class ilObjComponentSettingsAccess diff --git a/components/ILIAS/Component_/classes/class.ilPluginLP.php b/components/ILIAS/Component_/classes/class.ilPluginLP.php index 6d39f129b9c3..0657b3cef0ea 100644 --- a/components/ILIAS/Component_/classes/class.ilPluginLP.php +++ b/components/ILIAS/Component_/classes/class.ilPluginLP.php @@ -16,7 +16,7 @@ ******************************************************************** */ -include_once "components/ILIAS/Object_/classes/class.ilObjectLP.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectLP.php"; /** * Plugin to lp connector diff --git a/components/ILIAS/Component_/test/ilComponentsComponentSuite.php b/components/ILIAS/Component_/test/ilComponentsComponentSuite.php index da677079a190..6852a51e117c 100644 --- a/components/ILIAS/Component_/test/ilComponentsComponentSuite.php +++ b/components/ILIAS/Component_/test/ilComponentsComponentSuite.php @@ -24,31 +24,31 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Component_/test/ilComponentDefinitionReaderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilComponentDefinitionReaderTest.php"); $suite->addTestSuite(ilComponentDefinitionReaderTest::class); - require_once("./components/ILIAS/Component_/test/ilComponentInfoTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilComponentInfoTest.php"); $suite->addTestSuite(ilComponentInfoTest::class); - require_once("./components/ILIAS/Component_/test/ilPluginSlotInfoTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilPluginSlotInfoTest.php"); $suite->addTestSuite(ilPluginSlotInfoTest::class); - require_once("./components/ILIAS/Component_/test/ilPluginInfoTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilPluginInfoTest.php"); $suite->addTestSuite(ilPluginInfoTest::class); - require_once("./components/ILIAS/Component_/test/Setup/ilComponentDefinitionInfoProcessorTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/Setup/ilComponentDefinitionInfoProcessorTest.php"); $suite->addTestSuite(ilComponentDefinitionInfoProcessorTest::class); - require_once("./components/ILIAS/Component_/test/Setup/ilComponentBuildPluginInfoObjectiveTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/Setup/ilComponentBuildPluginInfoObjectiveTest.php"); $suite->addTestSuite(ilComponentBuildPluginInfoObjectiveTest::class); - require_once("./components/ILIAS/Component_/test/ilArtifactComponentRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilArtifactComponentRepositoryTest.php"); $suite->addTestSuite(ilArtifactComponentRepositoryTest::class); - require_once("./components/ILIAS/Component_/test/ilPluginStateDBOverIlDBInterfaceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/ilPluginStateDBOverIlDBInterfaceTest.php"); $suite->addTestSuite(ilPluginStateDBOverIlDBInterfaceTest::class); - require_once("./components/ILIAS/Component_/test/Settings/ilPluginsOverviewTableTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Component_/test/Settings/ilPluginsOverviewTableTest.php"); $suite->addTestSuite(ilPluginsOverviewTableTest::class); return $suite; diff --git a/components/ILIAS/Conditions_/test/ilComponentsConditionsSuite.php b/components/ILIAS/Conditions_/test/ilComponentsConditionsSuite.php index 6c51d84d5f98..b5fb30ce7810 100644 --- a/components/ILIAS/Conditions_/test/ilComponentsConditionsSuite.php +++ b/components/ILIAS/Conditions_/test/ilComponentsConditionsSuite.php @@ -27,7 +27,7 @@ public static function suite(): self { $suite = new ilComponentsConditionsSuite(); - include_once("./components/ILIAS/Conditions_/test/ilConditionsTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Conditions_/test/ilConditionsTest.php"); $suite->addTestSuite(ilConditionsTest::class); return $suite; } diff --git a/components/ILIAS/Contact_/BuddySystem/test/bootstrap.php b/components/ILIAS/Contact_/BuddySystem/test/bootstrap.php index f021154e6b2f..e644a2d9f55b 100644 --- a/components/ILIAS/Contact_/BuddySystem/test/bootstrap.php +++ b/components/ILIAS/Contact_/BuddySystem/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Contact_/test/bootstrap.php b/components/ILIAS/Contact_/test/bootstrap.php index 5ccf2ed7ebbf..e644a2d9f55b 100644 --- a/components/ILIAS/Contact_/test/bootstrap.php +++ b/components/ILIAS/Contact_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceGUI.php b/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceGUI.php index fd33e2fb2a3d..29c762f12676 100644 --- a/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceGUI.php +++ b/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceGUI.php @@ -84,7 +84,7 @@ public function executeCommand(): void case 'ilpermissiongui': $ilTabs->setTabActive('perm_settings'); - include_once("components/ILIAS/AccessControl_/classes/class.ilPermissionGUI.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/classes/class.ilPermissionGUI.php"); $ilCtrl->forwardCommand(new ilPermissionGUI($this)); break; @@ -260,7 +260,7 @@ protected function initForm(int $a_mode = self::MODE_EDIT): ilPropertyFormGUI $ttype->addOption($custom); $form->addItem($ttype); - include_once("./components/ILIAS/Form_/classes/class.ilRepositorySelector2InputGUI.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilRepositorySelector2InputGUI.php"); $repo = new ilRepositorySelector2InputGUI($this->lng->txt("objref_edit_ref"), "target_id"); //$repo->setParent($this); $repo->setRequired(true); diff --git a/components/ILIAS/ContainerReference_/test/ilComponentsContainerReferenceSuite.php b/components/ILIAS/ContainerReference_/test/ilComponentsContainerReferenceSuite.php index 005558e161a9..6a0183365e17 100644 --- a/components/ILIAS/ContainerReference_/test/ilComponentsContainerReferenceSuite.php +++ b/components/ILIAS/ContainerReference_/test/ilComponentsContainerReferenceSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/ContainerReference_/test/ContRefStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ContainerReference_/test/ContRefStandardGUIRequestTest.php"); $suite->addTestSuite("ContRefStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Container_/test/ilComponentsContainerSuite.php b/components/ILIAS/Container_/test/ilComponentsContainerSuite.php index 27d87b6db3e8..81d306244f3c 100644 --- a/components/ILIAS/Container_/test/ilComponentsContainerSuite.php +++ b/components/ILIAS/Container_/test/ilComponentsContainerSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Container_/test/ContentViewManagerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Container_/test/ContentViewManagerTest.php"); $suite->addTestSuite("ContentViewManagerTest"); return $suite; diff --git a/components/ILIAS/ContentPage_/test/bootstrap.php b/components/ILIAS/ContentPage_/test/bootstrap.php index 4caacc082f2c..131c4124c732 100644 --- a/components/ILIAS/ContentPage_/test/bootstrap.php +++ b/components/ILIAS/ContentPage_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Context_/test/ilComponentsContextSuite.php b/components/ILIAS/Context_/test/ilComponentsContextSuite.php index 171f441eb76e..b91e445e26e6 100644 --- a/components/ILIAS/Context_/test/ilComponentsContextSuite.php +++ b/components/ILIAS/Context_/test/ilComponentsContextSuite.php @@ -13,7 +13,7 @@ public static function suite(): self { $suite = new ilComponentsContextSuite(); - require_once("components/ILIAS/Context_/test/ilContextTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Context_/test/ilContextTest.php"); $suite->addTestSuite("ilContextTest"); diff --git a/components/ILIAS/Context_/test/ilContextTest.php b/components/ILIAS/Context_/test/ilContextTest.php index e7ee91773f3d..e858cbce7fee 100644 --- a/components/ILIAS/Context_/test/ilContextTest.php +++ b/components/ILIAS/Context_/test/ilContextTest.php @@ -12,7 +12,7 @@ class ilContextTest extends TestCase { protected function setUp(): void { - require_once("components/ILIAS/Context_/test/class.ilContextExtended.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Context_/test/class.ilContextExtended.php"); } /** diff --git a/components/ILIAS/CopyWizard_/test/ilComponentsCopyWizardSuite.php b/components/ILIAS/CopyWizard_/test/ilComponentsCopyWizardSuite.php index 479428f654a3..612951e7861a 100644 --- a/components/ILIAS/CopyWizard_/test/ilComponentsCopyWizardSuite.php +++ b/components/ILIAS/CopyWizard_/test/ilComponentsCopyWizardSuite.php @@ -12,7 +12,7 @@ public static function suite() { $suite = new ilComponentsCopyWizardSuite(); - include_once("./components/ILIAS/CopyWizard_/test/ilCopyWizardOptionsTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/CopyWizard_/test/ilCopyWizardOptionsTest.php"); $suite->addTestSuite(ilCopyWizardOptionsTest::class); return $suite; } diff --git a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceExporter.php b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceExporter.php index e0fc29f23bc2..40c00e19a830 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceExporter.php +++ b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceExporter.php @@ -2,8 +2,8 @@ /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/Export_/classes/class.ilXmlExporter.php'; -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceExporter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Export_/classes/class.ilXmlExporter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceExporter.php'; /** * Class for category export @@ -20,7 +20,7 @@ class ilCourseReferenceExporter extends ilContainerReferenceExporter */ protected function initWriter(ilContainerReference $ref): ilContainerReferenceXmlWriter { - include_once './components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php'; return new ilCourseReferenceXmlWriter($ref); } } diff --git a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceImporter.php b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceImporter.php index e74d35885784..14f421596ed7 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceImporter.php +++ b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceImporter.php @@ -2,8 +2,8 @@ /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once("./components/ILIAS/Export_/classes/class.ilXmlImporter.php"); -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceImporter.php'; +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Export_/classes/class.ilXmlImporter.php"); +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceImporter.php'; /** diff --git a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlParser.php b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlParser.php index db7e04477046..3833f5d619ec 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlParser.php +++ b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlParser.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlParser.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlParser.php'; /** diff --git a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php index 4616613fa7d9..403772dadfd7 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php +++ b/components/ILIAS/CourseReference_/classes/class.ilCourseReferenceXmlWriter.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlWriter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlWriter.php'; /** * Class for container reference export diff --git a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php index c2bb621692e8..15c0b8735ff6 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php +++ b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); /** * diff --git a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php index e5a86907f875..a7db51e488a4 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php +++ b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php @@ -16,7 +16,7 @@ * *********************************************************************/ -include_once("./components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceAccess.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceAccess.php"); /** * @@ -41,7 +41,7 @@ public function _checkAccess(string $cmd, string $permission, int $ref_id, int $ case 'visible': case 'read': case 'edit_learning_progress': - include_once './components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php'; $target_ref_id = ilObjCourseReference::_lookupTargetRefId($obj_id); if (!$target_ref_id || !$DIC->access()->checkAccessOfUser($user_id, $permission, $cmd, $target_ref_id)) { @@ -81,7 +81,7 @@ public static function _getCommands($a_ref_id = 0): array array("permission" => "write", "cmd" => "editReference", "lang_var" => "edit") ); } else { - include_once('./components/ILIAS/Course_/classes/class.ilObjCourseAccess.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilObjCourseAccess.php'); $commands = ilObjCourseAccess::_getCommands(); } return $commands; diff --git a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceListGUI.php b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceListGUI.php index 539d8ee813b5..5a9cb8a157ce 100644 --- a/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceListGUI.php +++ b/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceListGUI.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once "./components/ILIAS/Course_/classes/class.ilObjCourseListGUI.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Course_/classes/class.ilObjCourseListGUI.php"; /** * @@ -128,7 +128,7 @@ public function initItem( $this->reference_obj_id = $obj_id; - include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); $target_obj_id = ilContainerReference::_lookupTargetId($obj_id); $target_ref_ids = ilObject::_getAllReferences($target_obj_id); @@ -141,7 +141,7 @@ public function initItem( parent::initItem($target_ref_id, $target_obj_id, $type, $target_title, $target_description); // general commands array - include_once('./components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CourseReference_/classes/class.ilObjCourseReferenceAccess.php'); $this->commands = ilObjCourseReferenceAccess::_getCommands($this->reference_ref_id); if ($ilAccess->checkAccess('write', '', $this->reference_ref_id) or $this->deleted) { diff --git a/components/ILIAS/Course_/test/ilComponentsCourseSuite.php b/components/ILIAS/Course_/test/ilComponentsCourseSuite.php index ac4b6fbab0c2..1a3b47035f93 100644 --- a/components/ILIAS/Course_/test/ilComponentsCourseSuite.php +++ b/components/ILIAS/Course_/test/ilComponentsCourseSuite.php @@ -24,10 +24,10 @@ public static function suite(): self $suite = new self(); /** @noRector */ - include_once './components/ILIAS/Course_/test/ilCourseMailTemplateTutorContextTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/test/ilCourseMailTemplateTutorContextTest.php'; $suite->addTestSuite("ilCourseMailTemplateTutorContextTest"); - include_once './components/ILIAS/Course_/test/Timings/ilTimingAcceptedTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/test/Timings/ilTimingAcceptedTest.php'; $suite->addTestSuite(ilTimingAcceptedTest::class); return $suite; diff --git a/components/ILIAS/Cron_/classes/class.ilCronStartUp.php b/components/ILIAS/Cron_/classes/class.ilCronStartUp.php index 7d949b39f807..43d574353dc1 100644 --- a/components/ILIAS/Cron_/classes/class.ilCronStartUp.php +++ b/components/ILIAS/Cron_/classes/class.ilCronStartUp.php @@ -33,7 +33,7 @@ public function __construct( // TODO @see mantis 20371: To get rid of this, the authentication service has to provide a mechanism to pass the client_id $_GET['client_id'] = $this->client; - require_once './cli/inc.header.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.header.php'; if (null === $authSession) { global $DIC; diff --git a/components/ILIAS/Cron_/test/bootstrap.php b/components/ILIAS/Cron_/test/bootstrap.php index 4caacc082f2c..131c4124c732 100644 --- a/components/ILIAS/Cron_/test/bootstrap.php +++ b/components/ILIAS/Cron_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Dashboard_/test/ilComponentsDashboardSuite.php b/components/ILIAS/Dashboard_/test/ilComponentsDashboardSuite.php index 4e903ce30f21..685325c73302 100644 --- a/components/ILIAS/Dashboard_/test/ilComponentsDashboardSuite.php +++ b/components/ILIAS/Dashboard_/test/ilComponentsDashboardSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/Dashboard_/test/DashboardViewSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Dashboard_/test/DashboardViewSettingsTest.php"); $suite->addTestSuite("DashboardViewSettingsTest"); return $suite; diff --git a/components/ILIAS/Data/tests/AlphanumericTest.php b/components/ILIAS/Data/tests/AlphanumericTest.php index 60b7dfb4a492..d9e125948717 100644 --- a/components/ILIAS/Data/tests/AlphanumericTest.php +++ b/components/ILIAS/Data/tests/AlphanumericTest.php @@ -13,7 +13,7 @@ use ILIAS\Refinery\ConstraintViolationException; use PHPUnit\Framework\TestCase; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class AlphanumericTest extends TestCase { diff --git a/components/ILIAS/Data/tests/ClientIdTest.php b/components/ILIAS/Data/tests/ClientIdTest.php index 110829343bec..eb8f93c7f2b8 100644 --- a/components/ILIAS/Data/tests/ClientIdTest.php +++ b/components/ILIAS/Data/tests/ClientIdTest.php @@ -4,7 +4,7 @@ /* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/ColorTest.php b/components/ILIAS/Data/tests/ColorTest.php index 9b9a9d28cdc0..908511b1cb92 100644 --- a/components/ILIAS/Data/tests/ColorTest.php +++ b/components/ILIAS/Data/tests/ColorTest.php @@ -4,7 +4,7 @@ /* Copyright (c) 2017 Nils Haagen Extended GPL, see docs/LICENSE */ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/DataFactoryTest.php b/components/ILIAS/Data/tests/DataFactoryTest.php index 45934b5fa09c..8d06c87d4103 100644 --- a/components/ILIAS/Data/tests/DataFactoryTest.php +++ b/components/ILIAS/Data/tests/DataFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/DataReadmeTest.php b/components/ILIAS/Data/tests/DataReadmeTest.php index 778fd36a8180..a6ee8314986c 100644 --- a/components/ILIAS/Data/tests/DataReadmeTest.php +++ b/components/ILIAS/Data/tests/DataReadmeTest.php @@ -4,7 +4,7 @@ /* Copyright (c) 2017 Stefan Hecken Extended GPL, see docs/LICENSE */ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/DataSizeTest.php b/components/ILIAS/Data/tests/DataSizeTest.php index 45c819672a6a..837f35f09e7b 100644 --- a/components/ILIAS/Data/tests/DataSizeTest.php +++ b/components/ILIAS/Data/tests/DataSizeTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data\DataSize; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/DatasetTest.php b/components/ILIAS/Data/tests/DatasetTest.php index a9be498042da..2d33bd497fee 100644 --- a/components/ILIAS/Data/tests/DatasetTest.php +++ b/components/ILIAS/Data/tests/DatasetTest.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Data; use ILIAS\Data\Chart; diff --git a/components/ILIAS/Data/tests/DateFormatTest.php b/components/ILIAS/Data/tests/DateFormatTest.php index 5812ea610532..f799dcce7a1f 100644 --- a/components/ILIAS/Data/tests/DateFormatTest.php +++ b/components/ILIAS/Data/tests/DateFormatTest.php @@ -17,7 +17,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data\DateFormat; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/DimensionTest.php b/components/ILIAS/Data/tests/DimensionTest.php index 1a8c1a3b3a7a..af63b53d6d21 100644 --- a/components/ILIAS/Data/tests/DimensionTest.php +++ b/components/ILIAS/Data/tests/DimensionTest.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Data\Dimension; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/PasswordTest.php b/components/ILIAS/Data/tests/PasswordTest.php index 90c765383d46..f80e9bd4965e 100644 --- a/components/ILIAS/Data/tests/PasswordTest.php +++ b/components/ILIAS/Data/tests/PasswordTest.php @@ -4,7 +4,7 @@ /* Copyright (c) 2018 Nils Haagen Extended GPL, see docs/LICENSE */ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/PositiveIntegerTest.php b/components/ILIAS/Data/tests/PositiveIntegerTest.php index 6b2eb28d1b94..dc69edb2f75a 100644 --- a/components/ILIAS/Data/tests/PositiveIntegerTest.php +++ b/components/ILIAS/Data/tests/PositiveIntegerTest.php @@ -13,7 +13,7 @@ use ILIAS\Refinery\ConstraintViolationException; use PHPUnit\Framework\TestCase; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); class PositiveIntegerTest extends TestCase { diff --git a/components/ILIAS/Data/tests/ResultTest.php b/components/ILIAS/Data/tests/ResultTest.php index 72b91f73b29d..1b1c014b147a 100644 --- a/components/ILIAS/Data/tests/ResultTest.php +++ b/components/ILIAS/Data/tests/ResultTest.php @@ -4,7 +4,7 @@ /* Copyright (c) 2017 Stefan Hecken Extended GPL, see docs/LICENSE */ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/URITest.php b/components/ILIAS/Data/tests/URITest.php index 609c203c2c88..4688c4d8fe1c 100644 --- a/components/ILIAS/Data/tests/URITest.php +++ b/components/ILIAS/Data/tests/URITest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\Data; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Data/tests/UuidTest.php b/components/ILIAS/Data/tests/UuidTest.php index 93464d969cc5..a4f23c03f34c 100644 --- a/components/ILIAS/Data/tests/UuidTest.php +++ b/components/ILIAS/Data/tests/UuidTest.php @@ -2,7 +2,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use PHPUnit\Framework\TestCase; use ILIAS\Data\UUID\Factory; diff --git a/components/ILIAS/DataCollection_/classes/class.ilDataCollectionGlobalTemplate.php b/components/ILIAS/DataCollection_/classes/class.ilDataCollectionGlobalTemplate.php index 75150d1c4bb9..5578a074be21 100644 --- a/components/ILIAS/DataCollection_/classes/class.ilDataCollectionGlobalTemplate.php +++ b/components/ILIAS/DataCollection_/classes/class.ilDataCollectionGlobalTemplate.php @@ -19,8 +19,8 @@ declare(strict_types=1); -include_once("./components/ILIAS/UICore_/lib/html-it/IT.php"); -include_once("./components/ILIAS/UICore_/lib/html-it/ITX.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UICore_/lib/html-it/IT.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UICore_/lib/html-it/ITX.php"); class ilDataCollectionGlobalTemplate implements ilGlobalTemplateInterface { @@ -639,7 +639,7 @@ public function setLocator(): void { $html = ""; - include_once("./components/ILIAS/UIComponent_/classes/class.ilUIHookProcessor.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UIComponent_/classes/class.ilUIHookProcessor.php"); $html = $this->locator->getHTML(); $uip = new ilUIHookProcessor( "components/ILIAS/Locator_", diff --git a/components/ILIAS/DataSet_/test/ilComponentsDataSetSuite.php b/components/ILIAS/DataSet_/test/ilComponentsDataSetSuite.php index 753db7da532a..9d971ab3bbcc 100644 --- a/components/ILIAS/DataSet_/test/ilComponentsDataSetSuite.php +++ b/components/ILIAS/DataSet_/test/ilComponentsDataSetSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): \ilComponentsDataSetSuite { $suite = new self(); - require_once("./components/ILIAS/DataSet_/test/DataSetImportParserTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/DataSet_/test/DataSetImportParserTest.php"); $suite->addTestSuite("DataSetImportParserTest"); return $suite; diff --git a/components/ILIAS/Database_/test/ilComponentsDatabaseSuite.php b/components/ILIAS/Database_/test/ilComponentsDatabaseSuite.php index cae07194b681..013cf43d95d3 100644 --- a/components/ILIAS/Database_/test/ilComponentsDatabaseSuite.php +++ b/components/ILIAS/Database_/test/ilComponentsDatabaseSuite.php @@ -35,10 +35,10 @@ public static function suite(): \ilComponentsDatabaseSuite { $suite = new self(); /** @noRector */ - require_once('./components/ILIAS/Database_/test/Setup/ilDatabaseSetupSuite.php'); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Database_/test/Setup/ilDatabaseSetupSuite.php'); $suite->addTestSuite(ilDatabaseSetupSuite::suite()); - require_once('./components/ILIAS/Database_/test/Integrity/Suite.php'); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Database_/test/Integrity/Suite.php'); $suite->addTestSuite(IntegritySuite::suite()); return $suite; diff --git a/components/ILIAS/DidacticTemplate_/test/ilComponentsDidacticTemplateSuite.php b/components/ILIAS/DidacticTemplate_/test/ilComponentsDidacticTemplateSuite.php index fb37885db766..70f8cb746d6a 100644 --- a/components/ILIAS/DidacticTemplate_/test/ilComponentsDidacticTemplateSuite.php +++ b/components/ILIAS/DidacticTemplate_/test/ilComponentsDidacticTemplateSuite.php @@ -12,7 +12,7 @@ public static function suite(): self { $suite = new ilComponentsDidacticTemplateSuite(); - include_once("./components/ILIAS/DidacticTemplate_/test/ilDidacticTemplatePatternTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/DidacticTemplate_/test/ilDidacticTemplatePatternTest.php"); $suite->addTestSuite(ilDidacticTemplatePatternTest::class); return $suite; } diff --git a/components/ILIAS/EmployeeTalk_/test/ilComponentsEmployeeTalkSuite.php b/components/ILIAS/EmployeeTalk_/test/ilComponentsEmployeeTalkSuite.php index 4e3e47cbd219..4fdc5387aa9b 100644 --- a/components/ILIAS/EmployeeTalk_/test/ilComponentsEmployeeTalkSuite.php +++ b/components/ILIAS/EmployeeTalk_/test/ilComponentsEmployeeTalkSuite.php @@ -19,7 +19,7 @@ use PHPUnit\Framework\TestSuite; /** @noRector */ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsEmployeeTalkSuite extends TestSuite { @@ -27,7 +27,7 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/EmployeeTalk_/test/ilModulesEmployeeTalkVEventTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/EmployeeTalk_/test/ilModulesEmployeeTalkVEventTest.php"); $suite->addTestSuite("ilModulesEmployeeTalkVEventTest"); return $suite; diff --git a/components/ILIAS/Environment_/test/bootstrap.php b/components/ILIAS/Environment_/test/bootstrap.php index a202f8f69342..8a2863ced1ea 100644 --- a/components/ILIAS/Environment_/test/bootstrap.php +++ b/components/ILIAS/Environment_/test/bootstrap.php @@ -18,4 +18,4 @@ * *********************************************************************/ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/EventHandling_/test/EventTest.php b/components/ILIAS/EventHandling_/test/EventTest.php index 4160b4bd786a..ae62798a328a 100644 --- a/components/ILIAS/EventHandling_/test/EventTest.php +++ b/components/ILIAS/EventHandling_/test/EventTest.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase; use ILIAS\DI\Container; -require_once __DIR__ . "/../../../../vendor/composer/vendor/autoload.php"; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"; /** * Test clipboard repository diff --git a/components/ILIAS/EventHandling_/test/ilComponentsEventHandlingSuite.php b/components/ILIAS/EventHandling_/test/ilComponentsEventHandlingSuite.php index 747b47514143..3d9721dd0d38 100644 --- a/components/ILIAS/EventHandling_/test/ilComponentsEventHandlingSuite.php +++ b/components/ILIAS/EventHandling_/test/ilComponentsEventHandlingSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/EventHandling_/test/EventTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/EventHandling_/test/EventTest.php"); $suite->addTestSuite("EventTest"); return $suite; diff --git a/components/ILIAS/Excel_/test/ilComponentsExcelSuite.php b/components/ILIAS/Excel_/test/ilComponentsExcelSuite.php index 8cd3dc389231..92faa494c2a7 100644 --- a/components/ILIAS/Excel_/test/ilComponentsExcelSuite.php +++ b/components/ILIAS/Excel_/test/ilComponentsExcelSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Excel_/test/ExcelTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Excel_/test/ExcelTest.php"); $suite->addTestSuite("ExcelTest"); return $suite; diff --git a/components/ILIAS/Exceptions_/test/ilComponentsExceptionsSuite.php b/components/ILIAS/Exceptions_/test/ilComponentsExceptionsSuite.php index c501e21eb67f..b581e36d2b21 100644 --- a/components/ILIAS/Exceptions_/test/ilComponentsExceptionsSuite.php +++ b/components/ILIAS/Exceptions_/test/ilComponentsExceptionsSuite.php @@ -23,7 +23,7 @@ class ilComponentsExceptionsSuite extends TestSuite public static function suite(): self { $suite = new self(); - include_once('./components/ILIAS/Exceptions_/test/ilExceptionTest.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exceptions_/test/ilExceptionTest.php'); $suite->addTestSuite(ilExceptionTest::class); return $suite; } diff --git a/components/ILIAS/Exercise_/test/ilComponentsExerciseSuite.php b/components/ILIAS/Exercise_/test/ilComponentsExerciseSuite.php index c91e6376affe..7dbea591cf0e 100644 --- a/components/ILIAS/Exercise_/test/ilComponentsExerciseSuite.php +++ b/components/ILIAS/Exercise_/test/ilComponentsExerciseSuite.php @@ -28,7 +28,7 @@ class ilComponentsExerciseSuite extends TestSuite public static function suite() { /** @noRector */ - require_once "./components/ILIAS/Exercise_/test/PeerReview/ExcPeerReviewTest.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Exercise_/test/PeerReview/ExcPeerReviewTest.php"; $suite = new ilComponentsExerciseSuite(); $suite->addTestSuite("ExcPeerReviewTest"); diff --git a/components/ILIAS/Export_/test/ilComponentsExportSuite.php b/components/ILIAS/Export_/test/ilComponentsExportSuite.php index 28eb3ec16219..3ba9aaa49545 100644 --- a/components/ILIAS/Export_/test/ilComponentsExportSuite.php +++ b/components/ILIAS/Export_/test/ilComponentsExportSuite.php @@ -26,7 +26,7 @@ public static function suite() { $suite = new ilComponentsExportSuite(); - include_once("./components/ILIAS/Export_/test/ilExportOptionsTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Export_/test/ilExportOptionsTest.php"); $suite->addTestSuite(ilExportOptionsTest::class); return $suite; } diff --git a/components/ILIAS/Feeds_/test/ilComponentsFeedsSuite.php b/components/ILIAS/Feeds_/test/ilComponentsFeedsSuite.php index 690ec98f221b..e3815dfa697d 100644 --- a/components/ILIAS/Feeds_/test/ilComponentsFeedsSuite.php +++ b/components/ILIAS/Feeds_/test/ilComponentsFeedsSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Feeds_/test/FeedItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Feeds_/test/FeedItemTest.php"); $suite->addTestSuite("FeedItemTest"); return $suite; diff --git a/components/ILIAS/FileDelivery_/classes/Delivery.php b/components/ILIAS/FileDelivery_/classes/Delivery.php index 5d5be904a0b5..24db6f3f5096 100644 --- a/components/ILIAS/FileDelivery_/classes/Delivery.php +++ b/components/ILIAS/FileDelivery_/classes/Delivery.php @@ -228,7 +228,7 @@ private function detemineDeliveryType(): void if (is_file('./components/ILIAS/FileDelivery_/classes/override.php')) { $override_delivery_type = false; /** @noRector */ - require_once('./components/ILIAS/FileDelivery_/classes/override.php'); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/FileDelivery_/classes/override.php'); if ($override_delivery_type) { $this->setDeliveryType($override_delivery_type); } diff --git a/components/ILIAS/FileServices_/test/ilComponentsFileServicesSuite.php b/components/ILIAS/FileServices_/test/ilComponentsFileServicesSuite.php index 0aa1a4f436b0..da56d048ac4c 100644 --- a/components/ILIAS/FileServices_/test/ilComponentsFileServicesSuite.php +++ b/components/ILIAS/FileServices_/test/ilComponentsFileServicesSuite.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsFileServicesSuite extends TestSuite { @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/FileServices_/test/ilServicesFileServicesTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/FileServices_/test/ilServicesFileServicesTest.php"); $suite->addTestSuite("ilServicesFileServicesTest"); return $suite; diff --git a/components/ILIAS/FileSystem_/test/ilComponentsFileSystemSuite.php b/components/ILIAS/FileSystem_/test/ilComponentsFileSystemSuite.php index 9fd1d4a958a1..0d6c328a9491 100644 --- a/components/ILIAS/FileSystem_/test/ilComponentsFileSystemSuite.php +++ b/components/ILIAS/FileSystem_/test/ilComponentsFileSystemSuite.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsFileSystemSuite extends TestSuite { @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/FileSystem_/test/ilServicesFileSystemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/FileSystem_/test/ilServicesFileSystemTest.php"); $suite->addTestSuite("ilServicesFileSystemTest"); return $suite; diff --git a/components/ILIAS/FileUpload/tests/Collection/EntryLockingStringMapTest.php b/components/ILIAS/FileUpload/tests/Collection/EntryLockingStringMapTest.php index a3494de03ba6..7bc356ea2e7c 100644 --- a/components/ILIAS/FileUpload/tests/Collection/EntryLockingStringMapTest.php +++ b/components/ILIAS/FileUpload/tests/Collection/EntryLockingStringMapTest.php @@ -6,7 +6,7 @@ use ILIAS\FileUpload\Collection\Exception\NoSuchElementException; use PHPUnit\Framework\TestCase; -require_once './vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Class EntryLockingStringMapTest diff --git a/components/ILIAS/FileUpload/tests/FileUploadImplTest.php b/components/ILIAS/FileUpload/tests/FileUploadImplTest.php index 9eedf861da3a..8c09b0d2d895 100644 --- a/components/ILIAS/FileUpload/tests/FileUploadImplTest.php +++ b/components/ILIAS/FileUpload/tests/FileUploadImplTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Filesystems; use ILIAS\Filesystem\Stream\Streams; diff --git a/components/ILIAS/FileUpload/tests/Processor/BlacklistExtensionPreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/BlacklistExtensionPreProcessorTest.php index c6977f14141c..a0baaa6d14f7 100644 --- a/components/ILIAS/FileUpload/tests/Processor/BlacklistExtensionPreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/BlacklistExtensionPreProcessorTest.php @@ -18,7 +18,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\Streams; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/BlacklistFileHeaderPreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/BlacklistFileHeaderPreProcessorTest.php index 12f4322b13ae..65c9ffcd75a6 100644 --- a/components/ILIAS/FileUpload/tests/Processor/BlacklistFileHeaderPreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/BlacklistFileHeaderPreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\Streams; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/BlacklistMimeTypePreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/BlacklistMimeTypePreProcessorTest.php index a650cc50e954..c3ce4cf74bc8 100644 --- a/components/ILIAS/FileUpload/tests/Processor/BlacklistMimeTypePreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/BlacklistMimeTypePreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\FileStream; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/FilenameOverridePreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/FilenameOverridePreProcessorTest.php index 4dff1aa20f5a..264dd13d92c4 100644 --- a/components/ILIAS/FileUpload/tests/Processor/FilenameOverridePreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/FilenameOverridePreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\Streams; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/PreProcessorManagerImplTest.php b/components/ILIAS/FileUpload/tests/Processor/PreProcessorManagerImplTest.php index 27eefb4203a0..b3143bb0afea 100644 --- a/components/ILIAS/FileUpload/tests/Processor/PreProcessorManagerImplTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/PreProcessorManagerImplTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\FileStream; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/SVGPreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/SVGPreProcessorTest.php index 580c0cd4c11d..433546112b14 100644 --- a/components/ILIAS/FileUpload/tests/Processor/SVGPreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/SVGPreProcessorTest.php @@ -18,7 +18,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/WhitelistExtensionPreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/WhitelistExtensionPreProcessorTest.php index ba7a3f5c3a70..ac3ac51327e3 100644 --- a/components/ILIAS/FileUpload/tests/Processor/WhitelistExtensionPreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/WhitelistExtensionPreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\Streams; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/WhitelistFileHeaderPreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/WhitelistFileHeaderPreProcessorTest.php index c11cfe0d484f..903cf9469bd6 100644 --- a/components/ILIAS/FileUpload/tests/Processor/WhitelistFileHeaderPreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/WhitelistFileHeaderPreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\Streams; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/FileUpload/tests/Processor/WhitelistMimeTypePreProcessorTest.php b/components/ILIAS/FileUpload/tests/Processor/WhitelistMimeTypePreProcessorTest.php index a4902d4209c7..42219a2a80d1 100644 --- a/components/ILIAS/FileUpload/tests/Processor/WhitelistMimeTypePreProcessorTest.php +++ b/components/ILIAS/FileUpload/tests/Processor/WhitelistMimeTypePreProcessorTest.php @@ -2,7 +2,7 @@ namespace ILIAS\FileUpload\Processor; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\Filesystem\Stream\FileStream; use ILIAS\FileUpload\DTO\Metadata; diff --git a/components/ILIAS/File_/test/ilComponentsFileSuite.php b/components/ILIAS/File_/test/ilComponentsFileSuite.php index c14af0f66b25..6efbe83ee521 100644 --- a/components/ILIAS/File_/test/ilComponentsFileSuite.php +++ b/components/ILIAS/File_/test/ilComponentsFileSuite.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestSuite; /** @noRector */ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsFileSuite extends TestSuite { @@ -29,7 +29,7 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/File_/test/ilModulesFileTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/File_/test/ilModulesFileTest.php"); $suite->addTestSuite("ilModulesFileTest"); return $suite; diff --git a/components/ILIAS/Folder_/test/ilComponentsFolderSuite.php b/components/ILIAS/Folder_/test/ilComponentsFolderSuite.php index e16527c19e92..eb4e58b0f41c 100644 --- a/components/ILIAS/Folder_/test/ilComponentsFolderSuite.php +++ b/components/ILIAS/Folder_/test/ilComponentsFolderSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Folder_/test/FoldStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Folder_/test/FoldStandardGUIRequestTest.php"); $suite->addTestSuite("FoldStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Form_/test/ilComponentsFormSuite.php b/components/ILIAS/Form_/test/ilComponentsFormSuite.php index 02f14d81d73f..f8a2a8125ca4 100644 --- a/components/ILIAS/Form_/test/ilComponentsFormSuite.php +++ b/components/ILIAS/Form_/test/ilComponentsFormSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/Form_/test/FormGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/test/FormGUITest.php"); $suite->addTestSuite("FormGUITest"); return $suite; diff --git a/components/ILIAS/Forum_/test/bootstrap.php b/components/ILIAS/Forum_/test/bootstrap.php index 5ccf2ed7ebbf..e644a2d9f55b 100644 --- a/components/ILIAS/Forum_/test/bootstrap.php +++ b/components/ILIAS/Forum_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/GlobalScreen/src/Client/callback_handler.php b/components/ILIAS/GlobalScreen/src/Client/callback_handler.php index 2a7adea46058..53a02b117e8c 100644 --- a/components/ILIAS/GlobalScreen/src/Client/callback_handler.php +++ b/components/ILIAS/GlobalScreen/src/Client/callback_handler.php @@ -2,9 +2,9 @@ namespace ILIAS\GlobalScreen\Client; -chdir(strstr(__DIR__, '/src', true)); +chdir(strstr(__DIR__, '/components/ILIAS', true)); /** @noRector */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); if (php_sapi_name() !== 'cli') { (new CallbackHandler())->run(); diff --git a/components/ILIAS/GlobalScreen/src/Client/notify.php b/components/ILIAS/GlobalScreen/src/Client/notify.php index 9e1f5e540f20..9bc9d86a7f24 100644 --- a/components/ILIAS/GlobalScreen/src/Client/notify.php +++ b/components/ILIAS/GlobalScreen/src/Client/notify.php @@ -24,6 +24,6 @@ chdir("../../../"); /** @noRector */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); \ilInitialisation::initILIAS(); (new Notifications())->run(); diff --git a/components/ILIAS/GlobalScreen/src/Client/toggle.php b/components/ILIAS/GlobalScreen/src/Client/toggle.php index 0800e20fb9d6..ad5ca45454ef 100644 --- a/components/ILIAS/GlobalScreen/src/Client/toggle.php +++ b/components/ILIAS/GlobalScreen/src/Client/toggle.php @@ -17,7 +17,7 @@ * *********************************************************************/ /** @noRector */ -require_once('../Scope/MainMenu/Collector/Renderer/Hasher.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/Scope/MainMenu/Collector/Renderer/Hasher.php'); /** @noRector */ require_once('ItemState.php'); /** @noRector */ diff --git a/components/ILIAS/GlobalScreen/tests/Identification/IdentificationFactoryTest.php b/components/ILIAS/GlobalScreen/tests/Identification/IdentificationFactoryTest.php index 5459c48576ae..69974738b908 100644 --- a/components/ILIAS/GlobalScreen/tests/Identification/IdentificationFactoryTest.php +++ b/components/ILIAS/GlobalScreen/tests/Identification/IdentificationFactoryTest.php @@ -18,7 +18,7 @@ use ReflectionMethod; use Serializable; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class IdentificationFactoryTest diff --git a/components/ILIAS/GlobalScreen/tests/Identification/IdentificationTest.php b/components/ILIAS/GlobalScreen/tests/Identification/IdentificationTest.php index 5041095f83d6..32cd3204f8d2 100644 --- a/components/ILIAS/GlobalScreen/tests/Identification/IdentificationTest.php +++ b/components/ILIAS/GlobalScreen/tests/Identification/IdentificationTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase; use LogicException; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class IdentificationFactoryTest diff --git a/components/ILIAS/GlobalScreen/tests/MainMenu/CollectorTest.php b/components/ILIAS/GlobalScreen/tests/MainMenu/CollectorTest.php index c9507be5d4b3..05ee746ca162 100644 --- a/components/ILIAS/GlobalScreen/tests/MainMenu/CollectorTest.php +++ b/components/ILIAS/GlobalScreen/tests/MainMenu/CollectorTest.php @@ -17,7 +17,7 @@ use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; use PHPUnit\Framework\TestCase; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class CollectorTest diff --git a/components/ILIAS/GlobalScreen/tests/MainMenu/FactoryImplTest.php b/components/ILIAS/GlobalScreen/tests/MainMenu/FactoryImplTest.php index 635c870498cc..e5952885afb9 100644 --- a/components/ILIAS/GlobalScreen/tests/MainMenu/FactoryImplTest.php +++ b/components/ILIAS/GlobalScreen/tests/MainMenu/FactoryImplTest.php @@ -12,7 +12,7 @@ use ReflectionClass; use ReflectionMethod; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class FactoryImplTest diff --git a/components/ILIAS/GlobalScreen/tests/MainMenu/MapTest.php b/components/ILIAS/GlobalScreen/tests/MainMenu/MapTest.php index 9b34241fa971..2b339ded8ec9 100644 --- a/components/ILIAS/GlobalScreen/tests/MainMenu/MapTest.php +++ b/components/ILIAS/GlobalScreen/tests/MainMenu/MapTest.php @@ -29,7 +29,7 @@ use PHPUnit\Framework\TestCase; use ILIAS\GlobalScreen\Scope\MainMenu\Factory\TopItem\TopParentItem; -// require_once('./vendor/composer/vendor/autoload.php'); +// require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class FactoryImplTest diff --git a/components/ILIAS/GlobalScreen/tests/Notification/BaseNotificationSetUp.php b/components/ILIAS/GlobalScreen/tests/Notification/BaseNotificationSetUp.php index 73ddc097dbd0..f319fdb7acc0 100644 --- a/components/ILIAS/GlobalScreen/tests/Notification/BaseNotificationSetUp.php +++ b/components/ILIAS/GlobalScreen/tests/Notification/BaseNotificationSetUp.php @@ -31,7 +31,7 @@ use ILIAS\UI\Implementation\Component as I; use ILIAS\UI\Implementation\Component\Counter\Factory; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); require_once(__DIR__ . "/../../../UI/tests/Base.php"); /** diff --git a/components/ILIAS/GlobalScreen/tests/Notification/NotificationServicesTest.php b/components/ILIAS/GlobalScreen/tests/Notification/NotificationServicesTest.php index c8038150a8b1..fa4e9984b5ad 100644 --- a/components/ILIAS/GlobalScreen/tests/Notification/NotificationServicesTest.php +++ b/components/ILIAS/GlobalScreen/tests/Notification/NotificationServicesTest.php @@ -20,7 +20,7 @@ use ILIAS\GlobalScreen\Scope\Notification\Factory\NotificationFactory; use PHPUnit\Framework\TestCase; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class NotificationFactoryTest diff --git a/components/ILIAS/GlobalScreen/tests/Scope/Layout/MediaTest.php b/components/ILIAS/GlobalScreen/tests/Scope/Layout/MediaTest.php index d73512f9cc08..0847904f5293 100644 --- a/components/ILIAS/GlobalScreen/tests/Scope/Layout/MediaTest.php +++ b/components/ILIAS/GlobalScreen/tests/Scope/Layout/MediaTest.php @@ -8,7 +8,7 @@ use ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\InlineCss; use ILIAS\GlobalScreen\Scope\Layout\MetaContent\Media\Js; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class MediaTest diff --git a/components/ILIAS/GlobalScreen/tests/Scope/Layout/MetaDataTest.php b/components/ILIAS/GlobalScreen/tests/Scope/Layout/MetaDataTest.php index 34bab5af546e..3bb8965882ac 100644 --- a/components/ILIAS/GlobalScreen/tests/Scope/Layout/MetaDataTest.php +++ b/components/ILIAS/GlobalScreen/tests/Scope/Layout/MetaDataTest.php @@ -23,7 +23,7 @@ use ILIAS\GlobalScreen\Scope\Layout\MetaContent\MetaContent; use ILIAS\Data\Meta\Html; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); /** * Class MetaDataTest diff --git a/components/ILIAS/GlobalScreen/tests/Toast/BaseToastSetUp.php b/components/ILIAS/GlobalScreen/tests/Toast/BaseToastSetUp.php index cc5948d7c59a..a434ad883209 100644 --- a/components/ILIAS/GlobalScreen/tests/Toast/BaseToastSetUp.php +++ b/components/ILIAS/GlobalScreen/tests/Toast/BaseToastSetUp.php @@ -26,7 +26,7 @@ use ILIAS\DI\Container; use ILIAS\GlobalScreen\Scope\Toast\Factory\ToastFactory; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); require_once(__DIR__ . "/../../../UI/tests/Base.php"); abstract class BaseToastSetUp extends TestCase diff --git a/components/ILIAS/GlobalScreen/tests/Toast/ToastServicesTest.php b/components/ILIAS/GlobalScreen/tests/Toast/ToastServicesTest.php index fa4f3c28b66d..bac2e3fbfb26 100644 --- a/components/ILIAS/GlobalScreen/tests/Toast/ToastServicesTest.php +++ b/components/ILIAS/GlobalScreen/tests/Toast/ToastServicesTest.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase; use ILIAS\GlobalScreen\Scope\Toast\Factory\ToastFactory; -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ToastServicesTest extends TestCase { diff --git a/components/ILIAS/GlobalScreen_/test/ilComponentsGlobalScreenSuite.php b/components/ILIAS/GlobalScreen_/test/ilComponentsGlobalScreenSuite.php index 99bd95edf65a..d4578bcb4056 100644 --- a/components/ILIAS/GlobalScreen_/test/ilComponentsGlobalScreenSuite.php +++ b/components/ILIAS/GlobalScreen_/test/ilComponentsGlobalScreenSuite.php @@ -24,7 +24,7 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/GlobalScreen_/test/ilServicesGlobalScreenTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/GlobalScreen_/test/ilServicesGlobalScreenTest.php"); $suite->addTestSuite("ilServicesGlobalScreenTest"); return $suite; diff --git a/components/ILIAS/Glossary_/test/ilComponentsGlossarySuite.php b/components/ILIAS/Glossary_/test/ilComponentsGlossarySuite.php index 2e13240b512c..4087d2f605ed 100644 --- a/components/ILIAS/Glossary_/test/ilComponentsGlossarySuite.php +++ b/components/ILIAS/Glossary_/test/ilComponentsGlossarySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Glossary_/test/GloPresentationGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Glossary_/test/GloPresentationGUIRequestTest.php"); $suite->addTestSuite("GloPresentationGUIRequestTest"); return $suite; diff --git a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceExporter.php b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceExporter.php index d2cab763a35b..611b908b02d4 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceExporter.php +++ b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceExporter.php @@ -2,8 +2,8 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/Export_/classes/class.ilXmlExporter.php'; -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceExporter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Export_/classes/class.ilXmlExporter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceExporter.php'; /** * Class for group reference export @@ -21,7 +21,7 @@ class ilGroupReferenceExporter extends ilContainerReferenceExporter */ protected function initWriter(ilContainerReference $ref): ilContainerReferenceXmlWriter { - include_once './components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php'; return new ilGroupReferenceXmlWriter($ref); } } diff --git a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceImporter.php b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceImporter.php index c4291d64b2e7..e17e4ba354e8 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceImporter.php +++ b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceImporter.php @@ -2,8 +2,8 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once("./components/ILIAS/Export_/classes/class.ilXmlImporter.php"); -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceImporter.php'; +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Export_/classes/class.ilXmlImporter.php"); +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceImporter.php'; /** diff --git a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlParser.php b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlParser.php index 05082854a623..6302350ecbae 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlParser.php +++ b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlParser.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlParser.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlParser.php'; /** diff --git a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php index 993021ce2192..780643e2a65d 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php +++ b/components/ILIAS/GroupReference_/classes/class.ilGroupReferenceXmlWriter.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlWriter.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceXmlWriter.php'; /** * Class for container reference export diff --git a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php index 10f81b617d80..e7490ffa6918 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php +++ b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); /** * @author Fabian Wolf diff --git a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php index 2901d2a981e3..f2929f5ce827 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php +++ b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once("./components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceAccess.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ContainerReference_/classes/class.ilContainerReferenceAccess.php"); /** * @author Fabian Wolf @@ -29,7 +29,7 @@ public function _checkAccess(string $cmd, string $permission, int $ref_id, int $ switch ($permission) { case 'visible': case 'read': - include_once './components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php'; $target_ref_id = ilObjGroupReference::_lookupTargetRefId($obj_id); if (!$ilAccess->checkAccessOfUser($user_id, $permission, $cmd, $target_ref_id)) { @@ -72,7 +72,7 @@ public static function _getCommands($a_ref_id = 0): array array("permission" => "write", "cmd" => "editReference", "lang_var" => "edit") ); } else { - include_once('./components/ILIAS/Group_/classes/class.ilObjGroupAccess.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilObjGroupAccess.php'); $commands = ilObjGroupAccess::_getCommands(); } return $commands; diff --git a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceGUI.php b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceGUI.php index 6d5511559c7a..fc823456b74d 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceGUI.php +++ b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceGUI.php @@ -56,10 +56,10 @@ public function executeCommand(): void */ public static function _goto($a_target) { - include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); $target_ref_id = ilContainerReference::_lookupTargetRefId(ilObject::_lookupObjId($a_target)); - include_once('./components/ILIAS/Group_/classes/class.ilObjGroupGUI.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilObjGroupGUI.php'); ilObjGroupGUI::_goto($target_ref_id); } } diff --git a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceListGUI.php b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceListGUI.php index d874e37efcae..37b03b7195ca 100644 --- a/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceListGUI.php +++ b/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceListGUI.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once "./components/ILIAS/Group_/classes/class.ilObjGroupListGUI.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/classes/class.ilObjGroupListGUI.php"; /** * @author Fabian Wolf @@ -109,7 +109,7 @@ public function initItem( $this->reference_obj_id = $obj_id; - include_once('./components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php'); $target_obj_id = ilContainerReference::_lookupTargetId($obj_id); $target_ref_ids = ilObject::_getAllReferences($target_obj_id); @@ -122,7 +122,7 @@ public function initItem( parent::initItem($target_ref_id, $target_obj_id, $type, $target_title, $target_description); // general commands array - include_once('./components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/GroupReference_/classes/class.ilObjGroupReferenceAccess.php'); $this->commands = ilObjGroupReferenceAccess::_getCommands($this->reference_ref_id); if ($ilAccess->checkAccess('write', '', $this->reference_ref_id) or $this->deleted) { diff --git a/components/ILIAS/Group_/test/ilComponentsGroupSuite.php b/components/ILIAS/Group_/test/ilComponentsGroupSuite.php index cea33f9e3d2f..32ae1d730df9 100644 --- a/components/ILIAS/Group_/test/ilComponentsGroupSuite.php +++ b/components/ILIAS/Group_/test/ilComponentsGroupSuite.php @@ -11,7 +11,7 @@ class ilComponentsGroupSuite extends TestSuite public static function suite() { $suite = new ilComponentsGroupSuite(); - include_once("./components/ILIAS/Group_/test/ilGroupEventHandlerTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/test/ilGroupEventHandlerTest.php"); $suite->addTestSuite(ilGroupEventHandlerTest::class); return $suite; } diff --git a/components/ILIAS/HTMLLearningModule_/test/ilComponentsHTMLLearningModuleSuite.php b/components/ILIAS/HTMLLearningModule_/test/ilComponentsHTMLLearningModuleSuite.php index ce6af9c54301..97e4f45cbcf5 100644 --- a/components/ILIAS/HTMLLearningModule_/test/ilComponentsHTMLLearningModuleSuite.php +++ b/components/ILIAS/HTMLLearningModule_/test/ilComponentsHTMLLearningModuleSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/HTMLLearningModule_/test/HTMLLearningModuleStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/HTMLLearningModule_/test/HTMLLearningModuleStandardGUIRequestTest.php"); $suite->addTestSuite("HTMLLearningModuleStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Help_/test/ilComponentsHelpSuite.php b/components/ILIAS/Help_/test/ilComponentsHelpSuite.php index b1c898ba47f3..bdfa85213167 100644 --- a/components/ILIAS/Help_/test/ilComponentsHelpSuite.php +++ b/components/ILIAS/Help_/test/ilComponentsHelpSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Help_/test/HelpStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Help_/test/HelpStandardGUIRequestTest.php"); $suite->addTestSuite("HelpStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/History_/test/ilComponentsHistorySuite.php b/components/ILIAS/History_/test/ilComponentsHistorySuite.php index d2701bde60b3..132c602aeda4 100644 --- a/components/ILIAS/History_/test/ilComponentsHistorySuite.php +++ b/components/ILIAS/History_/test/ilComponentsHistorySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/History_/test/HistCompareTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/History_/test/HistCompareTest.php"); $suite->addTestSuite("HistCompareTest"); return $suite; diff --git a/components/ILIAS/Html_/test/bootstrap.php b/components/ILIAS/Html_/test/bootstrap.php index 5ccf2ed7ebbf..e644a2d9f55b 100644 --- a/components/ILIAS/Html_/test/bootstrap.php +++ b/components/ILIAS/Html_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Imprint_/test/ilComponentsImprintSuite.php b/components/ILIAS/Imprint_/test/ilComponentsImprintSuite.php index 4f22a42476f8..f32201a988bc 100644 --- a/components/ILIAS/Imprint_/test/ilComponentsImprintSuite.php +++ b/components/ILIAS/Imprint_/test/ilComponentsImprintSuite.php @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/Imprint_/test/ImprintStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Imprint_/test/ImprintStandardGUIRequestTest.php"); $suite->addTestSuite("ImprintStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/IndividualAssessment_/test/ilComponentsIndividualAssessmentSuite.php b/components/ILIAS/IndividualAssessment_/test/ilComponentsIndividualAssessmentSuite.php index 005978f6d40d..add0c4d4e556 100644 --- a/components/ILIAS/IndividualAssessment_/test/ilComponentsIndividualAssessmentSuite.php +++ b/components/ILIAS/IndividualAssessment_/test/ilComponentsIndividualAssessmentSuite.php @@ -26,17 +26,17 @@ public static function suite() { $suite = new ilComponentsIndividualAssessmentSuite(); - require_once("./components/ILIAS/IndividualAssessment_/test/AccessControl/ilIndividualAssessmentAccessHandlerTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMemberTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMembersTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMembersStorageDBTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentSettingsTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentInfoSettingsTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentCommonSettingsGUITest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentSettingsStorageDBTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentDataSetTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentExporterTest.php"); - require_once("./components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentUserGradingTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/AccessControl/ilIndividualAssessmentAccessHandlerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMemberTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMembersTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Members/ilIndividualAssessmentMembersStorageDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentInfoSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentCommonSettingsGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/Settings/ilIndividualAssessmentSettingsStorageDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentDataSetTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentExporterTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/IndividualAssessment_/test/ilIndividualAssessmentUserGradingTest.php"); $suite->addTestSuite('ilIndividualAssessmentAccessHandlerTest'); $suite->addTestSuite('ilIndividualAssessmentMemberTest'); diff --git a/components/ILIAS/InfoScreen_/test/ilComponentsInfoScreenSuite.php b/components/ILIAS/InfoScreen_/test/ilComponentsInfoScreenSuite.php index 3aa48eb9dcc4..221d1ebb995d 100644 --- a/components/ILIAS/InfoScreen_/test/ilComponentsInfoScreenSuite.php +++ b/components/ILIAS/InfoScreen_/test/ilComponentsInfoScreenSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/InfoScreen_/test/InfoScreenStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/InfoScreen_/test/InfoScreenStandardGUIRequestTest.php"); $suite->addTestSuite("InfoScreenStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Init_/classes/class.ilErrorHandling.php b/components/ILIAS/Init_/classes/class.ilErrorHandling.php index 45d858a9f8bf..a03f8d3e8769 100644 --- a/components/ILIAS/Init_/classes/class.ilErrorHandling.php +++ b/components/ILIAS/Init_/classes/class.ilErrorHandling.php @@ -258,9 +258,9 @@ protected function defaultHandler(): HandlerInterface return new CallbackHandler(function ($exception, Inspector $inspector, Run $run) { global $DIC; - require_once("components/ILIAS/Logging_/classes/error/class.ilLoggingErrorSettings.php"); - require_once("components/ILIAS/Logging_/classes/error/class.ilLoggingErrorFileStorage.php"); - require_once("components/ILIAS/Utilities_/classes/class.ilUtil.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Logging_/classes/error/class.ilLoggingErrorSettings.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Logging_/classes/error/class.ilLoggingErrorFileStorage.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Utilities_/classes/class.ilUtil.php"); $session_id = substr(session_id(), 0, 5); $random = new \ilRandom(); diff --git a/components/ILIAS/Init_/classes/class.ilInitialisation.php b/components/ILIAS/Init_/classes/class.ilInitialisation.php index 4a011c67601d..4ca1eef9ddff 100644 --- a/components/ILIAS/Init_/classes/class.ilInitialisation.php +++ b/components/ILIAS/Init_/classes/class.ilInitialisation.php @@ -29,7 +29,7 @@ use ILIAS\FileUpload\Processor\SVGBlacklistPreProcessor; use ilias\components\ILIAS\RemoteWiki_\Registration_\classes\ilAccountRegistrationGUI; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); // needed for slow queries, etc. if (!isset($GLOBALS['ilGlobalStartTime']) || !$GLOBALS['ilGlobalStartTime']) { diff --git a/components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php b/components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php index 44e7d130191d..d42484ef57e6 100644 --- a/components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php +++ b/components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php @@ -306,7 +306,7 @@ public function sendPasswordAssistanceMail(ilObjUser $userObj): void { global $DIC; - require_once 'cli/inc.pwassist_session_handler.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.pwassist_session_handler.php'; // Create a new session id // #9700 - this didn't do anything before?! @@ -414,7 +414,7 @@ public function showAssignPasswordForm(ilPropertyFormGUI $form = null, string $p } // Retrieve the session, and check if it is valid - require_once 'cli/inc.pwassist_session_handler.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.pwassist_session_handler.php'; $pwassist_session = db_pwassist_session_read($pwassist_id); if ( !is_array($pwassist_session) || @@ -460,7 +460,7 @@ public function showAssignPasswordForm(ilPropertyFormGUI $form = null, string $p */ public function submitAssignPasswordForm(): void { - require_once 'cli/inc.pwassist_session_handler.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.pwassist_session_handler.php'; // We need to fetch this before form instantiation $pwassist_id = ilUtil::stripSlashes($_POST['key']); @@ -660,7 +660,7 @@ public function sendUsernameAssistanceMail(string $email, array $logins): void { global $DIC; - require_once 'cli/inc.pwassist_session_handler.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.pwassist_session_handler.php'; $login_url = $this->buildUrl( 'pwassist.php', diff --git a/components/ILIAS/Init_/classes/class.ilStartUpGUI.php b/components/ILIAS/Init_/classes/class.ilStartUpGUI.php index a6a3cf683ea6..a731b58bcd68 100644 --- a/components/ILIAS/Init_/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init_/classes/class.ilStartUpGUI.php @@ -154,11 +154,11 @@ public function executeCommand() break; case "ilaccountregistrationgui": - require_once("components/ILIAS/Registration_/classes/class.ilAccountRegistrationGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Registration_/classes/class.ilAccountRegistrationGUI.php"); return $this->ctrl->forwardCommand(new ilAccountRegistrationGUI()); case "ilpasswordassistancegui": - require_once("components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilPasswordAssistanceGUI.php"); return $this->ctrl->forwardCommand(new ilPasswordAssistanceGUI()); default: @@ -490,14 +490,14 @@ protected function processCode(): ?bool */ protected function initStandardLoginForm(): ilPropertyFormGUI { - include_once 'components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php'; $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this, 'doStandardAuthentication')); $form->setName("formlogin"); $form->setShowTopButtons(false); $form->setTitle($this->lng->txt("login_to_ilias")); - include_once './components/ILIAS/Authentication_/classes/class.ilAuthModeDetermination.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthModeDetermination.php'; $det = ilAuthModeDetermination::_getInstance(); if (ilAuthUtils::_hasMultipleAuthenticationMethods() and $det->isManualSelection()) { $visible_auth_methods = array(); @@ -737,26 +737,26 @@ protected function doStandardAuthentication(): void $this->getLogger()->debug('Trying to authenticate user.'); $auth_callback = function () use ($form) { - include_once './components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendCredentials.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendCredentials.php'; $credentials = new ilAuthFrontendCredentials(); $credentials->setUsername($form->getInput('username')); $credentials->setPassword($form->getInput('password')); // set chosen auth mode - include_once './components/ILIAS/Authentication_/classes/class.ilAuthModeDetermination.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthModeDetermination.php'; $det = ilAuthModeDetermination::_getInstance(); if (ilAuthUtils::_hasMultipleAuthenticationMethods() and $det->isManualSelection()) { $credentials->setAuthMode($form->getInput('auth_mode')); } - include_once './components/ILIAS/Authentication_/classes/Provider/class.ilAuthProviderFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Provider/class.ilAuthProviderFactory.php'; $provider_factory = new ilAuthProviderFactory(); $providers = $provider_factory->getProviders($credentials); - include_once './components/ILIAS/Authentication_/classes/class.ilAuthStatus.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthStatus.php'; $status = ilAuthStatus::getInstance(); - include_once './components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendFactory.php'; $frontend_factory = new ilAuthFrontendFactory(); $frontend_factory->setContext(ilAuthFrontendFactory::CONTEXT_STANDARD_FORM); $frontend = $frontend_factory->getFrontend( @@ -992,7 +992,7 @@ protected function substituteLoginPageElements( */ protected function getLoginPageEditorHTML(): string { - include_once './components/ILIAS/Authentication_/classes/class.ilAuthLoginPageEditorSettings.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthLoginPageEditorSettings.php'; $lpe = ilAuthLoginPageEditorSettings::getInstance(); $active_lang = $lpe->getIliasEditorLanguage($this->lng->getLangKey()); @@ -1001,7 +1001,7 @@ protected function getLoginPageEditorHTML(): string } // if page does not exist, return nothing - include_once './components/ILIAS/COPage_/classes/class.ilPageUtil.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/COPage_/classes/class.ilPageUtil.php'; if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) { return ''; } @@ -1009,7 +1009,7 @@ protected function getLoginPageEditorHTML(): string // get page object $page_gui = new ilLoginPageGUI(ilLanguage::lookupId($active_lang)); - include_once("./components/ILIAS/Style_/Content/classes/class.ilObjStyleSheet.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Style_/Content/classes/class.ilObjStyleSheet.php"); $page_gui->setStyleId(0); $page_gui->setPresentationTitle(""); @@ -1030,7 +1030,7 @@ protected function showRegistrationLinks(string $page_editor_html): string $rtpl = new ilTemplate('tpl.login_registration_links.html', true, true, 'components/ILIAS/Init_'); // allow new registrations? - include_once 'components/ILIAS/Registration_/classes/class.ilRegistrationSettings.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Registration_/classes/class.ilRegistrationSettings.php'; if (ilRegistrationSettings::_lookupRegistrationType() != ilRegistrationSettings::IL_REG_DISABLED) { $rtpl->setCurrentBlock("new_registration"); $rtpl->setVariable("REGISTER", $this->lng->txt("registration")); @@ -1699,7 +1699,7 @@ public static function _checkGoto($a_target) $ref_id = $t_arr[1]; } - include_once "components/ILIAS/Membership_/classes/class.ilParticipants.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Membership_/classes/class.ilParticipants.php"; $block_obj = array(); // walk path to find parent container @@ -1724,7 +1724,7 @@ public static function _checkGoto($a_target) $participants = ilCourseParticipant::_getInstanceByObjId($pobj_id, $ilUser->getId()); if (!$participants->isAssigned()) { // subscription currently possible? - include_once "components/ILIAS/Course_/classes/class.ilObjCourse.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Course_/classes/class.ilObjCourse.php"; if (ilObjCourse::_isActivated($pobj_id) && ilObjCourse::_registrationEnabled($pobj_id)) { $block_obj[] = $path_ref_id; @@ -1735,10 +1735,10 @@ public static function _checkGoto($a_target) } } elseif ($ptype == "grp") { // check if already participant - include_once "components/ILIAS/Group_/classes/class.ilGroupParticipants.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/classes/class.ilGroupParticipants.php"; if (!ilGroupParticipants::_isParticipant($path_ref_id, $ilUser->getId())) { // subscription currently possible? - include_once "components/ILIAS/Group_/classes/class.ilObjGroup.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/classes/class.ilObjGroup.php"; $group_obj = new ilObjGroup($path_ref_id); if ($group_obj->isRegistrationEnabled()) { $block_obj[] = $path_ref_id; @@ -1778,7 +1778,7 @@ public static function _checkGoto($a_target) $rbacsystem->resetPACache($ilUser->getId(), $ref_id); if ($rbacsystem->checkAccess("read", $ref_id) && sizeof($block_obj)) { // #12128 // this won't work with lm-pages (see above) - // include_once "components/ILIAS/Link_/classes/class.ilLink.php"; + // include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Link_/classes/class.ilLink.php"; // $_SESSION["pending_goto"] = ilLink::_getStaticLink($ref_id, $type); // keep original target @@ -1906,7 +1906,7 @@ public static function initStartUpTemplate($a_tmpl, bool $a_show_back = false, b $tpl->setVariable('LINK_URL', 'login.php?cmd=force_login&' . $param); $tpl->parseCurrentBlock(); - include_once './components/ILIAS/Init_/classes/class.ilPublicSectionSettings.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilPublicSectionSettings.php'; if (ilPublicSectionSettings::getInstance()->isEnabledForDomain($_SERVER['SERVER_NAME']) && $ilAccess->checkAccessOfUser(ANONYMOUS_USER_ID, 'read', '', ROOT_FOLDER_ID)) { $tpl->setVariable('LINK_URL', 'index.php?' . $param); @@ -1946,8 +1946,8 @@ public static function initStartUpTemplate($a_tmpl, bool $a_show_back = false, b protected function showSamlLoginForm(string $page_editor_html): string { - require_once 'components/ILIAS/Saml_/classes/class.ilSamlIdp.php'; - require_once 'components/ILIAS/Saml_/classes/class.ilSamlSettings.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Saml_/classes/class.ilSamlIdp.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Saml_/classes/class.ilSamlSettings.php'; if (count(ilSamlIdp::getActiveIdpList()) > 0 && ilSamlSettings::getInstance()->isDisplayedOnLoginPage()) { $tpl = new ilTemplate('tpl.login_form_saml.html', true, true, 'components/ILIAS/Saml_'); diff --git a/components/ILIAS/Init_/test/InitHttpServicesTest.php b/components/ILIAS/Init_/test/InitHttpServicesTest.php index c40236944fb9..e01d8746b15c 100644 --- a/components/ILIAS/Init_/test/InitHttpServicesTest.php +++ b/components/ILIAS/Init_/test/InitHttpServicesTest.php @@ -1,6 +1,6 @@ @@ -31,7 +31,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/ItemGroup_/test/ItemGroupStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ItemGroup_/test/ItemGroupStandardGUIRequestTest.php"); $suite->addTestSuite("ItemGroupStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/LTIConsumer_/classes/class.ilObjLTIConsumer.php b/components/ILIAS/LTIConsumer_/classes/class.ilObjLTIConsumer.php index 065dd9491d91..f6d7ed502310 100644 --- a/components/ILIAS/LTIConsumer_/classes/class.ilObjLTIConsumer.php +++ b/components/ILIAS/LTIConsumer_/classes/class.ilObjLTIConsumer.php @@ -871,7 +871,7 @@ public function buildLaunchParametersLTI13(ilCmiXapiUser $cmixUser, string $endp } if ($this->getProvider()->isGradeSynchronization()) { - include_once("components/ILIAS/LTIConsumer_/classes/class.ilLTIConsumerGradeService.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LTIConsumer_/classes/class.ilLTIConsumerGradeService.php"); $gradeservice = new ilLTIConsumerGradeService(); $launch_vars['custom_lineitem_url'] = self::getIliasHttpPath() . "/components/ILIAS/LTIConsumer_/ltiservices.php/gradeservice/" . $contextId . "/lineitems/" . $this->id . "/lineitem"; diff --git a/components/ILIAS/LTIConsumer_/ltiauth.php b/components/ILIAS/LTIConsumer_/ltiauth.php index a61e37362a1e..a99971c8f2f3 100644 --- a/components/ILIAS/LTIConsumer_/ltiauth.php +++ b/components/ILIAS/LTIConsumer_/ltiauth.php @@ -42,7 +42,7 @@ exit; } -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/lticerts.php b/components/ILIAS/LTIConsumer_/lticerts.php index 6b7bab47ce1e..c05df901b01a 100644 --- a/components/ILIAS/LTIConsumer_/lticerts.php +++ b/components/ILIAS/LTIConsumer_/lticerts.php @@ -22,7 +22,7 @@ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilContext::init(ilContext::CONTEXT_SCORM); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/lticonfig.php b/components/ILIAS/LTIConsumer_/lticonfig.php index 2eacfadf2b2a..c9fdc576e2f9 100644 --- a/components/ILIAS/LTIConsumer_/lticonfig.php +++ b/components/ILIAS/LTIConsumer_/lticonfig.php @@ -21,7 +21,7 @@ /** @noRector */ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilContext::init(ilContext::CONTEXT_SCORM); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/ltiregend.php b/components/ILIAS/LTIConsumer_/ltiregend.php index 72119bdfb09d..75604e198131 100644 --- a/components/ILIAS/LTIConsumer_/ltiregend.php +++ b/components/ILIAS/LTIConsumer_/ltiregend.php @@ -21,7 +21,7 @@ /** @noRector */ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::initILIAS(); $clientId = (ilSession::has('lti_dynamic_registration_client_id')) ? (string) ilSession::get('lti_dynamic_registration_client_id') : ''; diff --git a/components/ILIAS/LTIConsumer_/ltiregistration.php b/components/ILIAS/LTIConsumer_/ltiregistration.php index c2a6b64c8e38..92da2526b774 100644 --- a/components/ILIAS/LTIConsumer_/ltiregistration.php +++ b/components/ILIAS/LTIConsumer_/ltiregistration.php @@ -21,7 +21,7 @@ /** @noRector */ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilContext::init(ilContext::CONTEXT_SCORM); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/ltiregstart.php b/components/ILIAS/LTIConsumer_/ltiregstart.php index c8f6127828fb..d87c701bbaa1 100644 --- a/components/ILIAS/LTIConsumer_/ltiregstart.php +++ b/components/ILIAS/LTIConsumer_/ltiregstart.php @@ -21,7 +21,7 @@ /** @noRector */ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::initILIAS(); global $DIC; diff --git a/components/ILIAS/LTIConsumer_/ltiservices.php b/components/ILIAS/LTIConsumer_/ltiservices.php index c573a2e039f2..eb485979d060 100644 --- a/components/ILIAS/LTIConsumer_/ltiservices.php +++ b/components/ILIAS/LTIConsumer_/ltiservices.php @@ -22,7 +22,7 @@ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilContext::init(ilContext::CONTEXT_SCORM); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/ltitoken.php b/components/ILIAS/LTIConsumer_/ltitoken.php index 27cdf8192915..726d5ade1b72 100644 --- a/components/ILIAS/LTIConsumer_/ltitoken.php +++ b/components/ILIAS/LTIConsumer_/ltitoken.php @@ -26,7 +26,7 @@ chdir("../../../"); -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilContext::init(ilContext::CONTEXT_SCORM); ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTIConsumer_/result.php b/components/ILIAS/LTIConsumer_/result.php index e977cebc177e..021240decc0a 100644 --- a/components/ILIAS/LTIConsumer_/result.php +++ b/components/ILIAS/LTIConsumer_/result.php @@ -25,7 +25,7 @@ exit; } -require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); \ilContext::init(\ilContext::CONTEXT_SCORM); \ilInitialisation::initILIAS(); diff --git a/components/ILIAS/LTI_/classes/class.ilObjLTIAdministrationGUI.php b/components/ILIAS/LTI_/classes/class.ilObjLTIAdministrationGUI.php index 855fd7d9836c..1f0660c24ef6 100644 --- a/components/ILIAS/LTI_/classes/class.ilObjLTIAdministrationGUI.php +++ b/components/ILIAS/LTI_/classes/class.ilObjLTIAdministrationGUI.php @@ -207,7 +207,7 @@ protected function saveSettingsForm() // create global role LTI-User protected function createLtiUserRole(): void { - // include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + // include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; $role = new ilObjRole(); $role->setTitle("il_lti_global_role"); $role->setDescription("This global role should only contain the permission 'read' for repository and categories. Do not rename this role."); diff --git a/components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php b/components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php index 07e72b6bd3ac..ce61768ec36d 100644 --- a/components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php +++ b/components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once "components/ILIAS/Language_/interfaces/interface.ilLanguageDetector.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/interfaces/interface.ilLanguageDetector.php"; /** * Class ilDefaultLanguageDetector diff --git a/components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php b/components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php index a64824851add..60f842d3bf90 100644 --- a/components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php +++ b/components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once "components/ILIAS/Language_/interfaces/interface.ilLanguageDetector.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/interfaces/interface.ilLanguageDetector.php"; /** * Class ilHttpRequestsLanguageDetector @@ -61,7 +61,7 @@ public function getIso2LanguageCode(): string } } - require_once "components/ILIAS/Language_/exceptions/class.ilLanguageException.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/exceptions/class.ilLanguageException.php"; throw new ilLanguageException("Could not extract any language information from request."); } } diff --git a/components/ILIAS/Language_/classes/class.ilLanguage.php b/components/ILIAS/Language_/classes/class.ilLanguage.php index 5120217756af..1083ddf4ee17 100644 --- a/components/ILIAS/Language_/classes/class.ilLanguage.php +++ b/components/ILIAS/Language_/classes/class.ilLanguage.php @@ -104,7 +104,7 @@ public function __construct(string $a_lang_key) $this->lang_key = $this->lang_default; } - require_once("./components/ILIAS/Language_/classes/class.ilCachedLanguage.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilCachedLanguage.php"); $this->global_cache = ilCachedLanguage::getInstance($this->lang_key); if ($this->global_cache->isActive()) { $this->cached_modules = $this->global_cache->getTranslations(); @@ -291,7 +291,7 @@ public function getInstalledLanguages(): array */ public static function _getInstalledLanguages(): array { - include_once "./components/ILIAS/Object_/classes/class.ilObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObject.php"; $langlist = ilObject::_getObjectsByType("lng"); $languages = []; diff --git a/components/ILIAS/Language_/classes/class.ilLanguageDetection.php b/components/ILIAS/Language_/classes/class.ilLanguageDetection.php index 1f43bf1131f4..a8d51deacc84 100644 --- a/components/ILIAS/Language_/classes/class.ilLanguageDetection.php +++ b/components/ILIAS/Language_/classes/class.ilLanguageDetection.php @@ -19,8 +19,8 @@ ******************************************************************** */ -require_once "components/ILIAS/Language_/classes/class.ilLanguage.php"; -require_once "components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguage.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php"; /** * Class ilLanguageDetection diff --git a/components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php b/components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php index 41beb690c5a3..aefbdb5cdc2c 100644 --- a/components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php +++ b/components/ILIAS/Language_/classes/class.ilLanguageDetectorFactory.php @@ -68,15 +68,15 @@ public function createDetectorByType(int $type) { switch ($type) { case self::HTTP_REQUEST_DETECTOR: - require_once "components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilHttpRequestsLanguageDetector.php"; return new ilHttpRequestsLanguageDetector($this->request_information["HTTP_ACCEPT_LANGUAGE"]); case self::DEFAULT_DETECTOR: - require_once "components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilDefaultLanguageDetector.php"; return new ilDefaultLanguageDetector($this->client_ini); } - require_once "components/ILIAS/Language_/exceptions/class.ilLanguageException.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/exceptions/class.ilLanguageException.php"; throw new ilLanguageException(__METHOD__ . sprintf("Cannot create language detector instance for type %s!", $type)); } } diff --git a/components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php b/components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php index 1e1499295546..7754c85ace64 100644 --- a/components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php +++ b/components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once "./components/ILIAS/Table_/classes/class.ilTable2GUI.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Table_/classes/class.ilTable2GUI.php"; class ilLanguageExtTableGUI extends ilTable2GUI { @@ -123,7 +123,7 @@ public function initFilter(): void // most filters are only if (!ilObjLanguageAccess::_isPageTranslation()) { // pattern - include_once "./components/ILIAS/Form_/classes/class.ilTextInputGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilTextInputGUI.php"; $ti = new ilTextInputGUI($lng->txt("search"), "pattern"); //$ti->setParent($this->parent_obj);//Todo-PHP8-Review Begin: The wrong type is passed here, maybe you could just remove this method call $ti->setMaxLength(64); @@ -139,7 +139,7 @@ public function initFilter(): void $options[$mod] = $mod; } - include_once "./components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI(ucfirst($lng->txt("module")), "module"); //$si->setParent($this->parent_obj);//Todo-PHP8-Review Begin: The wrong type is passed here, maybe you could just remove this method call $si->setOptions($options); @@ -150,7 +150,7 @@ public function initFilter(): void } // identifier - include_once "./components/ILIAS/Form_/classes/class.ilTextInputGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilTextInputGUI.php"; $ti = new ilTextInputGUI(ucfirst($lng->txt("identifier")), "identifier"); //$ti->setParent($this->parent_obj);//Todo-PHP8-Review Begin: The wrong type is passed here, maybe you could just remove this method call $ti->setMaxLength(200); @@ -174,7 +174,7 @@ public function initFilter(): void } $options["conflicts"] = $lng->txt("language_scope_conflicts"); - include_once "./components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI($lng->txt("filter"), "mode"); //$si->setParent($this->parent_obj);//Todo-PHP8-Review Begin: The wrong type is passed here, maybe you could just remove this method call $si->setOptions($options); @@ -192,7 +192,7 @@ public function initFilter(): void $options[$lang_key] = $lng->txt("meta_l_" . $lang_key); } - include_once "./components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilSelectInputGUI.php"; $si = new ilSelectInputGUI($lng->txt("language_compare"), "compare"); //$si->setParent($this->parent_obj); $si->setOptions($options); diff --git a/components/ILIAS/Language_/classes/class.ilLanguageTableGUI.php b/components/ILIAS/Language_/classes/class.ilLanguageTableGUI.php index eee604d451bd..0f090f115ea1 100644 --- a/components/ILIAS/Language_/classes/class.ilLanguageTableGUI.php +++ b/components/ILIAS/Language_/classes/class.ilLanguageTableGUI.php @@ -19,7 +19,7 @@ ******************************************************************** */ -include_once "./components/ILIAS/Table_/classes/class.ilTable2GUI.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Table_/classes/class.ilTable2GUI.php"; /** * TableGUI class for diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguage.php b/components/ILIAS/Language_/classes/class.ilObjLanguage.php index 0692f4e292d2..6ecd66385d8e 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguage.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguage.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once "./components/ILIAS/Object_/classes/class.ilObject.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObject.php"; /** * Class ilObjLanguage @@ -673,7 +673,7 @@ public function optimizeData(): bool */ public function check(string $scope = ""): bool { - include_once "./components/ILIAS/Utilities_/classes/class.ilStr.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Utilities_/classes/class.ilStr.php"; $scopeExtension = ""; if (!empty($scope)) { if ($scope === "global") { diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageExt.php b/components/ILIAS/Language_/classes/class.ilObjLanguageExt.php index fe1d855e8c0a..d1b0e9746af2 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageExt.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageExt.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once "./components/ILIAS/Language_/classes/class.ilObjLanguage.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilObjLanguage.php"; /** * Class ilObjLanguageExt @@ -36,7 +36,7 @@ class ilObjLanguageExt extends ilObjLanguage */ public function getGlobalLanguageFile(): object { - require_once "./components/ILIAS/Language_/classes/class.ilLanguageFile.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguageFile.php"; return ilLanguageFile::_getGlobalLanguageFile($this->key); } @@ -245,7 +245,7 @@ public function importLanguageFile(string $a_file, string $a_mode_existing = "ke $ilErr = $DIC["ilErr"]; // read the new language file - require_once "./components/ILIAS/Language_/classes/class.ilLanguageFile.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguageFile.php"; $import_file_obj = new ilLanguageFile($a_file); if (!$import_file_obj->read()) { $ilErr->raiseError($import_file_obj->getErrorMessage(), $ilErr->MESSAGE); @@ -415,7 +415,7 @@ public static function _saveValues(string $a_lang_key, array $a_values = array() $save_date = date("Y-m-d H:i:s", time()); // read and get the global values - require_once "./components/ILIAS/Language_/classes/class.ilLanguageFile.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguageFile.php"; $global_file_obj = ilLanguageFile::_getGlobalLanguageFile($a_lang_key); $global_values = $global_file_obj->getAllValues(); $global_comments = $global_file_obj->getAllComments(); diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageExtGUI.php b/components/ILIAS/Language_/classes/class.ilObjLanguageExtGUI.php index bd5217e11e2a..dfc651a31624 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageExtGUI.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageExtGUI.php @@ -24,8 +24,8 @@ use ILIAS\HTTP\Services as HTTPServices; use ILIAS\Refinery\Factory as Refinery; -require_once("./components/ILIAS/Object_/classes/class.ilObjectGUI.php"); -require_once("components/ILIAS/Language_/classes/class.ilObjLanguageAccess.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectGUI.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilObjLanguageAccess.php"); /** @@ -106,7 +106,7 @@ public function __construct($a_data, int $a_id = 0, bool $a_call_by_reference = */ protected function assignObject(): void { - require_once("components/ILIAS/Language_/classes/class.ilObjLanguageExt.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilObjLanguageExt.php"); $this->object = new ilObjLanguageExt($this->id); } @@ -152,7 +152,7 @@ public function cancelObject(): void protected function getViewTable(): \ilLanguageExtTableGUI { // create and configure the table object - include_once "./components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLanguageExtTableGUI.php"; $table_gui = new ilLanguageExtTableGUI($this, "view", array( "langmode" => $this->langmode, "lang_key" => $this->object->key, @@ -454,7 +454,7 @@ public function importObject(): void protected function initNewImportForm(): ilPropertyFormGUI { - require_once("./components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("language_import_file")); @@ -536,7 +536,7 @@ public function uploadObject(): void */ public function exportObject(): void { - require_once("./components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("language_export_file")); @@ -628,7 +628,7 @@ public function downloadObject(): void */ public function maintainObject(): void { - require_once("./components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("language_maintenance")); @@ -789,7 +789,7 @@ protected function initNewSettingsForm(): ilPropertyFormGUI $translate_key = "lang_translate_" . $this->object->key; $translate = (bool) $ilSetting->get($translate_key, '0'); - require_once("./components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); $form = new ilPropertyFormGUI(); $form->setFormAction($this->ctrl->getFormAction($this)); $form->setTitle($this->lng->txt("language_settings")); @@ -831,7 +831,7 @@ public function statisticsObject(): void $data[] = $total; // create and configure the table object - include_once "components/ILIAS/Table_/classes/class.ilTable2GUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Table_/classes/class.ilTable2GUI.php"; $table_gui = new ilTable2GUI($this, "statistics"); $table_gui->setRowTemplate("tpl.lang_statistics_row.html", "components/ILIAS/Language_"); $table_gui->setEnableTitle(false); @@ -1013,7 +1013,7 @@ protected function initAddNewEntryForm(string $a_id = null): ilPropertyFormGUI $ilCtrl->redirect($this, "view"); } - include_once "components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"; $form = new ilPropertyFormGUI(); $form->setFormAction($ilCtrl->getFormAction($this, "saveNewEntry")); $form->setTitle($this->lng->txt("adm_missing_entry_add")); diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageFolder.php b/components/ILIAS/Language_/classes/class.ilObjLanguageFolder.php index 36c630f57e69..d1d0f7ca7a4a 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageFolder.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageFolder.php @@ -30,7 +30,7 @@ * @extends ilObject */ -require_once "./components/ILIAS/Object_/classes/class.ilObject.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObject.php"; class ilObjLanguageFolder extends ilObject { @@ -188,7 +188,7 @@ public function addNewLanguages(array $a_languages): array if (count($a_languages) > 0) { foreach ($a_languages as $lang_key => $lang_data) { if (isset($lang_data["info"]) && $lang_data["info"] === "new_language") { - include_once "./components/ILIAS/Language_/classes/class.ilObjLanguage.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilObjLanguage.php"; $lngObj = new ilObjLanguage(); $lngObj->setTitle($lang_key); $lngObj->setDescription("not_installed"); diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageFolderAccess.php b/components/ILIAS/Language_/classes/class.ilObjLanguageFolderAccess.php index 92579336dc7a..94e0ed86c922 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageFolderAccess.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageFolderAccess.php @@ -19,7 +19,7 @@ ******************************************************************** */ -include_once "./components/ILIAS/Object_/classes/class.ilObjectAccess.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectAccess.php"; /** * Class ilObjRootFolderAccess diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageFolderGUI.php b/components/ILIAS/Language_/classes/class.ilObjLanguageFolderGUI.php index 3457079df5e5..d27bcb79e576 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageFolderGUI.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageFolderGUI.php @@ -32,8 +32,8 @@ * @extends ilObject */ -require_once "./components/ILIAS/Language_/classes/class.ilObjLanguage.php"; -require_once "./components/ILIAS/Object_/classes/class.ilObjectGUI.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilObjLanguage.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectGUI.php"; class ilObjLanguageFolderGUI extends ilObjectGUI { @@ -323,7 +323,7 @@ public function setUserLanguageObject(): void $this->checkPermission("write"); $this->lng->loadLanguageModule("meta"); - require_once "./components/ILIAS/User_/classes/class.ilObjUser.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/User_/classes/class.ilObjUser.php"; $post_id = $this->getPostId(); @@ -443,7 +443,7 @@ public function executeCommand(): void switch ($next_class) { case "ilpermissiongui": - include_once "components/ILIAS/AccessControl_/classes/class.ilPermissionGUI.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/classes/class.ilPermissionGUI.php"; $perm_gui = new ilPermissionGUI($this); $this->tabs_gui->activateTab("perm_settings"); $this->ctrl->forwardCommand($perm_gui); @@ -603,7 +603,7 @@ public function listDeprecatedObject(): void ); $this->toolbar->addButtonInstance($button); - include_once "./components/ILIAS/Language_/classes/class.ilLangDeprecated.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLangDeprecated.php"; $d = new ilLangDeprecated(); $res = ""; @@ -619,7 +619,7 @@ public function listDeprecatedObject(): void */ public function downloadDeprecatedObject(): void { - include_once "./components/ILIAS/Language_/classes/class.ilLangDeprecated.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Language_/classes/class.ilLangDeprecated.php"; $d = new ilLangDeprecated(); $res = ""; foreach ($d->getDeprecatedLangVars() as $key => $mod) { diff --git a/components/ILIAS/Language_/classes/class.ilObjLanguageGUI.php b/components/ILIAS/Language_/classes/class.ilObjLanguageGUI.php index 2212f4c38ba5..75dc195e6a5d 100644 --- a/components/ILIAS/Language_/classes/class.ilObjLanguageGUI.php +++ b/components/ILIAS/Language_/classes/class.ilObjLanguageGUI.php @@ -28,7 +28,7 @@ * @extends ilObjectGUI */ -require_once "./components/ILIAS/Object_/classes/class.ilObjectGUI.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectGUI.php"; class ilObjLanguageGUI extends ilObjectGUI { diff --git a/components/ILIAS/Language_/exceptions/class.ilLanguageException.php b/components/ILIAS/Language_/exceptions/class.ilLanguageException.php index 53cf9adc8fdc..5ee3bc9a60f6 100644 --- a/components/ILIAS/Language_/exceptions/class.ilLanguageException.php +++ b/components/ILIAS/Language_/exceptions/class.ilLanguageException.php @@ -19,7 +19,7 @@ ******************************************************************** */ -require_once 'components/ILIAS/Exceptions_/classes/class.ilException.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exceptions_/classes/class.ilException.php'; /** * Class for language related exception handling in ILIAS. diff --git a/components/ILIAS/Language_/test/bootstrap.php b/components/ILIAS/Language_/test/bootstrap.php index 57dc19fad3b4..c8b3035e9ddd 100644 --- a/components/ILIAS/Language_/test/bootstrap.php +++ b/components/ILIAS/Language_/test/bootstrap.php @@ -1,5 +1,5 @@ @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/LearningHistory_/test/LearningHistoryStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningHistory_/test/LearningHistoryStandardGUIRequestTest.php"); $suite->addTestSuite("LearningHistoryStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/LearningModule_/test/ilComponentsLearningModuleSuite.php b/components/ILIAS/LearningModule_/test/ilComponentsLearningModuleSuite.php index 289526915a70..737acd16c277 100644 --- a/components/ILIAS/LearningModule_/test/ilComponentsLearningModuleSuite.php +++ b/components/ILIAS/LearningModule_/test/ilComponentsLearningModuleSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Learning module test suite @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/LearningModule_/test/LMEditingGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningModule_/test/LMEditingGUIRequestTest.php"); $suite->addTestSuite("LMEditingGUIRequestTest"); return $suite; diff --git a/components/ILIAS/LearningSequence_/test/ilComponentsLearningSequenceSuite.php b/components/ILIAS/LearningSequence_/test/ilComponentsLearningSequenceSuite.php index 71ff7482a8eb..33a611a13553 100644 --- a/components/ILIAS/LearningSequence_/test/ilComponentsLearningSequenceSuite.php +++ b/components/ILIAS/LearningSequence_/test/ilComponentsLearningSequenceSuite.php @@ -27,26 +27,26 @@ public static function suite(): ilComponentsLearningSequenceSuite $suite = new ilComponentsLearningSequenceSuite(); // add each test class of the component - require_once("./components/ILIAS/LearningSequence_/test/Activation/ilLearningSequenceActivationTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/Activation/ilLearningSequenceActivationDBTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/ilLearnerProgressDBTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPEventHandlerTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/LSLearnerItemTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSItems/ilLSItemsDBTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSItems/LSItemTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/PostConditions/ilLSPostConditionTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/PostConditions/ilLSPostConditionDBTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/Settings/ilLearningSequenceSettingsTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/Settings/ilLearningSequenceSettingsDBTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSControlBuilderTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSLocatorBuilderTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSTOCBuilderTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSUrlBuilderTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LSItems/LSItemTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/LSLearnerItemTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/GlobalSettings/GlobalSettingsTest.php"); - require_once("./components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPEventHandlerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/Activation/ilLearningSequenceActivationTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/Activation/ilLearningSequenceActivationDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/ilLearnerProgressDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPEventHandlerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/LSLearnerItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSItems/ilLSItemsDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSItems/LSItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/PostConditions/ilLSPostConditionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/PostConditions/ilLSPostConditionDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/Settings/ilLearningSequenceSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/Settings/ilLearningSequenceSettingsDBTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSControlBuilderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSLocatorBuilderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSTOCBuilderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSUrlBuilderTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LSItems/LSItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/LSLearnerItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/GlobalSettings/GlobalSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/LearningSequence_/test/LearnerProgress/ilLSLPEventHandlerTest.php"); $suite->addTestSuite("ilLearningSequenceActivationTest"); $suite->addTestSuite("ilLearningSequenceActivationDBTest"); diff --git a/components/ILIAS/Like_/test/ilComponentsLikeSuite.php b/components/ILIAS/Like_/test/ilComponentsLikeSuite.php index 6691f0a38922..e2872d9052e9 100644 --- a/components/ILIAS/Like_/test/ilComponentsLikeSuite.php +++ b/components/ILIAS/Like_/test/ilComponentsLikeSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Awareness_/test/AwarenessSessionRepositoryTest.php"); $suite->addTestSuite("AwarenessSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/Link_/test/ilComponentsLinkSuite.php b/components/ILIAS/Link_/test/ilComponentsLinkSuite.php index 577117e088c6..83a961af4012 100644 --- a/components/ILIAS/Link_/test/ilComponentsLinkSuite.php +++ b/components/ILIAS/Link_/test/ilComponentsLinkSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Link_/test/LinkStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Link_/test/LinkStandardGUIRequestTest.php"); $suite->addTestSuite("LinkStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Locator_/test/ilComponentsLocatorSuite.php b/components/ILIAS/Locator_/test/ilComponentsLocatorSuite.php index 0138527a41f8..6f584c2c6fb8 100644 --- a/components/ILIAS/Locator_/test/ilComponentsLocatorSuite.php +++ b/components/ILIAS/Locator_/test/ilComponentsLocatorSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Locator_/test/LocatorGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Locator_/test/LocatorGUITest.php"); $suite->addTestSuite("LocatorGUITest"); return $suite; diff --git a/components/ILIAS/Logging_/test/ilComponentsLoggingSuite.php b/components/ILIAS/Logging_/test/ilComponentsLoggingSuite.php index 49bace544272..777930c5f298 100644 --- a/components/ILIAS/Logging_/test/ilComponentsLoggingSuite.php +++ b/components/ILIAS/Logging_/test/ilComponentsLoggingSuite.php @@ -25,7 +25,7 @@ class ilComponentsLoggingSuite extends TestSuite public static function suite(): self { $suite = new ilComponentsLoggingSuite(); - include_once('./components/ILIAS/Logging_/test/ilLogComponentLevelTest.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Logging_/test/ilLogComponentLevelTest.php'); $suite->addTestSuite(ilLogComponentLevelTest::class); return $suite; } diff --git a/components/ILIAS/Mail_/test/bootstrap.php b/components/ILIAS/Mail_/test/bootstrap.php index fad9a3dad4a7..ffb7f0750740 100644 --- a/components/ILIAS/Mail_/test/bootstrap.php +++ b/components/ILIAS/Mail_/test/bootstrap.php @@ -18,5 +18,5 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once __DIR__ . '/ilMailBaseTest.php'; diff --git a/components/ILIAS/MainMenu_/test/ilComponentsMainMenuSuite.php b/components/ILIAS/MainMenu_/test/ilComponentsMainMenuSuite.php index 24730ae04c5b..09c94e04ac41 100644 --- a/components/ILIAS/MainMenu_/test/ilComponentsMainMenuSuite.php +++ b/components/ILIAS/MainMenu_/test/ilComponentsMainMenuSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsMainMenuSuite extends TestSuite { @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/MainMenu_/test/ilServicesMainMenuTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MainMenu_/test/ilServicesMainMenuTest.php"); $suite->addTestSuite("ilServicesMainMenuTest"); return $suite; diff --git a/components/ILIAS/Maps_/test/ilComponentsMapsSuite.php b/components/ILIAS/Maps_/test/ilComponentsMapsSuite.php index 946ede00f208..f79bed09635f 100644 --- a/components/ILIAS/Maps_/test/ilComponentsMapsSuite.php +++ b/components/ILIAS/Maps_/test/ilComponentsMapsSuite.php @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Maps_/test/ilMapGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Maps_/test/ilMapGUITest.php"); $suite->addTestSuite(ilMapGUITest::class); return $suite; diff --git a/components/ILIAS/MathJax_/test/bootstrap.php b/components/ILIAS/MathJax_/test/bootstrap.php index 1bea645d60a3..8d4d9ae56d72 100644 --- a/components/ILIAS/MathJax_/test/bootstrap.php +++ b/components/ILIAS/MathJax_/test/bootstrap.php @@ -15,4 +15,4 @@ * https://github.com/ILIAS-eLearning */ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Math_/test/ilComponentsMathSuite.php b/components/ILIAS/Math_/test/ilComponentsMathSuite.php index c6c1ea18da6d..8e59d5c83e37 100644 --- a/components/ILIAS/Math_/test/ilComponentsMathSuite.php +++ b/components/ILIAS/Math_/test/ilComponentsMathSuite.php @@ -28,11 +28,11 @@ class ilComponentsMathSuite extends TestSuite public static function suite(): \ilComponentsMathSuite { $suite = new self(); - require_once 'components/ILIAS/Math_/test/ilMathTest.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Math_/test/ilMathTest.php'; $suite->addTestSuite(ilMathTest::class); - require_once 'components/ILIAS/Math_/test/ilMathPhpAdapterTest.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Math_/test/ilMathPhpAdapterTest.php'; $suite->addTestSuite(ilMathPhpAdapterTest::class); - require_once 'components/ILIAS/Math_/test/ilMathBCAdapterTest.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Math_/test/ilMathBCAdapterTest.php'; $suite->addTestSuite(ilMathBCAdapterTest::class); return $suite; diff --git a/components/ILIAS/Math_/test/ilMathBCAdapterTest.php b/components/ILIAS/Math_/test/ilMathBCAdapterTest.php index f307f2271b1d..3cd348d1ab21 100644 --- a/components/ILIAS/Math_/test/ilMathBCAdapterTest.php +++ b/components/ILIAS/Math_/test/ilMathBCAdapterTest.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/Math_/test/ilMathBaseAdapterTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Math_/test/ilMathBaseAdapterTest.php'; class ilMathBCAdapterTest extends ilMathBaseAdapterTest { diff --git a/components/ILIAS/Math_/test/ilMathPhpAdapterTest.php b/components/ILIAS/Math_/test/ilMathPhpAdapterTest.php index 30e2baffae00..971ba3943984 100644 --- a/components/ILIAS/Math_/test/ilMathPhpAdapterTest.php +++ b/components/ILIAS/Math_/test/ilMathPhpAdapterTest.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/Math_/test/ilMathBaseAdapterTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Math_/test/ilMathBaseAdapterTest.php'; class ilMathPhpAdapterTest extends ilMathBaseAdapterTest { diff --git a/components/ILIAS/MediaCast_/test/ilComponentsMediaCastSuite.php b/components/ILIAS/MediaCast_/test/ilComponentsMediaCastSuite.php index dbeaa18a4368..036e80b61552 100644 --- a/components/ILIAS/MediaCast_/test/ilComponentsMediaCastSuite.php +++ b/components/ILIAS/MediaCast_/test/ilComponentsMediaCastSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): ilComponentsMediaCastSuite { $suite = new self(); - require_once("./components/ILIAS/MediaCast_/test/MediaCastStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaCast_/test/MediaCastStandardGUIRequestTest.php"); $suite->addTestSuite("MediaCastStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/MediaObjects_/test/ilComponentsMediaObjectsSuite.php b/components/ILIAS/MediaObjects_/test/ilComponentsMediaObjectsSuite.php index 9f86c69a4b3d..ea3a5139adad 100644 --- a/components/ILIAS/MediaObjects_/test/ilComponentsMediaObjectsSuite.php +++ b/components/ILIAS/MediaObjects_/test/ilComponentsMediaObjectsSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/MediaObjects_/test/ImageMapEditSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/test/ImageMapEditSessionRepositoryTest.php"); $suite->addTestSuite("ImageMapEditSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/MediaPool_/Clipboard/class.ilEditClipboardGUI.php b/components/ILIAS/MediaPool_/Clipboard/class.ilEditClipboardGUI.php index 6863ce5db7fa..1be0edb6abff 100644 --- a/components/ILIAS/MediaPool_/Clipboard/class.ilEditClipboardGUI.php +++ b/components/ILIAS/MediaPool_/Clipboard/class.ilEditClipboardGUI.php @@ -197,7 +197,7 @@ public function remove(): void $id = explode(":", $obj_id); if ($id[0] === "mob") { $ilUser->removeObjectFromClipboard($id[1], "mob"); - include_once("./components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"); $mob = new ilObjMediaObject($id[1]); $mob->delete(); // this method don't delete, if mob is used elsewhere } diff --git a/components/ILIAS/MediaPool_/classes/class.MediaPoolRepository.php b/components/ILIAS/MediaPool_/classes/class.MediaPoolRepository.php index 812375f30191..7fc19aca36c4 100644 --- a/components/ILIAS/MediaPool_/classes/class.MediaPoolRepository.php +++ b/components/ILIAS/MediaPool_/classes/class.MediaPoolRepository.php @@ -141,7 +141,7 @@ protected function getContentSnippets( // Keyword filter if ($keyword_filter) { - include_once './components/ILIAS/MetaData_/classes/class.ilMDKeyword.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/MetaData_/classes/class.ilMDKeyword.php'; $res = \ilMDKeyword::_searchKeywords($keyword_filter, 'mpg', $pool_id); foreach ($objs as $obj) { if (in_array($obj['obj_id'], $res)) { diff --git a/components/ILIAS/MediaPool_/classes/class.ilObjMediaPoolGUI.php b/components/ILIAS/MediaPool_/classes/class.ilObjMediaPoolGUI.php index 8c242a0bd81d..6b13f911d3f7 100644 --- a/components/ILIAS/MediaPool_/classes/class.ilObjMediaPoolGUI.php +++ b/components/ILIAS/MediaPool_/classes/class.ilObjMediaPoolGUI.php @@ -864,7 +864,7 @@ public function showPage(): void */ protected function getMediaPoolPageGUI($mep_item_id, $old_nr = 0) { - include_once("./components/ILIAS/MediaPool_/classes/class.ilMediaPoolPageGUI.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaPool_/classes/class.ilMediaPoolPageGUI.php"); $page_gui = new ilMediaPoolPageGUI($mep_item_id, $old_nr); $page_gui->setPoolGUI($this); diff --git a/components/ILIAS/MediaPool_/test/ilComponentsMediaPoolSuite.php b/components/ILIAS/MediaPool_/test/ilComponentsMediaPoolSuite.php index cb455fa91cf3..9fad7a49059c 100644 --- a/components/ILIAS/MediaPool_/test/ilComponentsMediaPoolSuite.php +++ b/components/ILIAS/MediaPool_/test/ilComponentsMediaPoolSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Media pool test suite @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/MediaPool_/test/MepClipboardSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaPool_/test/MepClipboardSessionRepositoryTest.php"); $suite->addTestSuite("MepClipboardSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/Membership_/test/ilComponentsMembershipSuite.php b/components/ILIAS/Membership_/test/ilComponentsMembershipSuite.php index 5366f962279b..4a1c93bd242d 100644 --- a/components/ILIAS/Membership_/test/ilComponentsMembershipSuite.php +++ b/components/ILIAS/Membership_/test/ilComponentsMembershipSuite.php @@ -25,7 +25,7 @@ class ilComponentsMembershipSuite extends TestSuite public static function suite(): ilComponentsMembershipSuite { /** @noRector */ - require_once("./components/ILIAS/Membership_/test/ilWaitingListTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Membership_/test/ilWaitingListTest.php"); $suite = new ilComponentsMembershipSuite(); $suite->addTestSuite("ilWaitingListTest"); diff --git a/components/ILIAS/Migration_/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php b/components/ILIAS/Migration_/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php index da076ee76eab..fea4e39a16b5 100644 --- a/components/ILIAS/Migration_/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php +++ b/components/ILIAS/Migration_/DBUpdate_3560/classes/class.ilDBUpdateNewObjectType.php @@ -457,7 +457,7 @@ public static function addAdminNode(string $obj_type, string $title): void $ilDB->insert("object_reference", $values); // put in tree - require_once("components/ILIAS/Tree_/classes/class.ilTree.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tree_/classes/class.ilTree.php"); $tree = new ilTree(ROOT_FOLDER_ID); $tree->insertNode($ref_id, SYSTEM_FOLDER_ID); diff --git a/components/ILIAS/Multilingualism_/test/ilComponentsMultilingualismSuite.php b/components/ILIAS/Multilingualism_/test/ilComponentsMultilingualismSuite.php index 04aec0b63c3f..8bf41b428b61 100644 --- a/components/ILIAS/Multilingualism_/test/ilComponentsMultilingualismSuite.php +++ b/components/ILIAS/Multilingualism_/test/ilComponentsMultilingualismSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Multilingualism_/test/MultilingualismStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Multilingualism_/test/MultilingualismStandardGUIRequestTest.php"); $suite->addTestSuite("MultilingualismStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Navigation_/test/ilComponentsNavigationSuite.php b/components/ILIAS/Navigation_/test/ilComponentsNavigationSuite.php index 3813403da560..c4fe5ee1f92a 100644 --- a/components/ILIAS/Navigation_/test/ilComponentsNavigationSuite.php +++ b/components/ILIAS/Navigation_/test/ilComponentsNavigationSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Notes test suite @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Navigation_/test/NavigationSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Navigation_/test/NavigationSessionRepositoryTest.php"); $suite->addTestSuite("NavigationSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/News_/test/ilComponentsNewsSuite.php b/components/ILIAS/News_/test/ilComponentsNewsSuite.php index 6a31e3b3131c..100d63155085 100644 --- a/components/ILIAS/News_/test/ilComponentsNewsSuite.php +++ b/components/ILIAS/News_/test/ilComponentsNewsSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * News test suite diff --git a/components/ILIAS/Notes_/test/ilComponentsNotesSuite.php b/components/ILIAS/Notes_/test/ilComponentsNotesSuite.php index 0b7a10a736e9..1d9c34c5142b 100644 --- a/components/ILIAS/Notes_/test/ilComponentsNotesSuite.php +++ b/components/ILIAS/Notes_/test/ilComponentsNotesSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Notes test suite diff --git a/components/ILIAS/Notification_/test/ilComponentsNotificationSuite.php b/components/ILIAS/Notification_/test/ilComponentsNotificationSuite.php index 989d38ab8f83..a455aa3d87e6 100644 --- a/components/ILIAS/Notification_/test/ilComponentsNotificationSuite.php +++ b/components/ILIAS/Notification_/test/ilComponentsNotificationSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing diff --git a/components/ILIAS/Notifications_/test/bootstrap.php b/components/ILIAS/Notifications_/test/bootstrap.php index 36875c6f0683..b80a050a043e 100644 --- a/components/ILIAS/Notifications_/test/bootstrap.php +++ b/components/ILIAS/Notifications_/test/bootstrap.php @@ -18,5 +18,5 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once 'ilNotificationsBaseTest.php'; diff --git a/components/ILIAS/Object_/test/ilComponentsObjectSuite.php b/components/ILIAS/Object_/test/ilComponentsObjectSuite.php index 29028d89cf8f..f3ef99cd0f3d 100644 --- a/components/ILIAS/Object_/test/ilComponentsObjectSuite.php +++ b/components/ILIAS/Object_/test/ilComponentsObjectSuite.php @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new ilComponentsObjectSuite(); - include_once("./components/ILIAS/Object_/test/ilObjectTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/test/ilObjectTest.php"); $suite->addTestSuite("ilObjectTest"); return $suite; diff --git a/components/ILIAS/OnScreenChat_/classes/class.ilOnScreenChatUserUserAutoComplete.php b/components/ILIAS/OnScreenChat_/classes/class.ilOnScreenChatUserUserAutoComplete.php index ca744b8d00d5..ea0719250199 100644 --- a/components/ILIAS/OnScreenChat_/classes/class.ilOnScreenChatUserUserAutoComplete.php +++ b/components/ILIAS/OnScreenChat_/classes/class.ilOnScreenChatUserUserAutoComplete.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/User_/classes/class.ilUserAutoComplete.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserAutoComplete.php'; /** * Class ilOnScreenChatUserUserAutoComplete diff --git a/components/ILIAS/OnScreenChat_/test/bootstrap.php b/components/ILIAS/OnScreenChat_/test/bootstrap.php index 255d2a6310df..0625d3e5f7ca 100644 --- a/components/ILIAS/OnScreenChat_/test/bootstrap.php +++ b/components/ILIAS/OnScreenChat_/test/bootstrap.php @@ -18,5 +18,5 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once 'ilOnScreenChatBaseTest.php'; diff --git a/components/ILIAS/OrgUnit_/classes/Positions/Authorities/class.ilOrgUnitGenericMultiInputGUI.php b/components/ILIAS/OrgUnit_/classes/Positions/Authorities/class.ilOrgUnitGenericMultiInputGUI.php index ed9e3326ab9c..c840fee8a31e 100644 --- a/components/ILIAS/OrgUnit_/classes/Positions/Authorities/class.ilOrgUnitGenericMultiInputGUI.php +++ b/components/ILIAS/OrgUnit_/classes/Positions/Authorities/class.ilOrgUnitGenericMultiInputGUI.php @@ -17,7 +17,7 @@ */ declare(strict_types=1); -require_once("./components/ILIAS/Form_/classes/class.ilFormPropertyGUI.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilFormPropertyGUI.php"); /** * Class ilDclGenericMultiInputGUI diff --git a/components/ILIAS/OrgUnit_/classes/Webservices/SOAP/Base.php b/components/ILIAS/OrgUnit_/classes/Webservices/SOAP/Base.php index 9caf610fa058..a8c36662db30 100644 --- a/components/ILIAS/OrgUnit_/classes/Webservices/SOAP/Base.php +++ b/components/ILIAS/OrgUnit_/classes/Webservices/SOAP/Base.php @@ -18,8 +18,8 @@ namespace ILIAS\OrgUnit\Webservices\SOAP; -require_once('./components/ILIAS/soapclasses/class.ilSoapAdministration.php'); -require_once('./components/ILIAS/WebServices_/SOAP/classes/class.ilSoapPluginException.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapPluginException.php'); use ilOrgUnitSOAPServicesPlugin; use ilSoapAdministration; diff --git a/components/ILIAS/OrgUnit_/exceptions/class.ilObjOrgUnitException.php b/components/ILIAS/OrgUnit_/exceptions/class.ilObjOrgUnitException.php index 2f57adb374b4..287da7d6de27 100644 --- a/components/ILIAS/OrgUnit_/exceptions/class.ilObjOrgUnitException.php +++ b/components/ILIAS/OrgUnit_/exceptions/class.ilObjOrgUnitException.php @@ -1,6 +1,6 @@ addTestSuite("ilModulesOrgUnitTest"); /** @noRector */ - require_once("./components/ILIAS/OrgUnit_/test/ilOrgUnitOperationContextRegisteredObjectiveTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilOrgUnitOperationContextRegisteredObjectiveTest.php"); $suite->addTestSuite("ilOrgUnitOperationContextRegisteredObjectiveTest"); /** @noRector */ - require_once("./components/ILIAS/OrgUnit_/test/ilOrgUnitOperationRegisteredObjectiveTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilOrgUnitOperationRegisteredObjectiveTest.php"); $suite->addTestSuite("ilOrgUnitOperationRegisteredObjectiveTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitAuthorityTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitAuthorityTest.php"); $suite->addTestSuite("ilModulesOrgUnitAuthorityTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitPositionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitPositionTest.php"); $suite->addTestSuite("ilModulesOrgUnitPositionTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitUserAssignmentTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitUserAssignmentTest.php"); $suite->addTestSuite("ilModulesOrgUnitUserAssignmentTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitOperationContextTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitOperationContextTest.php"); $suite->addTestSuite("ilModulesOrgUnitOperationContextTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitOperationTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitOperationTest.php"); $suite->addTestSuite("ilModulesOrgUnitOperationTest"); - require_once("./components/ILIAS/OrgUnit_/test/ilModulesOrgUnitPermissionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/OrgUnit_/test/ilModulesOrgUnitPermissionTest.php"); $suite->addTestSuite("ilModulesOrgUnitPermissionTest"); return $suite; diff --git a/components/ILIAS/PDFGeneration_/test/bootstrap.php b/components/ILIAS/PDFGeneration_/test/bootstrap.php index 930c17f84d3f..870a462b83ab 100644 --- a/components/ILIAS/PDFGeneration_/test/bootstrap.php +++ b/components/ILIAS/PDFGeneration_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once 'vendor/composer/vendor/autoload.php'; \ No newline at end of file +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; \ No newline at end of file diff --git a/components/ILIAS/Password_/test/bootstrap.php b/components/ILIAS/Password_/test/bootstrap.php index 3539485dc9c6..46e2acfb066d 100644 --- a/components/ILIAS/Password_/test/bootstrap.php +++ b/components/ILIAS/Password_/test/bootstrap.php @@ -18,5 +18,5 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once __DIR__ . '/ilPasswordBaseTest.php'; diff --git a/components/ILIAS/PersonalWorkspace_/test/ilComponentsPersonalWorkspaceSuite.php b/components/ILIAS/PersonalWorkspace_/test/ilComponentsPersonalWorkspaceSuite.php index bad96f935c5d..1b0d3c07fb7c 100644 --- a/components/ILIAS/PersonalWorkspace_/test/ilComponentsPersonalWorkspaceSuite.php +++ b/components/ILIAS/PersonalWorkspace_/test/ilComponentsPersonalWorkspaceSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Personal workspace test suite @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/PersonalWorkspace_/test/PWspStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/PersonalWorkspace_/test/PWspStandardGUIRequestTest.php"); $suite->addTestSuite("PWspStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Poll_/test/ilComponentsPollSuite.php b/components/ILIAS/Poll_/test/ilComponentsPollSuite.php index 2643a3a468bb..ae5758823536 100644 --- a/components/ILIAS/Poll_/test/ilComponentsPollSuite.php +++ b/components/ILIAS/Poll_/test/ilComponentsPollSuite.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Thomas Famula @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Poll_/test/PollBlockTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Poll_/test/PollBlockTest.php"); $suite->addTestSuite(PollBlockTest::class); return $suite; diff --git a/components/ILIAS/Portfolio_/test/ilComponentsPortfolioSuite.php b/components/ILIAS/Portfolio_/test/ilComponentsPortfolioSuite.php index 7a5ebaf1a689..e07faa9dfb94 100644 --- a/components/ILIAS/Portfolio_/test/ilComponentsPortfolioSuite.php +++ b/components/ILIAS/Portfolio_/test/ilComponentsPortfolioSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/Portfolio_/test/AccessSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Portfolio_/test/AccessSessionRepositoryTest.php"); $suite->addTestSuite("AccessSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/PrivacySecurity_/test/ilComponentsPrivacySecuritySuite.php b/components/ILIAS/PrivacySecurity_/test/ilComponentsPrivacySecuritySuite.php index bc0d9966e8ea..933a9705c545 100644 --- a/components/ILIAS/PrivacySecurity_/test/ilComponentsPrivacySecuritySuite.php +++ b/components/ILIAS/PrivacySecurity_/test/ilComponentsPrivacySecuritySuite.php @@ -12,7 +12,7 @@ public static function suite(): ilComponentsPrivacySecuritySuite { $suite = new ilComponentsPrivacySecuritySuite(); - include_once("./components/ILIAS/PrivacySecurity_/test/ilPrivacySettingsTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/PrivacySecurity_/test/ilPrivacySettingsTest.php"); $suite->addTestSuite(ilPrivacySettingsTest::class); return $suite; } diff --git a/components/ILIAS/QTI_/test/bootstrap.php b/components/ILIAS/QTI_/test/bootstrap.php index 2790b00f6451..bea8eaeb1031 100644 --- a/components/ILIAS/QTI_/test/bootstrap.php +++ b/components/ILIAS/QTI_/test/bootstrap.php @@ -1,4 +1,4 @@ @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Rating_/test/RatingCategoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Rating_/test/RatingCategoryTest.php"); $suite->addTestSuite("RatingCategoryTest"); return $suite; diff --git a/components/ILIAS/Refinery/tests/String/EstimatedReadingTimeTest.php b/components/ILIAS/Refinery/tests/String/EstimatedReadingTimeTest.php index 4516dc71bcbb..68f21f4344f4 100644 --- a/components/ILIAS/Refinery/tests/String/EstimatedReadingTimeTest.php +++ b/components/ILIAS/Refinery/tests/String/EstimatedReadingTimeTest.php @@ -20,7 +20,7 @@ namespace ILIAS\Tests\Refinery\String; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; use ILIAS\Refinery\Factory as Refinery; use ILIAS\Data\Factory as DataFactory; diff --git a/components/ILIAS/Registration_/test/ilComponentsRegistrationSuite.php b/components/ILIAS/Registration_/test/ilComponentsRegistrationSuite.php index 0c60b1c43f20..c9ee3661f7d5 100644 --- a/components/ILIAS/Registration_/test/ilComponentsRegistrationSuite.php +++ b/components/ILIAS/Registration_/test/ilComponentsRegistrationSuite.php @@ -21,7 +21,7 @@ class ilComponentsRegistrationSuite extends TestSuite public static function suite(): self { $suite = new self(); - include_once("./components/ILIAS/Registration_/test/ilRegistrationSettingsTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Registration_/test/ilRegistrationSettingsTest.php"); $suite->addTestSuite(ilRegistrationSettingsTest::class); return $suite; } diff --git a/components/ILIAS/Repository_/test/ilComponentsRepositorySuite.php b/components/ILIAS/Repository_/test/ilComponentsRepositorySuite.php index 20aeb81205ed..ffa57bc4c9cf 100644 --- a/components/ILIAS/Repository_/test/ilComponentsRepositorySuite.php +++ b/components/ILIAS/Repository_/test/ilComponentsRepositorySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Repository_/test/ClipboardSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Repository_/test/ClipboardSessionRepositoryTest.php"); $suite->addTestSuite("ClipboardSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/RootFolder_/test/ilComponentsRootFolderSuite.php b/components/ILIAS/RootFolder_/test/ilComponentsRootFolderSuite.php index c7368eff80fa..19d2f4771673 100644 --- a/components/ILIAS/RootFolder_/test/ilComponentsRootFolderSuite.php +++ b/components/ILIAS/RootFolder_/test/ilComponentsRootFolderSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/RootFolder_/test/RootStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/RootFolder_/test/RootStandardGUIRequestTest.php"); $suite->addTestSuite("RootStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/SOAPAuth_/classes/class.ilAuthProviderSoap.php b/components/ILIAS/SOAPAuth_/classes/class.ilAuthProviderSoap.php index 1b3dece92099..2b5db23d5c4c 100644 --- a/components/ILIAS/SOAPAuth_/classes/class.ilAuthProviderSoap.php +++ b/components/ILIAS/SOAPAuth_/classes/class.ilAuthProviderSoap.php @@ -70,7 +70,7 @@ private function initClient(): void $this->uri .= ('/' . $this->server_uri); } - require_once './components/ILIAS/soaplib/nusoap.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; $this->client = new nusoap_client($this->uri); } diff --git a/components/ILIAS/SOAPAuth_/classes/class.ilSOAPAuth.php b/components/ILIAS/SOAPAuth_/classes/class.ilSOAPAuth.php index a11626a780d9..b4d285db2902 100644 --- a/components/ILIAS/SOAPAuth_/classes/class.ilSOAPAuth.php +++ b/components/ILIAS/SOAPAuth_/classes/class.ilSOAPAuth.php @@ -17,7 +17,7 @@ declare(strict_types=1); -include_once("./components/ILIAS/soaplib/nusoap.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soaplib/nusoap.php"); class ilSOAPAuth { @@ -47,7 +47,7 @@ public static function testConnection(string $a_ext_uid, string $a_soap_pw, bool $uri .= "/" . $server_uri; } - require_once './components/ILIAS/soaplib/nusoap.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; $soap_client = new nusoap_client($uri); if ($err = $soap_client->getError()) { return "SOAP Authentication Initialisation Error: " . $err; diff --git a/components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php b/components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php index 011a7e66e5bf..fc702b5c27df 100644 --- a/components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php +++ b/components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php @@ -22,7 +22,7 @@ * @author Alex Killing */ -include_once './components/ILIAS/soaplib/nusoap.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; function isValidSession(string $ext_uid, string $soap_pw, bool $new_user): array { diff --git a/components/ILIAS/SOAPAuth_/examples/dummy_client.php b/components/ILIAS/SOAPAuth_/examples/dummy_client.php index 5d8fbcfcfe2c..d04554361bb1 100644 --- a/components/ILIAS/SOAPAuth_/examples/dummy_client.php +++ b/components/ILIAS/SOAPAuth_/examples/dummy_client.php @@ -17,7 +17,7 @@ *****************************************************************************/ exit; -include_once './components/ILIAS/soaplib/nusoap.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; $server = $_GET["server"] ?: "http://localhost/Services/SOAPAuth/dummy_server.php"; @@ -39,7 +39,7 @@ echo "

----------------------------------------------

Calling Server..."; // initialize soap client -require_once './components/ILIAS/soaplib/nusoap.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; $client = new nusoap_client($server); if ($err = $client->getError()) { echo '

Constructor error

' . $err . '
'; diff --git a/components/ILIAS/SOAPAuth_/examples/dummy_server.php b/components/ILIAS/SOAPAuth_/examples/dummy_server.php index 7354029fc376..c98465ee837d 100644 --- a/components/ILIAS/SOAPAuth_/examples/dummy_server.php +++ b/components/ILIAS/SOAPAuth_/examples/dummy_server.php @@ -29,6 +29,6 @@ ini_set("display_errors", "1"); error_reporting(E_ALL & ~E_NOTICE); -include_once './components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/SOAPAuth_/examples/class.ilSoapDummyAuthServer.php'; $server = new ilSoapDummyAuthServer(); $server->start(); diff --git a/components/ILIAS/Saml_/lib/metadata.php b/components/ILIAS/Saml_/lib/metadata.php index ad7efc79622b..462547d17e87 100644 --- a/components/ILIAS/Saml_/lib/metadata.php +++ b/components/ILIAS/Saml_/lib/metadata.php @@ -63,15 +63,15 @@ } define('IL_COOKIE_PATH', $cookie_path); -require_once 'components/ILIAS/Context_/classes/class.ilContext.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_SAML); -require_once 'components/ILIAS/Init_/classes/class.ilInitialisation.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); $iliasHttpPath = ILIAS_HTTP_PATH; -require_once 'components/ILIAS/Saml_/classes/class.ilSamlAuthFactory.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Saml_/classes/class.ilSamlAuthFactory.php'; $factory = new ilSamlAuthFactory(); $auth = $factory->auth(); diff --git a/components/ILIAS/Saml_/lib/saml1-acs.php b/components/ILIAS/Saml_/lib/saml1-acs.php index 43e0a9c19d4d..462659dcf373 100644 --- a/components/ILIAS/Saml_/lib/saml1-acs.php +++ b/components/ILIAS/Saml_/lib/saml1-acs.php @@ -50,13 +50,13 @@ } define('IL_COOKIE_PATH', $cookie_path); -require_once 'components/ILIAS/Context_/classes/class.ilContext.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_SAML); -require_once 'components/ILIAS/Init_/classes/class.ilInitialisation.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); $factory = new ilSamlAuthFactory(); $auth = $factory->auth(); -require_once 'vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml1-acs.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml1-acs.php"; diff --git a/components/ILIAS/Saml_/lib/saml2-acs.php b/components/ILIAS/Saml_/lib/saml2-acs.php index a1aa54111a93..baf871e2545f 100644 --- a/components/ILIAS/Saml_/lib/saml2-acs.php +++ b/components/ILIAS/Saml_/lib/saml2-acs.php @@ -50,13 +50,13 @@ } define('IL_COOKIE_PATH', $cookie_path); -require_once 'components/ILIAS/Context_/classes/class.ilContext.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_SAML); -require_once 'components/ILIAS/Init_/classes/class.ilInitialisation.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); $factory = new ilSamlAuthFactory(); $auth = $factory->auth(); -require_once 'vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-acs.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-acs.php'; diff --git a/components/ILIAS/Saml_/lib/saml2-logout.php b/components/ILIAS/Saml_/lib/saml2-logout.php index baf78ea8b2bc..8d223fb3702e 100644 --- a/components/ILIAS/Saml_/lib/saml2-logout.php +++ b/components/ILIAS/Saml_/lib/saml2-logout.php @@ -50,10 +50,10 @@ } define('IL_COOKIE_PATH', $cookie_path); -require_once 'components/ILIAS/Context_/classes/class.ilContext.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_SAML); -require_once 'components/ILIAS/Init_/classes/class.ilInitialisation.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); $factory = new ilSamlAuthFactory(); @@ -71,4 +71,4 @@ ] ); -require_once 'vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-logout.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/simplesamlphp/simplesamlphp/modules/saml/www/sp/saml2-logout.php"; diff --git a/components/ILIAS/Saml_/test/bootstrap.php b/components/ILIAS/Saml_/test/bootstrap.php index 5ccf2ed7ebbf..e644a2d9f55b 100644 --- a/components/ILIAS/Saml_/test/bootstrap.php +++ b/components/ILIAS/Saml_/test/bootstrap.php @@ -18,4 +18,4 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; diff --git a/components/ILIAS/Scorm2004_/classes/class.ilObjSCORM2004LearningModule.php b/components/ILIAS/Scorm2004_/classes/class.ilObjSCORM2004LearningModule.php index ab29558052bd..c698a49e54ef 100644 --- a/components/ILIAS/Scorm2004_/classes/class.ilObjSCORM2004LearningModule.php +++ b/components/ILIAS/Scorm2004_/classes/class.ilObjSCORM2004LearningModule.php @@ -603,7 +603,7 @@ public function importSuccess(string $a_file): bool } if (count($usersToDelete) > 0) { - // include_once("./components/ILIAS/Tracking_/classes/class.ilLPMarks.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilLPMarks.php"); // ilLPMarks::_deleteForUsers($this->getId(), $usersToDelete); $this->deleteTrackingDataOfUsers($usersToDelete); } diff --git a/components/ILIAS/Scorm2004_/classes/class.ilSCORM13PlayerGUI.php b/components/ILIAS/Scorm2004_/classes/class.ilSCORM13PlayerGUI.php index 89c96f4ca45d..ec9db8f40f47 100644 --- a/components/ILIAS/Scorm2004_/classes/class.ilSCORM13PlayerGUI.php +++ b/components/ILIAS/Scorm2004_/classes/class.ilSCORM13PlayerGUI.php @@ -452,7 +452,7 @@ public function getPlayer(): void $this->tpl->setVariable('JSON_LANGSTRINGS', json_encode($langstrings)); - // include_once("./components/ILIAS/YUI_/classes/class.ilYuiUtil.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/YUI_/classes/class.ilYuiUtil.php"); // $this->tpl->setVariable('YUI_PATH', ilYuiUtil::getLocalPath()); // $this->tpl->setVariable('TREE_JS', "./components/ILIAS/UIComponent_/NestedList/js/ilNestedList.js"); $this->tpl->setVariable('TREE_JS', "./components/ILIAS/Scorm2004_/scripts/ilNestedList.js"); @@ -1210,7 +1210,7 @@ public function quoteJSONArray(?array $a_array): array // */ // public function getMimetype($filename) // { - // include_once("./components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"); // return ilObjMediaObject::getMimeType($filename); // } @@ -1220,7 +1220,7 @@ public function quoteJSONArray(?array $a_array): array // */ // public function get_max_attempts() // { - // include_once "./components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMInitData.php"; + // include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMInitData.php"; // return ilObjSCORMInitData::get_max_attempts($this->packageId); // } diff --git a/components/ILIAS/Scorm2004_/test/ilComponentsScorm2004Suite.php b/components/ILIAS/Scorm2004_/test/ilComponentsScorm2004Suite.php index 077efb0bdedf..6c8f34a5acf6 100644 --- a/components/ILIAS/Scorm2004_/test/ilComponentsScorm2004Suite.php +++ b/components/ILIAS/Scorm2004_/test/ilComponentsScorm2004Suite.php @@ -64,7 +64,7 @@ public static function suite(): self } if (defined('ILIAS_PHPUNIT_CONTEXT')) { -// include_once("./components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); +// include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); // ilUnitUtil::performInitialisation(); } else { chdir(__DIR__); diff --git a/components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMTracking.php b/components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMTracking.php index e99a687cc09b..4757d7f03e16 100644 --- a/components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMTracking.php +++ b/components/ILIAS/ScormAicc_/classes/SCORM/class.ilObjSCORMTracking.php @@ -143,7 +143,7 @@ public static function storeJsApiCmi(int $user_id, int $obj_id, object $data): b // update status // if ($b_updateStatus == true) { - // include_once("./components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); // ilLPStatusWrapper::_updateStatus($obj_id, $user_id); // } diff --git a/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMPresentationGUI.php b/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMPresentationGUI.php index bb03121d9f9b..a2751b108b2b 100644 --- a/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMPresentationGUI.php +++ b/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMPresentationGUI.php @@ -259,7 +259,7 @@ public function get_actual_attempts(): int // )); // } - // include_once("./components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); // ilLPStatusWrapper::_updateStatus($this->slm->getId(), $ilUser->getId()); // } @@ -346,7 +346,7 @@ public function increase_attemptAndsave_module_version(): void // )); // } - // include_once("./components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php"); // ilLPStatusWrapper::_updateStatus($this->slm->getId(), $ilUser->getId()); // } diff --git a/components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php b/components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php index 33970416f42b..610f74e62967 100644 --- a/components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php +++ b/components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php @@ -18,7 +18,7 @@ * *********************************************************************/ -//require_once "components/ILIAS/MetaData_/classes/class.ilMDLanguageItem.php"; +//require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MetaData_/classes/class.ilMDLanguageItem.php"; /** @defgroup ModulesScormAicc components/ILIAS/ScormAicc_ */ /** @@ -1230,7 +1230,7 @@ public function cloneObject(int $a_target_id, int $a_copy_id = 0, bool $a_omit_t // set/copy stylesheet - /* include_once("./components/ILIAS/Style_/Content/classes/class.ilObjStyleSheet.php"); + /* include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Style_/Content/classes/class.ilObjStyleSheet.php"); $style_id = $this->getStyleSheetId(); if ($style_id > 0 && !ilObjStyleSheet::_lookupStandard($style_id)) { diff --git a/components/ILIAS/ScormAicc_/classes/class.ilObjSCORMLearningModule.php b/components/ILIAS/ScormAicc_/classes/class.ilObjSCORMLearningModule.php index 05645d26d56d..fb55adba21ce 100644 --- a/components/ILIAS/ScormAicc_/classes/class.ilObjSCORMLearningModule.php +++ b/components/ILIAS/ScormAicc_/classes/class.ilObjSCORMLearningModule.php @@ -712,7 +712,7 @@ public function importSuccess(string $a_file): bool } if (count($usersToDelete) > 0) { - // include_once("./components/ILIAS/Tracking_/classes/class.ilLPMarks.php"); + // include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilLPMarks.php"); // ilLPMarks::_deleteForUsers($this->getId(), $usersToDelete); $this->deleteTrackingDataOfUsers($usersToDelete); } diff --git a/components/ILIAS/Search_/classes/class.ilObjSearchSettings.php b/components/ILIAS/Search_/classes/class.ilObjSearchSettings.php index 80a63d160bc5..3fbbee21f6b0 100644 --- a/components/ILIAS/Search_/classes/class.ilObjSearchSettings.php +++ b/components/ILIAS/Search_/classes/class.ilObjSearchSettings.php @@ -3,7 +3,7 @@ declare(strict_types=1); /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -require_once "./components/ILIAS/Object_/classes/class.ilObject.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObject.php"; /** * Class ilObjSearchSettings diff --git a/components/ILIAS/Search_/classes/class.ilRepositoryUserResultTableGUI.php b/components/ILIAS/Search_/classes/class.ilRepositoryUserResultTableGUI.php index 9f26004ea92f..2c34dce28bf1 100644 --- a/components/ILIAS/Search_/classes/class.ilRepositoryUserResultTableGUI.php +++ b/components/ILIAS/Search_/classes/class.ilRepositoryUserResultTableGUI.php @@ -251,7 +251,7 @@ protected function fillRow(array $a_set): void if ($this->getType() == self::TYPE_GLOBAL_SEARCH) { $this->tpl->setVariable('SEARCH_RELEVANCE', $this->getRelevanceHTML($a_set['relevance'])); if (ilBuddySystem::getInstance()->isEnabled() && $a_set['usr_id'] != $this->user->getId()) { - require_once 'components/ILIAS/Contact_/BuddySystem/classes/class.ilBuddySystemLinkButton.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Contact_/BuddySystem/classes/class.ilBuddySystemLinkButton.php'; $this->tpl->setVariable('CONTACT_ACTIONS', ilBuddySystemLinkButton::getInstanceByUserId((int) $a_set['usr_id'])->getHtml()); } else { $this->tpl->setVariable('CONTACT_ACTIONS', ''); diff --git a/components/ILIAS/Search_/test/ilComponentsSearchSuite.php b/components/ILIAS/Search_/test/ilComponentsSearchSuite.php index c83790025798..3d74e6d3f478 100644 --- a/components/ILIAS/Search_/test/ilComponentsSearchSuite.php +++ b/components/ILIAS/Search_/test/ilComponentsSearchSuite.php @@ -26,8 +26,8 @@ public static function suite(): self { $suite = new ilComponentsSearchSuite(); - include_once("./components/ILIAS/Search_/test/ilSearchLuceneQueryParserTest.php"); - include_once("./components/ILIAS/Search_/test/ilObjSearchRpcClientCoordinatorTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Search_/test/ilSearchLuceneQueryParserTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Search_/test/ilObjSearchRpcClientCoordinatorTest.php"); $suite->addTestSuite(ilSearchLuceneQueryParserTest::class); $suite->addTestSuite(ilObjSearchRpcClientCoordinatorTest::class); return $suite; diff --git a/components/ILIAS/Session_/test/ilComponentsSessionSuite.php b/components/ILIAS/Session_/test/ilComponentsSessionSuite.php index 80d309f4df6c..25f9c0f10682 100644 --- a/components/ILIAS/Session_/test/ilComponentsSessionSuite.php +++ b/components/ILIAS/Session_/test/ilComponentsSessionSuite.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Thomas Famula @@ -32,7 +32,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Session_/test/EventItemsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Session_/test/EventItemsTest.php"); $suite->addTestSuite(EventItemsTest::class); return $suite; diff --git a/components/ILIAS/Setup/src/AbstractOfFinder.php b/components/ILIAS/Setup/src/AbstractOfFinder.php index 581d2c072333..a960f28a8194 100644 --- a/components/ILIAS/Setup/src/AbstractOfFinder.php +++ b/components/ILIAS/Setup/src/AbstractOfFinder.php @@ -51,7 +51,7 @@ abstract class AbstractOfFinder public function __construct() { $this->root = substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")); - $external_classmap = include(__DIR__ ."/../../../../vendor/composer/vendor/composer/autoload_classmap.php"); + $external_classmap = include(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/composer/autoload_classmap.php"); $this->classmap = $external_classmap ?: null; } diff --git a/components/ILIAS/Skill_/test/ilComponentsSkillSuite.php b/components/ILIAS/Skill_/test/ilComponentsSkillSuite.php index 805ce21bbd3f..18da8cdbf692 100644 --- a/components/ILIAS/Skill_/test/ilComponentsSkillSuite.php +++ b/components/ILIAS/Skill_/test/ilComponentsSkillSuite.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -32,12 +32,12 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Skill_/test/SkillCategoryTest.php"); - require_once("./components/ILIAS/Skill_/test/SkillInternalFactoryServiceTest.php"); - require_once("./components/ILIAS/Skill_/test/SkillInternalPersonalFactoryTest.php"); - require_once("./components/ILIAS/Skill_/test/SkillInternalProfileFactoryTest.php"); - require_once("./components/ILIAS/Skill_/test/SkillPersonalTest.php"); - require_once("./components/ILIAS/Skill_/test/SkillProfileTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillCategoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillInternalFactoryServiceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillInternalPersonalFactoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillInternalProfileFactoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillPersonalTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Skill_/test/SkillProfileTest.php"); $suite->addTestSuite(SkillCategoryTest::class); $suite->addTestSuite(SkillInternalFactoryServiceTest::class); $suite->addTestSuite(SkillInternalPersonalFactoryTest::class); diff --git a/components/ILIAS/StudyProgramme_/classes/class.ilObjStudyProgramme.php b/components/ILIAS/StudyProgramme_/classes/class.ilObjStudyProgramme.php index 422a17cf4e85..966df1fd6f8e 100644 --- a/components/ILIAS/StudyProgramme_/classes/class.ilObjStudyProgramme.php +++ b/components/ILIAS/StudyProgramme_/classes/class.ilObjStudyProgramme.php @@ -1485,7 +1485,7 @@ public static function setProgressesCompletedFor(int $obj_id, int $user_id): voi // We only use courses via crs_refs $type = ilObject::_lookupType($obj_id); if ($type === "crs") { - require_once("components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ContainerReference_/classes/class.ilContainerReference.php"); $crs_reference_obj_ids = ilContainerReference::_lookupSourceIds($obj_id); foreach ($crs_reference_obj_ids as $crs_reference_obj_id) { foreach (ilObject::_getAllReferences($crs_reference_obj_id) as $ref_id) { diff --git a/components/ILIAS/StudyProgramme_/classes/class.ilObjectFactoryWrapper.php b/components/ILIAS/StudyProgramme_/classes/class.ilObjectFactoryWrapper.php index e10c46d9910e..4314369b136f 100644 --- a/components/ILIAS/StudyProgramme_/classes/class.ilObjectFactoryWrapper.php +++ b/components/ILIAS/StudyProgramme_/classes/class.ilObjectFactoryWrapper.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("./components/ILIAS/Object_/classes/class.ilObjectFactory.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Object_/classes/class.ilObjectFactory.php"); /** * Class ilObjectFactoryWrapper. diff --git a/components/ILIAS/StudyProgramme_/test/ilComponentsStudyProgrammeSuite.php b/components/ILIAS/StudyProgramme_/test/ilComponentsStudyProgrammeSuite.php index c357060a1a32..bacf6868e90f 100644 --- a/components/ILIAS/StudyProgramme_/test/ilComponentsStudyProgrammeSuite.php +++ b/components/ILIAS/StudyProgramme_/test/ilComponentsStudyProgrammeSuite.php @@ -31,43 +31,43 @@ public static function suite(): self { $suite = new ilComponentsStudyProgrammeSuite(); - require_once("./components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php"); $suite->addTestSuite("ilStudyProgrammeProgressTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php"); $suite->addTestSuite("ilStudyProgrammeProgressIdTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php"); $suite->addTestSuite("ilStudyProgrammeProgressTreeTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php"); $suite->addTestSuite("ilStudyProgrammeAssignmentTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php"); $suite->addTestSuite("ilStudyProgrammeAssignmentActionsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/AutoCategories/ilStudyProgrammeAutoCategoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/AutoCategories/ilStudyProgrammeAutoCategoryTest.php"); $suite->addTestSuite("ilStudyProgrammeAutoCategoryTest"); - require_once("./components/ILIAS/StudyProgramme_/test/model/AutoMemberships/ilStudyProgrammeAutoMembershipsSourceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/model/AutoMemberships/ilStudyProgrammeAutoMembershipsSourceTest.php"); $suite->addTestSuite("ilStudyProgrammeAutoMembershipsSourceTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilStudyProgrammeAssessmentSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilStudyProgrammeAssessmentSettingsTest.php"); $suite->addTestSuite("ilStudyProgrammeAssessmentSettingsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilStudyProgrammeAutoMailSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilStudyProgrammeAutoMailSettingsTest.php"); $suite->addTestSuite("ilStudyProgrammeAutoMailSettingsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilStudyProgrammeValidityOfAchievedQualificationSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilStudyProgrammeValidityOfAchievedQualificationSettingsTest.php"); $suite->addTestSuite("ilStudyProgrammeValidityOfAchievedQualificationSettingsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilStudyProgrammeDeadlineSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilStudyProgrammeDeadlineSettingsTest.php"); $suite->addTestSuite("ilStudyProgrammeDeadlineSettingsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilStudyProgrammeTypeSettingsTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilStudyProgrammeTypeSettingsTest.php"); $suite->addTestSuite("ilStudyProgrammeTypeSettingsTest"); - require_once("./components/ILIAS/StudyProgramme_/test/types/ilStudyProgrammeTypeInfoTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/types/ilStudyProgrammeTypeInfoTest.php"); $suite->addTestSuite("ilStudyProgrammeTypeInfoTest"); - require_once("./components/ILIAS/StudyProgramme_/test/helpers/ilStudyProgrammeGUIMessagesTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/helpers/ilStudyProgrammeGUIMessagesTest.php"); $suite->addTestSuite("ilStudyProgrammeGUIMessagesTest"); - require_once("./components/ILIAS/StudyProgramme_/test/cron/ilStudyProgrammeCronRiskyToFailTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/cron/ilStudyProgrammeCronRiskyToFailTest.php"); $suite->addTestSuite("ilStudyProgrammeCronRiskyToFailTest"); - require_once("./components/ILIAS/StudyProgramme_/test/cron/ilStudyProgrammeCronAboutToExpireTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/cron/ilStudyProgrammeCronAboutToExpireTest.php"); $suite->addTestSuite("ilStudyProgrammeCronAboutToExpireTest"); - require_once("./components/ILIAS/StudyProgramme_/test/cron/ilPrgRestartAssignmentsCronJobTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/cron/ilPrgRestartAssignmentsCronJobTest.php"); $suite->addTestSuite("ilPrgRestartAssignmentsCronJobTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilObjStudyProgrammeCacheTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilObjStudyProgrammeCacheTest.php"); $suite->addTestSuite("ilObjStudyProgrammeCacheTest"); - require_once("./components/ILIAS/StudyProgramme_/test/ilObjStudyProgrammeCertificateTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/StudyProgramme_/test/ilObjStudyProgrammeCertificateTest.php"); $suite->addTestSuite("ilObjStudyProgrammeCertificateTest"); return $suite; diff --git a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php index 1728ae88387e..6390d2940e10 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentActionsTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once(__DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../prg_mocks.php"); diff --git a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php index 20e261148224..17a1d6542dd9 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeAssignmentTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once(__DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); class ilStudyProgrammeAssignmentTest extends \PHPUnit\Framework\TestCase { diff --git a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php index ba4abba187b6..a7590dd46853 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressIdTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once(__DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\StudyProgramme\Assignment\Node; diff --git a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php index a19b22f71094..d514d364600e 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once(__DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\StudyProgramme\Assignment\Node; diff --git a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php index 40c9b7d61f7a..3480b176e372 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Assignments/ilStudyProgrammeProgressTreeTest.php @@ -21,7 +21,7 @@ use ILIAS\StudyProgramme\Assignment\Node; use ILIAS\StudyProgramme\Assignment\Zipper; -require_once(__DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); class NodeMock extends Node { diff --git a/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsRepositoryTest.php b/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsRepositoryTest.php index 8ec7cb36dbce..86a2842ffedc 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsRepositoryTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsRepositoryTest.php @@ -33,7 +33,7 @@ protected function setUp(): void global $DIC; if (!$DIC) { try { - include_once("./components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); ilUnitUtil::performInitialisation(); } catch (Exception $e) { } diff --git a/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsTest.php b/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsTest.php index a15009864002..c13b56d3671d 100644 --- a/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsTest.php +++ b/components/ILIAS/StudyProgramme_/test/model/Settings/ilStudyProgrammeSettingsTest.php @@ -13,7 +13,7 @@ public function setUp(): void global $DIC; if (!$DIC) { - include_once("./components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/PHPUnit/classes/class.ilUnitUtil.php"); try { ilUnitUtil::performInitialisation(); } catch (\Exception $e) { diff --git a/components/ILIAS/Style_/Content/test/ilComponentsStyleContentSuite.php b/components/ILIAS/Style_/Content/test/ilComponentsStyleContentSuite.php index 7e089b420a38..020d5e8cfe08 100644 --- a/components/ILIAS/Style_/Content/test/ilComponentsStyleContentSuite.php +++ b/components/ILIAS/Style_/Content/test/ilComponentsStyleContentSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Style_/Content/test/ContentStyleStandardGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Style_/Content/test/ContentStyleStandardGUIRequestTest.php"); $suite->addTestSuite("ContentStyleStandardGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Style_/System/classes/Config/class.ilSubStyleAssignmentGUI.php b/components/ILIAS/Style_/System/classes/Config/class.ilSubStyleAssignmentGUI.php index c30db556d137..3708c77302d3 100644 --- a/components/ILIAS/Style_/System/classes/Config/class.ilSubStyleAssignmentGUI.php +++ b/components/ILIAS/Style_/System/classes/Config/class.ilSubStyleAssignmentGUI.php @@ -86,7 +86,7 @@ public function assignStyle(ilSkin $skin, ilSkinStyle $substyle): void */ public function addAssignment(): void { - include_once 'components/ILIAS/Search_/classes/class.ilSearchRootSelector.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilSearchRootSelector.php'; $exp = new ilSearchRootSelector( $this->ctrl->getLinkTarget($this->getParentGui(), 'addStyleCatAssignment') ); diff --git a/components/ILIAS/Style_/System/classes/Overview/class.ilSystemStyleOverviewGUI.php b/components/ILIAS/Style_/System/classes/Overview/class.ilSystemStyleOverviewGUI.php index 9d4bde2329fb..51e281fc8389 100644 --- a/components/ILIAS/Style_/System/classes/Overview/class.ilSystemStyleOverviewGUI.php +++ b/components/ILIAS/Style_/System/classes/Overview/class.ilSystemStyleOverviewGUI.php @@ -443,7 +443,7 @@ protected function cloneSystemStyleForm(): ilPropertyFormGUI protected function getCreationFormsHTML(array $a_forms): string { - include_once('./components/ILIAS/Accordion_/classes/class.ilAccordionGUI.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Accordion_/classes/class.ilAccordionGUI.php'); $acc = new ilAccordionGUI(); $acc->setBehaviour(ilAccordionGUI::FIRST_OPEN); diff --git a/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationEntryGUITest.php b/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationEntryGUITest.php index 53caba436d6c..165eb4bd59be 100644 --- a/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationEntryGUITest.php +++ b/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationEntryGUITest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationGotoLinkTest.php b/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationGotoLinkTest.php index e2ffa1e38416..f0552bb2ee96 100644 --- a/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationGotoLinkTest.php +++ b/components/ILIAS/Style_/System/test/Documentation/ilKSDocumentationGotoLinkTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Documentation/ilSystemStyleDocumentationGUITest.php b/components/ILIAS/Style_/System/test/Documentation/ilSystemStyleDocumentationGUITest.php index 1139d0f36a15..49901f78f732 100644 --- a/components/ILIAS/Style_/System/test/Documentation/ilSystemStyleDocumentationGUITest.php +++ b/components/ILIAS/Style_/System/test/Documentation/ilSystemStyleDocumentationGUITest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use PHPUnit\Framework\TestCase; use ILIAS\UI\Implementation\Crawler\Entry\ComponentEntries as Entries; diff --git a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleColorExceptionTest.php b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleColorExceptionTest.php index 43d198ea386e..7a2fa61ea8e3 100644 --- a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleColorExceptionTest.php +++ b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleColorExceptionTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); class ilSystemStyleColorExceptionTest extends ilSystemStyleExceptionBaseUnit { diff --git a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php index 2ec0c8e22e1d..4b4c23cb9db5 100644 --- a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php +++ b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionTest.php b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionTest.php index b34f8a27701d..7eeebbb0b826 100644 --- a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionTest.php +++ b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSystemStyleExceptionTest extends ilSystemStyleExceptionBaseUnit { diff --git a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleIconExceptionTest.php b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleIconExceptionTest.php index 675ea57705be..5f7ab091b010 100644 --- a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleIconExceptionTest.php +++ b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleIconExceptionTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); class ilSystemStyleIconExceptionTest extends ilSystemStyleExceptionBaseUnit { diff --git a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleMessageStackExceptionTest.php b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleMessageStackExceptionTest.php index 8870ae9be0f7..a7ba9435c31e 100644 --- a/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleMessageStackExceptionTest.php +++ b/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleMessageStackExceptionTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Style_/System/test/Exceptions/ilSystemStyleExceptionBaseUnit.php'); class ilSystemStyleMessageStackExceptionTest extends ilSystemStyleExceptionBaseUnit { diff --git a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorSetTest.php b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorSetTest.php index 5fe7c37a7a75..f74bdeb4598e 100644 --- a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorSetTest.php +++ b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorSetTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorTest.php b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorTest.php index 898867696920..f977a5e2ece8 100644 --- a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorTest.php +++ b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconColorTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconFolderTest.php b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconFolderTest.php index ac187d673514..f64df8b8beaf 100644 --- a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconFolderTest.php +++ b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconFolderTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSystemStyleIconFolderTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconTest.php b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconTest.php index 24ee7b549707..463fb0b0ba09 100644 --- a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconTest.php +++ b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSystemStyleIconTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconsGUITest.php b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconsGUITest.php index 1f5e7c0101a0..7b35d1710de4 100644 --- a/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconsGUITest.php +++ b/components/ILIAS/Style_/System/test/Icons/ilSystemStyleIconsGUITest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use ILIAS\HTTP\Wrapper\WrapperFactory; use ILIAS\Data\Factory as DataFactory; diff --git a/components/ILIAS/Style_/System/test/Overview/ilSystemStyleOverviewGUITest.php b/components/ILIAS/Style_/System/test/Overview/ilSystemStyleOverviewGUITest.php index 8254a04917a4..f3d523710dc7 100644 --- a/components/ILIAS/Style_/System/test/Overview/ilSystemStyleOverviewGUITest.php +++ b/components/ILIAS/Style_/System/test/Overview/ilSystemStyleOverviewGUITest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use ILIAS\HTTP\Wrapper\WrapperFactory; use ILIAS\Data\Factory as DataFactory; diff --git a/components/ILIAS/Style_/System/test/Provider/KSDocumentationTreeRecursionTest.php b/components/ILIAS/Style_/System/test/Provider/KSDocumentationTreeRecursionTest.php index 5af99d21e3c1..bf642dbb86ba 100644 --- a/components/ILIAS/Style_/System/test/Provider/KSDocumentationTreeRecursionTest.php +++ b/components/ILIAS/Style_/System/test/Provider/KSDocumentationTreeRecursionTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Provider/SystemStylesGlobalScreenToolProviderTest.php b/components/ILIAS/Style_/System/test/Provider/SystemStylesGlobalScreenToolProviderTest.php index 6793e6bfac71..90b3dbb68da7 100644 --- a/components/ILIAS/Style_/System/test/Provider/SystemStylesGlobalScreenToolProviderTest.php +++ b/components/ILIAS/Style_/System/test/Provider/SystemStylesGlobalScreenToolProviderTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCategoryTest.php b/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCategoryTest.php index d502d9e117b3..be3430bf920c 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCategoryTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCategoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCommentTest.php b/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCommentTest.php index 8834726df4f3..4c1da66e4657 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCommentTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSkinStyleScssCommentTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleLessGUITest.php b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleLessGUITest.php index d38648d55d63..8a975a6db2f5 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleLessGUITest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleLessGUITest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use Psr\Http\Message\ServerRequestInterface; use ILIAS\Data\Factory as DataFactory; diff --git a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleSkinStyleScssCategoryTest.php b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleSkinStyleScssCategoryTest.php index 591a98817303..f73ac3ab92bb 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleSkinStyleScssCategoryTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleSkinStyleScssCategoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssFileTest.php b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssFileTest.php index 310e13356ad7..048ed5c90782 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssFileTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssFileTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSystemStyleStyleScssFileTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssTest.php b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssTest.php index c502dba71a9d..d13ef751fef4 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSystemStyleStyleScssTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssVariableTest.php b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssVariableTest.php index 56b5ff3e66fe..a5e4aa19d555 100644 --- a/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssVariableTest.php +++ b/components/ILIAS/Style_/System/test/Scss/ilSystemStyleStyleScssVariableTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Style/ilSkinFactoryTest.php b/components/ILIAS/Style_/System/test/Style/ilSkinFactoryTest.php index 5de2d54284ef..acc8ede6353f 100644 --- a/components/ILIAS/Style_/System/test/Style/ilSkinFactoryTest.php +++ b/components/ILIAS/Style_/System/test/Style/ilSkinFactoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSkinFactoryTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Style/ilSkinStyleContainerTest.php b/components/ILIAS/Style_/System/test/Style/ilSkinStyleContainerTest.php index e6697165f59d..7952803addea 100644 --- a/components/ILIAS/Style_/System/test/Style/ilSkinStyleContainerTest.php +++ b/components/ILIAS/Style_/System/test/Style/ilSkinStyleContainerTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSkinStyleContainerTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Style/ilSkinStyleTest.php b/components/ILIAS/Style_/System/test/Style/ilSkinStyleTest.php index fa8d5c9fd04b..f34c2ed59831 100644 --- a/components/ILIAS/Style_/System/test/Style/ilSkinStyleTest.php +++ b/components/ILIAS/Style_/System/test/Style/ilSkinStyleTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/Style/ilSkinTest.php b/components/ILIAS/Style_/System/test/Style/ilSkinTest.php index 01e3238ae3a3..5822c7f3b59c 100644 --- a/components/ILIAS/Style_/System/test/Style/ilSkinTest.php +++ b/components/ILIAS/Style_/System/test/Style/ilSkinTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); class ilSkinTest extends ilSystemStyleBaseFS { diff --git a/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageStackTest.php b/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageStackTest.php index c696cf05217b..64ec9c98d8ee 100644 --- a/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageStackTest.php +++ b/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageStackTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); -include_once('./components/ILIAS/UI/tests/UITestHelper.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/UITestHelper.php'); use PHPUnit\Framework\TestCase; use ILIAS\UI\Component\MessageBox\MessageBox as IMessageBox; diff --git a/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageTest.php b/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageTest.php index 666be1a3420c..6b164b575586 100644 --- a/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageTest.php +++ b/components/ILIAS/Style_/System/test/Utilities/ilSystemStyleMessageTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/Style_/System/test/ilSystemStyleBaseFS.php b/components/ILIAS/Style_/System/test/ilSystemStyleBaseFS.php index bd23c95b1bde..a9783ceb294d 100644 --- a/components/ILIAS/Style_/System/test/ilSystemStyleBaseFS.php +++ b/components/ILIAS/Style_/System/test/ilSystemStyleBaseFS.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once('vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use PHPUnit\Framework\TestCase; @@ -44,7 +44,7 @@ protected function setUp(): void } /** @noRector */ - include_once('./components/ILIAS/UI/tests/Base.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/Base.php'); $this->lng = new ilLanguageMock(); $this->file_system = new ilFileSystemHelper($this->lng, $this->message_stack); diff --git a/components/ILIAS/SurveyQuestionPool_/test/ilComponentsSurveyQuestionPoolSuite.php b/components/ILIAS/SurveyQuestionPool_/test/ilComponentsSurveyQuestionPoolSuite.php index de99cc1bd749..54c94557ad4e 100644 --- a/components/ILIAS/SurveyQuestionPool_/test/ilComponentsSurveyQuestionPoolSuite.php +++ b/components/ILIAS/SurveyQuestionPool_/test/ilComponentsSurveyQuestionPoolSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/SurveyQuestionPool_/test/SplEditingGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/SurveyQuestionPool_/test/SplEditingGUIRequestTest.php"); $suite->addTestSuite("SplEditingGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Survey_/Participants/class.ilSurveyRaterGUI.php b/components/ILIAS/Survey_/Participants/class.ilSurveyRaterGUI.php index be46850c95f0..ba9f600a26c0 100644 --- a/components/ILIAS/Survey_/Participants/class.ilSurveyRaterGUI.php +++ b/components/ILIAS/Survey_/Participants/class.ilSurveyRaterGUI.php @@ -120,7 +120,7 @@ public function initOptionSelectForm(): ilPropertyFormGUI $ctrl = $this->ctrl; $lng = $this->lng; - include_once("components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Form_/classes/class.ilPropertyFormGUI.php"); $form = new ilPropertyFormGUI(); // diff --git a/components/ILIAS/Survey_/test/ilComponentsSurveySuite.php b/components/ILIAS/Survey_/test/ilComponentsSurveySuite.php index bb60d84ee9a4..6c8c2c7f1208 100644 --- a/components/ILIAS/Survey_/test/ilComponentsSurveySuite.php +++ b/components/ILIAS/Survey_/test/ilComponentsSurveySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Survey_/test/SvyEvaluationGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Survey_/test/SvyEvaluationGUIRequestTest.php"); $suite->addTestSuite("SvyEvaluationGUIRequestTest"); return $suite; diff --git a/components/ILIAS/SystemCheck_/test/ilComponentsSystemCheckSuite.php b/components/ILIAS/SystemCheck_/test/ilComponentsSystemCheckSuite.php index dd97254e9007..9db2d3a249e8 100644 --- a/components/ILIAS/SystemCheck_/test/ilComponentsSystemCheckSuite.php +++ b/components/ILIAS/SystemCheck_/test/ilComponentsSystemCheckSuite.php @@ -12,7 +12,7 @@ public static function suite(): self { $suite = new ilComponentsSystemCheckSuite(); - include_once("./components/ILIAS/SystemCheck_/test/ilSystemCheckTaskTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/SystemCheck_/test/ilSystemCheckTaskTest.php"); $suite->addTestSuite(ilSystemCheckTaskTest::class); return $suite; } diff --git a/components/ILIAS/Table_/test/ilComponentsTableSuite.php b/components/ILIAS/Table_/test/ilComponentsTableSuite.php index 44e7d44a1b41..4e1b430eabb9 100644 --- a/components/ILIAS/Table_/test/ilComponentsTableSuite.php +++ b/components/ILIAS/Table_/test/ilComponentsTableSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): ilComponentsTableSuite { $suite = new self(); - require_once("./components/ILIAS/Table_/test/TableGUIRequestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Table_/test/TableGUIRequestTest.php"); $suite->addTestSuite("TableGUIRequestTest"); return $suite; diff --git a/components/ILIAS/Tagging_/test/ilComponentsTaggingSuite.php b/components/ILIAS/Tagging_/test/ilComponentsTaggingSuite.php index bad80ba9cad4..a683bd34219e 100644 --- a/components/ILIAS/Tagging_/test/ilComponentsTaggingSuite.php +++ b/components/ILIAS/Tagging_/test/ilComponentsTaggingSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Tagging_/test/TagRelevanceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tagging_/test/TagRelevanceTest.php"); $suite->addTestSuite("TagRelevanceTest"); return $suite; diff --git a/components/ILIAS/Tasks_/test/bootstrap.php b/components/ILIAS/Tasks_/test/bootstrap.php index b2dd1e2d5b10..38b4eea02949 100644 --- a/components/ILIAS/Tasks_/test/bootstrap.php +++ b/components/ILIAS/Tasks_/test/bootstrap.php @@ -18,6 +18,6 @@ /** * @author */ -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once __DIR__ . '/class.ilTasksTestBase.php'; diff --git a/components/ILIAS/Tasks_/test/ilComponentsTasksSuite.php b/components/ILIAS/Tasks_/test/ilComponentsTasksSuite.php index 300f7c367ca9..d8c1d828149a 100644 --- a/components/ILIAS/Tasks_/test/ilComponentsTasksSuite.php +++ b/components/ILIAS/Tasks_/test/ilComponentsTasksSuite.php @@ -31,13 +31,13 @@ public static function suite(): ilComponentsTasksSuite $suite = new self(); - include_once("./components/ILIAS/Tasks_/test/ilDerivedTaskTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tasks_/test/ilDerivedTaskTest.php"); $suite->addTestSuite("ilDerivedTaskTest"); - include_once("./components/ILIAS/Tasks_/test/ilDerivedTaskFactoryTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tasks_/test/ilDerivedTaskFactoryTest.php"); $suite->addTestSuite("ilDerivedTaskFactoryTest"); - include_once("./components/ILIAS/Tasks_/test/ilDerivedTaskCollectorTest.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tasks_/test/ilDerivedTaskCollectorTest.php"); $suite->addTestSuite("ilDerivedTaskCollectorTest"); return $suite; diff --git a/components/ILIAS/Taxonomy_/test/ilComponentsTaxonomySuite.php b/components/ILIAS/Taxonomy_/test/ilComponentsTaxonomySuite.php index 5f99319b5a76..39ce11d5bf70 100644 --- a/components/ILIAS/Taxonomy_/test/ilComponentsTaxonomySuite.php +++ b/components/ILIAS/Taxonomy_/test/ilComponentsTaxonomySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): ilComponentsTaxonomySuite { $suite = new self(); - require_once("./components/ILIAS/Taxonomy_/test/Assignment/TaxAssignmentTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Taxonomy_/test/Assignment/TaxAssignmentTest.php"); $suite->addTestSuite("TaxAssignmentTest"); return $suite; diff --git a/components/ILIAS/TermsOfService_/test/bootstrap.php b/components/ILIAS/TermsOfService_/test/bootstrap.php index cc7097c08c83..abb5d9168255 100644 --- a/components/ILIAS/TermsOfService_/test/bootstrap.php +++ b/components/ILIAS/TermsOfService_/test/bootstrap.php @@ -18,5 +18,5 @@ declare(strict_types=1); -require_once __DIR__ . '/../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; require_once __DIR__ . '/ilTermsOfServiceBaseTest.php'; diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerBinaryState.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerBinaryState.php index aa1ae40fcc17..a49fe381322c 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerBinaryState.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerBinaryState.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for true/false or yes/no answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerCloze.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerCloze.php index f5aaee640253..663db0e715c7 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerCloze.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerCloze.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for cloze question numeric answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerErrorText.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerErrorText.php index 8546f667a9cb..4831c87c3049 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerErrorText.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerErrorText.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for error text answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerImagemap.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerImagemap.php index 232e0faa2d10..3205ef985e85 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerImagemap.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerImagemap.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for true/false or yes/no answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMatching.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMatching.php index a1168c245cb6..1d3085bdb05e 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMatching.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMatching.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for matching question answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponse.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponse.php index c8482d2e5cab..7aa5e1998816 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponse.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponse.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for true/false or yes/no answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponseImage.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponseImage.php index 01396e079d31..76e5b438ad20 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponseImage.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerMultipleResponseImage.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * ASS_AnswerBinaryStateImage is a class for answers with a binary state diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerSimple.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerSimple.php index 0b5b118aee34..94f27a52cf74 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerSimple.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerSimple.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for simple answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerTrueFalse.php b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerTrueFalse.php index 5e41407a5ca9..18af6aad7d12 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assAnswerTrueFalse.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assAnswerTrueFalse.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for true/false or yes/no answers diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assClozeGap.php b/components/ILIAS/TestQuestionPool_/classes/class.assClozeGap.php index 1720270021bc..bd05c6db914a 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assClozeGap.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assClozeGap.php @@ -18,7 +18,7 @@ use ILIAS\Refinery\Transformation; use ILIAS\Refinery\Random\Transformation\ShuffleTransformation; -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for cloze question gaps diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assClozeTest.php b/components/ILIAS/TestQuestionPool_/classes/class.assClozeTest.php index f490ce17a90f..b92c9b4d75bd 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assClozeTest.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assClozeTest.php @@ -18,7 +18,7 @@ use ILIAS\Refinery\Random\Group as RandomGroup; -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for cloze tests diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assErrorText.php b/components/ILIAS/TestQuestionPool_/classes/class.assErrorText.php index 654f259f7096..d52c6c69aa27 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assErrorText.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assErrorText.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for error text questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assErrorTextGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assErrorTextGUI.php index 4ee30488ef24..fa0c038de460 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assErrorTextGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assErrorTextGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * The assErrorTextGUI class encapsulates the GUI representation for error text questions. diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assFileUpload.php b/components/ILIAS/TestQuestionPool_/classes/class.assFileUpload.php index 71379a0d5c14..52f5f93e81bf 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assFileUpload.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assFileUpload.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for file upload questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assFileUploadGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assFileUploadGUI.php index d7779587c965..cddbb2a11efd 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assFileUploadGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assFileUploadGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * The assFileUploadGUI class encapsulates the GUI representation for file upload questions. diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestion.php index 5d2cc8bfe22f..fb7f45f4eab2 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestion.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for single choice questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestionGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestionGUI.php index f4f5cffc01a8..fa0cbdaf6479 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assFormulaQuestionGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Single choice question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestion.php index f8fdd9328e1c..c8cc485bcfa9 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestion.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for image map questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestionGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestionGUI.php index 3c0c1c9fd6cc..2219a6f1350e 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assImagemapQuestionGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assLongMenu.php b/components/ILIAS/TestQuestionPool_/classes/class.assLongMenu.php index 3002c17c1845..0a5498044ab0 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assLongMenu.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assLongMenu.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; class assLongMenu extends assQuestion implements ilObjQuestionScoringAdjustable { diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assLongMenuGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assLongMenuGUI.php index 2dcf36e3aad3..a438de216cdc 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assLongMenuGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assLongMenuGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * @version $Id$ diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestion.php index aff883e79142..49e15378040c 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestion.php @@ -21,7 +21,7 @@ use ILIAS\Refinery\Random\Group as RandomGroup; use ILIAS\Refinery\Random\Seed\RandomSeed; -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for matching questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestionGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestionGUI.php index 47299aeb8eb9..8a9e2dec582f 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assMatchingQuestionGUI.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Matching question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoice.php b/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoice.php index c3cf31b3071c..6d9d9453510e 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoice.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoice.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for multiple choice tests. diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoiceGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoiceGUI.php index 48217c7d5af4..73f4a9090e11 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoiceGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assMultipleChoiceGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Multiple choice question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assNumeric.php b/components/ILIAS/TestQuestionPool_/classes/class.assNumeric.php index 7f94c3e059d4..121ef8ce9730 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assNumeric.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assNumeric.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for numeric questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assNumericGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assNumericGUI.php index d55977eaa6c8..9485bced0521 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assNumericGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assNumericGUI.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Numeric question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assNumericRange.php b/components/ILIAS/TestQuestionPool_/classes/class.assNumericRange.php index 94fb636474c2..ca9529266733 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assNumericRange.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assNumericRange.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for numeric ranges of questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontal.php b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontal.php index 697c8e37f2ed..7de3f849a632 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontal.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontal.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for horizontal ordering questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontalGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontalGUI.php index 229fc32cc094..5d0b835e9538 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontalGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingHorizontalGUI.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * The assOrderingHorizontalGUI class encapsulates the GUI representation for horizontal ordering questions. diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestion.php index b8c0d200fb11..cf3002c87563 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestion.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; use ILIAS\TA\Questions\Ordering\assOrderingQuestionDatabaseRepository as OQRepository; diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestionGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestionGUI.php index 265c40362b26..d6fdc07c16a3 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assOrderingQuestionGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Ordering question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php index 53f62233c9c8..c3a1b8ea65e8 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php @@ -22,7 +22,7 @@ use ILIAS\DI\Container; use Psr\Http\Message\ServerRequestInterface; -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Abstract basic class which is to be extended by the concrete assessment question type classes diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoice.php b/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoice.php index eba72ff1d815..04e01de880cd 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoice.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoice.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for single choice questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoiceGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoiceGUI.php index 2db2dbc795e2..bd32f595cd37 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoiceGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assSingleChoiceGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Single choice question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assTextQuestion.php b/components/ILIAS/TestQuestionPool_/classes/class.assTextQuestion.php index 910e987ee9ae..441b5e4ab0d7 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assTextQuestion.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assTextQuestion.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for text questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assTextSubset.php b/components/ILIAS/TestQuestionPool_/classes/class.assTextSubset.php index 2f8f7ac431ad..6633234cb6e8 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assTextSubset.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assTextSubset.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class for TextSubset questions diff --git a/components/ILIAS/TestQuestionPool_/classes/class.assTextSubsetGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.assTextSubsetGUI.php index 4209f4a03f8e..241123057036 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.assTextSubsetGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.assTextSubsetGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Multiple choice question GUI representation diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilAssExcelFormatHelper.php b/components/ILIAS/TestQuestionPool_/classes/class.ilAssExcelFormatHelper.php index 4ebd3c234f25..95ac5dade462 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilAssExcelFormatHelper.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilAssExcelFormatHelper.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilAssExcelFormatHelper diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilImagemapPreview.php b/components/ILIAS/TestQuestionPool_/classes/class.ilImagemapPreview.php index 054843371f74..ee624a30cd9c 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilImagemapPreview.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilImagemapPreview.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Image map image preview creator diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPool.php b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPool.php index 1bdf947fd610..ee3f685d0081 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPool.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPool.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilObjQuestionPool diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolAccess.php b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolAccess.php index 3c940d92cff9..4fbdbba9f920 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolAccess.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolAccess.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilObjQuestionPoolAccess diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolGUI.php index 04d8607db17e..85e0cf9af870 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; use ILIAS\Refinery\Random\Group as RandomGroup; use ILIAS\DI\RBACServices; diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolListGUI.php b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolListGUI.php index d523c473b158..d379b5e77132 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolListGUI.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilObjQuestionPoolListGUI.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilObjQuestionPoolListGUI diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilQuestionpoolExport.php b/components/ILIAS/TestQuestionPool_/classes/class.ilQuestionpoolExport.php index cd62b3470604..59d1ff8d9ef1 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilQuestionpoolExport.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilQuestionpoolExport.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Export class for questionpools diff --git a/components/ILIAS/TestQuestionPool_/classes/class.ilSolutionExplorer.php b/components/ILIAS/TestQuestionPool_/classes/class.ilSolutionExplorer.php index a83f96c43a50..d3aa2fcb4f96 100644 --- a/components/ILIAS/TestQuestionPool_/classes/class.ilSolutionExplorer.php +++ b/components/ILIAS/TestQuestionPool_/classes/class.ilSolutionExplorer.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /* * Solution Explorer for question pools diff --git a/components/ILIAS/TestQuestionPool_/save_question_post_data.php b/components/ILIAS/TestQuestionPool_/save_question_post_data.php index 9b601cd52abc..09d84b6d91e9 100644 --- a/components/ILIAS/TestQuestionPool_/save_question_post_data.php +++ b/components/ILIAS/TestQuestionPool_/save_question_post_data.php @@ -3,8 +3,8 @@ /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ chdir("../../.."); -require_once "./cli/inc.header.php"; -include_once "./components/ILIAS/soapinclude/inc.soap_functions.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/cli/inc.header.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapinclude/inc.soap_functions.php"; $results = array(); foreach ($_POST as $key => $value) { if (preg_match("/value_(\d+)_1/", $key, $matches)) { diff --git a/components/ILIAS/TestQuestionPool_/test/ilComponentsTestQuestionPoolSuite.php b/components/ILIAS/TestQuestionPool_/test/ilComponentsTestQuestionPoolSuite.php index d9654ca70577..cd8bc007c462 100644 --- a/components/ILIAS/TestQuestionPool_/test/ilComponentsTestQuestionPoolSuite.php +++ b/components/ILIAS/TestQuestionPool_/test/ilComponentsTestQuestionPoolSuite.php @@ -25,7 +25,7 @@ public static function suite(): ilComponentsTestQuestionPoolSuite chdir(dirname(__FILE__)); chdir('../../../../'); - require_once("./components/ILIAS/TestQuestionPool_/test/assBaseTestCase.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assBaseTestCase.php"); $suite = new ilComponentsTestQuestionPoolSuite(); @@ -33,177 +33,177 @@ public static function suite(): ilComponentsTestQuestionPoolSuite // ------------------------------------------------------------------------------------------------------------- // Type: Cloze - require_once("./components/ILIAS/TestQuestionPool_/test/assClozeGapTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assClozeGapTest.php"); $suite->addTestSuite("assClozeGapTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assClozeSelectGapTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assClozeSelectGapTest.php"); $suite->addTestSuite("assClozeSelectGapTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assClozeTestTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assClozeTestTest.php"); $suite->addTestSuite("assClozeTestTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assClozeTestGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assClozeTestGUITest.php"); $suite->addTestSuite("assClozeTestGUITest"); // Type: ErrorText - require_once("./components/ILIAS/TestQuestionPool_/test/assErrorTextTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assErrorTextTest.php"); $suite->addTestSuite("assErrorTextTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assErrorTextGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assErrorTextGUITest.php"); $suite->addTestSuite("assErrorTextGUITest"); // Type: FileUpload - require_once("./components/ILIAS/TestQuestionPool_/test/assFileUploadTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assFileUploadTest.php"); $suite->addTestSuite("assFileUploadTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assFileUploadGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assFileUploadGUITest.php"); $suite->addTestSuite("assFileUploadGUITest"); // Type: Formula - require_once("./components/ILIAS/TestQuestionPool_/test/assFormulaQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assFormulaQuestionTest.php"); $suite->addTestSuite("assFormulaQuestionTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assFormulaQuestionGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assFormulaQuestionGUITest.php"); $suite->addTestSuite("assFormulaQuestionGUITest"); // Type: Imagemap - require_once("./components/ILIAS/TestQuestionPool_/test/assImagemapQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assImagemapQuestionTest.php"); $suite->addTestSuite("assImagemapQuestionTest"); // Type: MatchingQuestion - require_once("./components/ILIAS/TestQuestionPool_/test/assMatchingQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assMatchingQuestionTest.php"); $suite->addTestSuite("assMatchingQuestionTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assMatchingQuestionGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assMatchingQuestionGUITest.php"); $suite->addTestSuite("assMatchingQuestionGUITest"); // Type: MultipleChoice - require_once("./components/ILIAS/TestQuestionPool_/test/assMultipleChoiceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assMultipleChoiceTest.php"); $suite->addTestSuite("assMultipleChoiceTest"); // Incompatible with local mode - require_once("./components/ILIAS/TestQuestionPool_/test/assMultipleChoiceGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assMultipleChoiceGUITest.php"); $suite->addTestSuite("assMultipleChoiceGUITest"); // Type: Numeric - require_once("./components/ILIAS/TestQuestionPool_/test/assNumericTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assNumericTest.php"); $suite->addTestSuite("assNumericTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assNumericGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assNumericGUITest.php"); $suite->addTestSuite("assNumericGUITest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assNumericRangeTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assNumericRangeTest.php"); $suite->addTestSuite("assNumericRangeTest"); // Type: OrderingHorizontal - require_once("./components/ILIAS/TestQuestionPool_/test/assOrderingHorizontalTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assOrderingHorizontalTest.php"); $suite->addTestSuite("assOrderingHorizontalTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assOrderingHorizontalGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assOrderingHorizontalGUITest.php"); $suite->addTestSuite("assOrderingHorizontalGUITest"); // Type: Ordering - require_once("./components/ILIAS/TestQuestionPool_/test/assOrderingQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assOrderingQuestionTest.php"); $suite->addTestSuite("assOrderingQuestionTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assOrderingQuestionGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assOrderingQuestionGUITest.php"); $suite->addTestSuite("assOrderingQuestionGUITest"); // Type: SingleChoice - require_once("./components/ILIAS/TestQuestionPool_/test/assSingleChoiceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assSingleChoiceTest.php"); $suite->addTestSuite("assSingleChoiceTest"); // Incompatible with local mode - require_once("./components/ILIAS/TestQuestionPool_/test/assSingleChoiceGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assSingleChoiceGUITest.php"); $suite->addTestSuite("assSingleChoiceGUITest"); // Type: Text (Essay) - require_once("./components/ILIAS/TestQuestionPool_/test/assTextQuestionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assTextQuestionTest.php"); $suite->addTestSuite("assTextQuestionTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assTextQuestionGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assTextQuestionGUITest.php"); $suite->addTestSuite("assTextQuestionGUITest"); // Type: TextSubset - require_once("./components/ILIAS/TestQuestionPool_/test/assTextSubsetTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assTextSubsetTest.php"); $suite->addTestSuite("assTextSubsetTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assTextSubsetGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assTextSubsetGUITest.php"); $suite->addTestSuite("assTextSubsetGUITest"); // Type: LongMenu - require_once("./components/ILIAS/TestQuestionPool_/test/assLongMenuTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assLongMenuTest.php"); $suite->addTestSuite("assLongMenuTest"); // Type: assKprimChoiceTest - require_once("./components/ILIAS/TestQuestionPool_/test/assKprimChoiceTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assKprimChoiceTest.php"); $suite->addTestSuite("assKprimChoiceTest"); // Hints // ------------------------------------------------------------------------------------------------------------- - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintTest.php"); $suite->addTestSuite("ilAssQuestionHintTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintAbstractTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintAbstractTest.php"); $suite->addTestSuite("ilAssQuestionHintAbstractTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintListTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintListTest.php"); $suite->addTestSuite("ilAssQuestionHintListTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintRequestStatisticDataTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintRequestStatisticDataTest.php"); $suite->addTestSuite("ilAssQuestionHintRequestStatisticDataTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintTrackingTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionHintTrackingTest.php"); $suite->addTestSuite("ilAssQuestionHintTrackingTest"); // Answertypes // ------------------------------------------------------------------------------------------------------------- - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerBinaryStateTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerBinaryStateTest.php"); $suite->addTestSuite("assAnswerBinaryStateTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerBinaryStateImageTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerBinaryStateImageTest.php"); $suite->addTestSuite("assAnswerBinaryStateImageTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerClozeTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerClozeTest.php"); $suite->addTestSuite("assAnswerClozeTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerErrorTextTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerErrorTextTest.php"); $suite->addTestSuite("assAnswerErrorTextTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerImagemapTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerImagemapTest.php"); $suite->addTestSuite("assAnswerImagemapTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMatchingTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMatchingTest.php"); $suite->addTestSuite("assAnswerMatchingTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMatchingDefinitionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMatchingDefinitionTest.php"); $suite->addTestSuite("assAnswerMatchingDefinitionTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMatchingPairTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMatchingPairTest.php"); $suite->addTestSuite("assAnswerMatchingPairTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMatchingTermTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMatchingTermTest.php"); $suite->addTestSuite("assAnswerMatchingTermTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMultipleResponseTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMultipleResponseTest.php"); $suite->addTestSuite("assAnswerMultipleResponseTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerMultipleResponseImageTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerMultipleResponseImageTest.php"); $suite->addTestSuite("assAnswerMultipleResponseImageTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerOrderingTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerOrderingTest.php"); $suite->addTestSuite("assAnswerOrderingTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerSimpleTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerSimpleTest.php"); $suite->addTestSuite("assAnswerSimpleTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assAnswerTrueFalseTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assAnswerTrueFalseTest.php"); $suite->addTestSuite("assAnswerTrueFalseTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/ilAssQuestionSkillAssignmentRegistryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/ilAssQuestionSkillAssignmentRegistryTest.php"); $suite->addTestSuite("ilAssQuestionSkillAssignmentRegistryTest"); - require_once("./components/ILIAS/TestQuestionPool_/test/assQuestionSuggestedSolutionTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/test/assQuestionSuggestedSolutionTest.php"); $suite->addTestSuite("assQuestionSuggestedSolutionTest"); return $suite; diff --git a/components/ILIAS/Test_/classes/class.assMark.php b/components/ILIAS/Test_/classes/class.assMark.php index 9eaeacec0353..f5b0c44f5196 100644 --- a/components/ILIAS/Test_/classes/class.assMark.php +++ b/components/ILIAS/Test_/classes/class.assMark.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * A class defining marks for assessment test objects diff --git a/components/ILIAS/Test_/classes/class.assMarkSchema.php b/components/ILIAS/Test_/classes/class.assMarkSchema.php index 0e16fceea840..5c23b4be2046 100644 --- a/components/ILIAS/Test_/classes/class.assMarkSchema.php +++ b/components/ILIAS/Test_/classes/class.assMarkSchema.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * A class defining mark schemas for assessment test objects diff --git a/components/ILIAS/Test_/classes/class.ilObjTest.php b/components/ILIAS/Test_/classes/class.ilObjTest.php index aeecca0b23f8..d867fd166c57 100644 --- a/components/ILIAS/Test_/classes/class.ilObjTest.php +++ b/components/ILIAS/Test_/classes/class.ilObjTest.php @@ -24,7 +24,7 @@ use ILIAS\Filesystem\Filesystem; use ILIAS\Filesystem\Stream\Streams; -require_once 'components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilObjTest diff --git a/components/ILIAS/Test_/classes/class.ilObjTestGUI.php b/components/ILIAS/Test_/classes/class.ilObjTestGUI.php index 2f4205f08cce..b3067a0c1aee 100644 --- a/components/ILIAS/Test_/classes/class.ilObjTestGUI.php +++ b/components/ILIAS/Test_/classes/class.ilObjTestGUI.php @@ -26,7 +26,7 @@ use ILIAS\Skill\Service\SkillService; use ILIAS\Test\InternalRequestService; -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Class ilObjTestGUI diff --git a/components/ILIAS/Test_/classes/class.ilObjTestListGUI.php b/components/ILIAS/Test_/classes/class.ilObjTestListGUI.php index 1c6447b8ca5c..99abb806ab8a 100644 --- a/components/ILIAS/Test_/classes/class.ilObjTestListGUI.php +++ b/components/ILIAS/Test_/classes/class.ilObjTestListGUI.php @@ -28,7 +28,7 @@ * @extends ilObjectListGUI * @ingroup ModulesTest */ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; class ilObjTestListGUI extends ilObjectListGUI { diff --git a/components/ILIAS/Test_/classes/class.ilTestEvaluationUserData.php b/components/ILIAS/Test_/classes/class.ilTestEvaluationUserData.php index 62806ecf04bd..eb53790e00c6 100644 --- a/components/ILIAS/Test_/classes/class.ilTestEvaluationUserData.php +++ b/components/ILIAS/Test_/classes/class.ilTestEvaluationUserData.php @@ -28,7 +28,7 @@ * @defgroup ModulesTest components/ILIAS/Test * @extends ilObject */ -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; class ilTestEvaluationUserData { diff --git a/components/ILIAS/Test_/classes/class.ilTestExport.php b/components/ILIAS/Test_/classes/class.ilTestExport.php index 73fea90be154..66bde2002a5e 100644 --- a/components/ILIAS/Test_/classes/class.ilTestExport.php +++ b/components/ILIAS/Test_/classes/class.ilTestExport.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Export class for tests diff --git a/components/ILIAS/Test_/classes/class.ilTestPlayerAbstractGUI.php b/components/ILIAS/Test_/classes/class.ilTestPlayerAbstractGUI.php index c06726738e36..c79b58ece30d 100644 --- a/components/ILIAS/Test_/classes/class.ilTestPlayerAbstractGUI.php +++ b/components/ILIAS/Test_/classes/class.ilTestPlayerAbstractGUI.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * Output class for assessment test execution diff --git a/components/ILIAS/Test_/classes/class.ilTestScoringByQuestionsGUI.php b/components/ILIAS/Test_/classes/class.ilTestScoringByQuestionsGUI.php index 64470eae23ea..73f8606d110e 100644 --- a/components/ILIAS/Test_/classes/class.ilTestScoringByQuestionsGUI.php +++ b/components/ILIAS/Test_/classes/class.ilTestScoringByQuestionsGUI.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * ilTestScoringByQuestionsGUI diff --git a/components/ILIAS/Test_/classes/class.ilTestScoringGUI.php b/components/ILIAS/Test_/classes/class.ilTestScoringGUI.php index 6059da6d93e1..1d985824f653 100644 --- a/components/ILIAS/Test_/classes/class.ilTestScoringGUI.php +++ b/components/ILIAS/Test_/classes/class.ilTestScoringGUI.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once "./components/ILIAS/Test_/classes/inc.AssessmentConstants.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/inc.AssessmentConstants.php"; /** * Scoring class for tests diff --git a/components/ILIAS/Test_/classes/class.ilTestServiceGUI.php b/components/ILIAS/Test_/classes/class.ilTestServiceGUI.php index d2db49a80237..8ce0d26ad24c 100644 --- a/components/ILIAS/Test_/classes/class.ilTestServiceGUI.php +++ b/components/ILIAS/Test_/classes/class.ilTestServiceGUI.php @@ -30,7 +30,7 @@ use ILIAS\DI\LoggingServices; use ILIAS\Skill\Service\SkillService; -require_once "./components/ILIAS/Test_/classes/inc.AssessmentConstants.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/inc.AssessmentConstants.php"; /** * Service GUI class for tests. This class is the parent class for all diff --git a/components/ILIAS/Test_/classes/class.ilTestStatistics.php b/components/ILIAS/Test_/classes/class.ilTestStatistics.php index a24273c499f5..320432ecebd9 100644 --- a/components/ILIAS/Test_/classes/class.ilTestStatistics.php +++ b/components/ILIAS/Test_/classes/class.ilTestStatistics.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once './components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/inc.AssessmentConstants.php'; /** * This class calculates statistical data for a test which has to be diff --git a/components/ILIAS/Tracking_/test/ilComponentsTrackingSuite.php b/components/ILIAS/Tracking_/test/ilComponentsTrackingSuite.php index 0f7000b5733e..b5e049d54a66 100644 --- a/components/ILIAS/Tracking_/test/ilComponentsTrackingSuite.php +++ b/components/ILIAS/Tracking_/test/ilComponentsTrackingSuite.php @@ -9,7 +9,7 @@ class ilComponentsTrackingSuite extends TestSuite public static function suite(): self { $suite = new self(); - include_once './components/ILIAS/Tracking_/test/ilTrackingCollectionTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/test/ilTrackingCollectionTest.php'; $suite->addTestSuite(ilTrackingCollectionTest::class); return $suite; } diff --git a/components/ILIAS/Tree_/test/ilComponentsTreeSuite.php b/components/ILIAS/Tree_/test/ilComponentsTreeSuite.php index f054ab539bc6..3edabce72dc8 100644 --- a/components/ILIAS/Tree_/test/ilComponentsTreeSuite.php +++ b/components/ILIAS/Tree_/test/ilComponentsTreeSuite.php @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - include_once './components/ILIAS/Tree_/test/ilRepositoryTreeTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tree_/test/ilRepositoryTreeTest.php'; $suite->addTestSuite(ilRepositoryTreeTest::class); return $suite; } diff --git a/components/ILIAS/Types/tests/TypeTest.php b/components/ILIAS/Types/tests/TypeTest.php index ded19a79684e..048413de67f8 100644 --- a/components/ILIAS/Types/tests/TypeTest.php +++ b/components/ILIAS/Types/tests/TypeTest.php @@ -5,8 +5,8 @@ use ILIAS\BackgroundTasks\Types\TupleType; use PHPUnit\Framework\TestCase; -require_once("vendor/composer/vendor/autoload.php"); -require_once("./components/ILIAS/User_/classes/class.ilObjUser.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/User_/classes/class.ilObjUser.php"); /** * Class BackgroundTaskTest diff --git a/components/ILIAS/UI/src/examples/MainControls/Footer/footer_with_modals.php b/components/ILIAS/UI/src/examples/MainControls/Footer/footer_with_modals.php index d75bbb8921e3..a6273fc4220f 100644 --- a/components/ILIAS/UI/src/examples/MainControls/Footer/footer_with_modals.php +++ b/components/ILIAS/UI/src/examples/MainControls/Footer/footer_with_modals.php @@ -49,7 +49,7 @@ function pageFooterDemo2Footer(): \ILIAS\UI\Component\MainControls\Footer function renderFooterWithModalsInFullscreenMode(Container $dic): string { - require_once("components/ILIAS/UI/src/examples/MainControls/Footer/footer.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/src/examples/MainControls/Footer/footer.php"); $f = $dic->ui()->factory(); $renderer = $dic->ui()->renderer(); diff --git a/components/ILIAS/UI/tests/AbstractFactoryTest.php b/components/ILIAS/UI/tests/AbstractFactoryTest.php index 675311e2fc90..92632e3ca3c4 100644 --- a/components/ILIAS/UI/tests/AbstractFactoryTest.php +++ b/components/ILIAS/UI/tests/AbstractFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Implementation\Crawler\Exception as CrawlerException; use ILIAS\UI\Implementation\Crawler as Crawler; diff --git a/components/ILIAS/UI/tests/Base.php b/components/ILIAS/UI/tests/Base.php index d3a059548ee4..ad049c464d9e 100644 --- a/components/ILIAS/UI/tests/Base.php +++ b/components/ILIAS/UI/tests/Base.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/Renderer/ilIndependentTemplate.php"); require_once(__DIR__ . "/../../../../components/ILIAS/Language_/classes/class.ilLanguage.php"); diff --git a/components/ILIAS/UI/tests/Component/Breadcrumbs/BreadcrumbsTest.php b/components/ILIAS/UI/tests/Component/Breadcrumbs/BreadcrumbsTest.php index 4dfee13c3e4a..09be3803cef5 100644 --- a/components/ILIAS/UI/tests/Component/Breadcrumbs/BreadcrumbsTest.php +++ b/components/ILIAS/UI/tests/Component/Breadcrumbs/BreadcrumbsTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Button/BulkyButtonTest.php b/components/ILIAS/UI/tests/Component/Button/BulkyButtonTest.php index d65a64f7ca68..c181a7dd4446 100644 --- a/components/ILIAS/UI/tests/Component/Button/BulkyButtonTest.php +++ b/components/ILIAS/UI/tests/Component/Button/BulkyButtonTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Button/ButtonFactoryTest.php b/components/ILIAS/UI/tests/Component/Button/ButtonFactoryTest.php index ef60236be252..453df9b1ba19 100644 --- a/components/ILIAS/UI/tests/Component/Button/ButtonFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Button/ButtonFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class ButtonFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Button/ButtonMonthTest.php b/components/ILIAS/UI/tests/Component/Button/ButtonMonthTest.php index a7914e95e515..e67c2f5bece8 100644 --- a/components/ILIAS/UI/tests/Component/Button/ButtonMonthTest.php +++ b/components/ILIAS/UI/tests/Component/Button/ButtonMonthTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation as I; diff --git a/components/ILIAS/UI/tests/Component/Button/ButtonTest.php b/components/ILIAS/UI/tests/Component/Button/ButtonTest.php index 74b9d2a161f7..6dbc61591fc4 100644 --- a/components/ILIAS/UI/tests/Component/Button/ButtonTest.php +++ b/components/ILIAS/UI/tests/Component/Button/ButtonTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Button/MinimizeButtonTest.php b/components/ILIAS/UI/tests/Component/Button/MinimizeButtonTest.php index 73271e1f90f6..7f1794ddbed2 100644 --- a/components/ILIAS/UI/tests/Component/Button/MinimizeButtonTest.php +++ b/components/ILIAS/UI/tests/Component/Button/MinimizeButtonTest.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation as I; diff --git a/components/ILIAS/UI/tests/Component/Button/ToggleButtonTest.php b/components/ILIAS/UI/tests/Component/Button/ToggleButtonTest.php index 84985e090bf0..af254b93258b 100644 --- a/components/ILIAS/UI/tests/Component/Button/ToggleButtonTest.php +++ b/components/ILIAS/UI/tests/Component/Button/ToggleButtonTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation\Component\Signal; diff --git a/components/ILIAS/UI/tests/Component/Card/CardTest.php b/components/ILIAS/UI/tests/Component/Card/CardTest.php index c1be3fc5bf7d..e05fa2b2a95f 100644 --- a/components/ILIAS/UI/tests/Component/Card/CardTest.php +++ b/components/ILIAS/UI/tests/Component/Card/CardTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Card/RepositoryObjectTest.php b/components/ILIAS/UI/tests/Component/Card/RepositoryObjectTest.php index b69722672d8b..3e37cb86a648 100644 --- a/components/ILIAS/UI/tests/Component/Card/RepositoryObjectTest.php +++ b/components/ILIAS/UI/tests/Component/Card/RepositoryObjectTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Chart/Bar/AxisTest.php b/components/ILIAS/UI/tests/Component/Chart/Bar/AxisTest.php index 999ce4c4f10a..12589c3d9459 100644 --- a/components/ILIAS/UI/tests/Component/Chart/Bar/AxisTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/Bar/AxisTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Chart\Bar\XAxis; diff --git a/components/ILIAS/UI/tests/Component/Chart/Bar/BarConfigTest.php b/components/ILIAS/UI/tests/Component/Chart/Bar/BarConfigTest.php index 0630daf81d56..b3e8b322dae5 100644 --- a/components/ILIAS/UI/tests/Component/Chart/Bar/BarConfigTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/Bar/BarConfigTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Chart\Bar\BarConfig; diff --git a/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php b/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php index 62d569f2ba84..11fbf5e6cbc9 100644 --- a/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/Bar/ChartBarTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Chart/ChartScaleBarTest.php b/components/ILIAS/UI/tests/Component/Chart/ChartScaleBarTest.php index 95ef3648b476..c539bc728b67 100644 --- a/components/ILIAS/UI/tests/Component/Chart/ChartScaleBarTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/ChartScaleBarTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Chart/ProgressMeter/ChartProgressMeterTest.php b/components/ILIAS/UI/tests/Component/Chart/ProgressMeter/ChartProgressMeterTest.php index baaa81263835..491c0f386349 100644 --- a/components/ILIAS/UI/tests/Component/Chart/ProgressMeter/ChartProgressMeterTest.php +++ b/components/ILIAS/UI/tests/Component/Chart/ProgressMeter/ChartProgressMeterTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/ComponentHelperTest.php b/components/ILIAS/UI/tests/Component/ComponentHelperTest.php index 2acad9917831..87a48ed46f4b 100644 --- a/components/ILIAS/UI/tests/Component/ComponentHelperTest.php +++ b/components/ILIAS/UI/tests/Component/ComponentHelperTest.php @@ -22,7 +22,7 @@ use ILIAS\UI\Implementation\Component\ComponentHelper; use ILIAS\UI\Component\Test\TestComponent; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../Renderer/TestComponent.php"); diff --git a/components/ILIAS/UI/tests/Component/Counter/CounterClientHtmlTest.php b/components/ILIAS/UI/tests/Component/Counter/CounterClientHtmlTest.php index ae8a4d36dfb2..0afdee39a0fd 100644 --- a/components/ILIAS/UI/tests/Component/Counter/CounterClientHtmlTest.php +++ b/components/ILIAS/UI/tests/Component/Counter/CounterClientHtmlTest.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); diff --git a/components/ILIAS/UI/tests/Component/Counter/CounterFactoryTest.php b/components/ILIAS/UI/tests/Component/Counter/CounterFactoryTest.php index 9674a778b6d4..080b99a682f2 100644 --- a/components/ILIAS/UI/tests/Component/Counter/CounterFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Counter/CounterFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class CounterFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Counter/CounterTest.php b/components/ILIAS/UI/tests/Component/Counter/CounterTest.php index 81487cec9eff..9e8258088d6a 100644 --- a/components/ILIAS/UI/tests/Component/Counter/CounterTest.php +++ b/components/ILIAS/UI/tests/Component/Counter/CounterTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Deck/DeckTest.php b/components/ILIAS/UI/tests/Component/Deck/DeckTest.php index 55fbcc186944..b99c0294447c 100644 --- a/components/ILIAS/UI/tests/Component/Deck/DeckTest.php +++ b/components/ILIAS/UI/tests/Component/Deck/DeckTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Divider/DividerTest.php b/components/ILIAS/UI/tests/Component/Divider/DividerTest.php index d5e60923c2c4..ad6d43ae7337 100644 --- a/components/ILIAS/UI/tests/Component/Divider/DividerTest.php +++ b/components/ILIAS/UI/tests/Component/Divider/DividerTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Dropdown/DropdownTest.php b/components/ILIAS/UI/tests/Component/Dropdown/DropdownTest.php index 0ced2b337c07..44d9c7236a05 100644 --- a/components/ILIAS/UI/tests/Component/Dropdown/DropdownTest.php +++ b/components/ILIAS/UI/tests/Component/Dropdown/DropdownTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Dropzone/File/FileTestBase.php b/components/ILIAS/UI/tests/Component/Dropzone/File/FileTestBase.php index ab00620a64f4..d266a099083b 100644 --- a/components/ILIAS/UI/tests/Component/Dropzone/File/FileTestBase.php +++ b/components/ILIAS/UI/tests/Component/Dropzone/File/FileTestBase.php @@ -20,7 +20,7 @@ namespace ILIAS\Tests\UI\Component\Dropzone\File; -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\FileUpload\Handler\FileInfoResult; diff --git a/components/ILIAS/UI/tests/Component/HasHelpTopicsTest.php b/components/ILIAS/UI/tests/Component/HasHelpTopicsTest.php index 9abab607bc11..a8758ed075bd 100644 --- a/components/ILIAS/UI/tests/Component/HasHelpTopicsTest.php +++ b/components/ILIAS/UI/tests/Component/HasHelpTopicsTest.php @@ -23,7 +23,7 @@ use ILIAS\UI\Component\HasHelpTopics as IHasHelpTopics; use ILIAS\UI\Help\Topic; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); /** * @author Richard Klees diff --git a/components/ILIAS/UI/tests/Component/Image/ImageFactoryTest.php b/components/ILIAS/UI/tests/Component/Image/ImageFactoryTest.php index e4ee49b38f97..63f59a83d8bb 100644 --- a/components/ILIAS/UI/tests/Component/Image/ImageFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Image/ImageFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class ImageFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Image/ImageTest.php b/components/ILIAS/UI/tests/Component/Image/ImageTest.php index 7206be2055c4..a1fdcba5f6a9 100644 --- a/components/ILIAS/UI/tests/Component/Image/ImageTest.php +++ b/components/ILIAS/UI/tests/Component/Image/ImageTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterFactoryTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterFactoryTest.php index 7c1f2d5af744..6c35fb0b40a5 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Filter/FilterFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; use ILIAS\UI\Component\Input\Container\Filter; use ILIAS\UI\Implementation\Component\SignalGenerator; diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php index c16e8b99f841..3ed72c1033bd 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Filter/StandardFilterTest.php @@ -17,7 +17,7 @@ *********************************************************************/ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../../Base.php"); require_once(__DIR__ . "/FilterTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Form/FormFactoryTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Form/FormFactoryTest.php index bc2fba5740e6..7a2ffa42bd5b 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Form/FormFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Form/FormFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; use ILIAS\UI\Component\Input\Container\Form; use ILIAS\UI\Implementation\Component\SignalGenerator; diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Form/PostDataFromServerRequestTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Form/PostDataFromServerRequestTest.php index fe290751f3d4..a450b21327d8 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Form/PostDataFromServerRequestTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Form/PostDataFromServerRequestTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Implementation\Component\Input\PostDataFromServerRequest; use Psr\Http\Message\ServerRequestInterface; diff --git a/components/ILIAS/UI/tests/Component/Input/Container/Form/StandardFormTest.php b/components/ILIAS/UI/tests/Component/Input/Container/Form/StandardFormTest.php index d47ef0bd6c10..79345a3cb0d9 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/Form/StandardFormTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/Form/StandardFormTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../../Base.php"); require_once(__DIR__ . "/FormTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Container/ViewControl/ViewControlContainerTest.php b/components/ILIAS/UI/tests/Component/Input/Container/ViewControl/ViewControlContainerTest.php index 49d21fe573e2..196c1d2734cc 100644 --- a/components/ILIAS/UI/tests/Component/Input/Container/ViewControl/ViewControlContainerTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Container/ViewControl/ViewControlContainerTest.php @@ -18,8 +18,8 @@ declare(strict_types=1); -require_once './vendor/composer/vendor/autoload.php'; -require_once './components/ILIAS/UI/tests/Base.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/Base.php'; use ILIAS\UI\Implementation\Component as I; use ILIAS\UI\Implementation\Component\Input\ViewControl as Control; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php index 0ede4623e949..0a9c63ce6d74 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/CheckboxInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/ColorPickerInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/ColorPickerInputTest.php index c80b08c48053..dd3db0340cf3 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/ColorPickerInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/ColorPickerInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/DateTimeInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/DateTimeInputTest.php index 067673a6b72c..de1177e70bf2 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/DateTimeInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/DateTimeInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/DurationInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/DurationInputTest.php index 3c7a0ed96c32..754bf1e73fb1 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/DurationInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/DurationInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/FieldFactoryTest.php b/components/ILIAS/UI/tests/Component/Input/Field/FieldFactoryTest.php index f4a3750ec913..d3fd164c72af 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/FieldFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/FieldFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; use ILIAS\UI\Component\Input\Field; use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php index 27f8989009cf..6232bef7c6b4 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/FileInputTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php index 77015b7ba435..aa21da5b4258 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/GroupInputTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Input\Field\FormInput; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/HiddenInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/HiddenInputTest.php index 3a868fc788cd..70f9c044360e 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/HiddenInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/HiddenInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php index 80135213e5e3..67fba6b9628d 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/InputTest.php @@ -17,7 +17,7 @@ *********************************************************************/ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Input\Field\FormInput; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php index 9f766fd9e48a..647629d35a04 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/LinkInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/MarkdownTest.php b/components/ILIAS/UI/tests/Component/Input/Field/MarkdownTest.php index c4d3f493cb72..630486be5608 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/MarkdownTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/MarkdownTest.php @@ -34,7 +34,7 @@ use ILIAS\Data\Factory as DataFactory; use ILIAS\UI\Implementation\Render\JavaScriptBinding; -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php index 3a46eb6cb2e2..b2d1102a78e2 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/MultiSelectInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/NumericInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/NumericInputTest.php index 10177e5acd23..fdf3c851e278 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/NumericInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/NumericInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php index 641bd17157f6..9a0e630213be 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/OptionalGroupInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Input\Field\OptionalGroup; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php index fad73add3463..a088e3e00888 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/PasswordInputTest.php @@ -17,7 +17,7 @@ *********************************************************************/ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/RadioInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/RadioInputTest.php index 0d0e92a63f58..eecdc45b94cc 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/RadioInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/RadioInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/SectionInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/SectionInputTest.php index 53d0bafd267c..ca1d5be89ed1 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/SectionInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/SectionInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Input\Field; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php index 6856f3e86608..c21a1387fb14 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/SwitchableGroupInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Input/Field/TagInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/TagInputTest.php index 896b7f70c3c4..0b31b0d8c2ba 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/TagInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/TagInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/TextInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/TextInputTest.php index 302bb115b80e..16b2d0c48d76 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/TextInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/TextInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/TextareaTest.php b/components/ILIAS/UI/tests/Component/Input/Field/TextareaTest.php index 762192aa3e3e..9dd5e1100cb1 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/TextareaTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/TextareaTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/Field/UrlInputTest.php b/components/ILIAS/UI/tests/Component/Input/Field/UrlInputTest.php index 231b9d2919d4..5e1ecfb38106 100644 --- a/components/ILIAS/UI/tests/Component/Input/Field/UrlInputTest.php +++ b/components/ILIAS/UI/tests/Component/Input/Field/UrlInputTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); require_once(__DIR__ . "/InputTest.php"); diff --git a/components/ILIAS/UI/tests/Component/Input/InputFactoryTest.php b/components/ILIAS/UI/tests/Component/Input/InputFactoryTest.php index cfb1a9078ab1..2f4baee01284 100644 --- a/components/ILIAS/UI/tests/Component/Input/InputFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Input/InputFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class InputFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Item/ItemGroupTest.php b/components/ILIAS/UI/tests/Component/Item/ItemGroupTest.php index adac50b926f7..832431556087 100644 --- a/components/ILIAS/UI/tests/Component/Item/ItemGroupTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemGroupTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Item/ItemNotificationClientHtmlTest.php b/components/ILIAS/UI/tests/Component/Item/ItemNotificationClientHtmlTest.php index 6de3948fbc16..c8a8b2b5ec7e 100644 --- a/components/ILIAS/UI/tests/Component/Item/ItemNotificationClientHtmlTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemNotificationClientHtmlTest.php @@ -16,7 +16,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php b/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php index b9c469bf756a..9939df27b431 100644 --- a/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemNotificationTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Item/ItemShyTest.php b/components/ILIAS/UI/tests/Component/Item/ItemShyTest.php index 227f0e0f8092..f7bcaa9b9dc5 100644 --- a/components/ILIAS/UI/tests/Component/Item/ItemShyTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemShyTest.php @@ -17,7 +17,7 @@ * *********************************************************************/ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); require_once(__DIR__ . '/../../Base.php'); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Item/ItemTest.php b/components/ILIAS/UI/tests/Component/Item/ItemTest.php index cf8ecf2e6259..052625ddc372 100644 --- a/components/ILIAS/UI/tests/Component/Item/ItemTest.php +++ b/components/ILIAS/UI/tests/Component/Item/ItemTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/JavaScriptBindableTest.php b/components/ILIAS/UI/tests/Component/JavaScriptBindableTest.php index 828d3e899dcd..3ed4b6432551 100644 --- a/components/ILIAS/UI/tests/Component/JavaScriptBindableTest.php +++ b/components/ILIAS/UI/tests/Component/JavaScriptBindableTest.php @@ -22,7 +22,7 @@ use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\ComponentHelper; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); class JSComponentMock implements \ILIAS\UI\Component\JavaScriptBindable { diff --git a/components/ILIAS/UI/tests/Component/Launcher/LauncherInlineTest.php b/components/ILIAS/UI/tests/Component/Launcher/LauncherInlineTest.php index 0b148d535ca9..49b207ee06e7 100644 --- a/components/ILIAS/UI/tests/Component/Launcher/LauncherInlineTest.php +++ b/components/ILIAS/UI/tests/Component/Launcher/LauncherInlineTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php b/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php index 71ec3672ad99..f754254c6204 100644 --- a/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php +++ b/components/ILIAS/UI/tests/Component/Layout/Alignment/AlignmentTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Implementation\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Layout/LayoutFactoryTest.php b/components/ILIAS/UI/tests/Component/Layout/LayoutFactoryTest.php index 847d21152506..8ae61df3ff7f 100644 --- a/components/ILIAS/UI/tests/Component/Layout/LayoutFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Layout/LayoutFactoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; /** * Tests on factory implementation for layout diff --git a/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php b/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php index 9c15e25754a2..231e4bf212c7 100644 --- a/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php +++ b/components/ILIAS/UI/tests/Component/Layout/Page/StandardPageTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Dropdown\Factory; diff --git a/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php b/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php index acda67e8303f..a747bd721d97 100644 --- a/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php +++ b/components/ILIAS/UI/tests/Component/Legacy/LegacyTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Link/BulkyLinkTest.php b/components/ILIAS/UI/tests/Component/Link/BulkyLinkTest.php index 342523c9a818..b29d588ee251 100644 --- a/components/ILIAS/UI/tests/Component/Link/BulkyLinkTest.php +++ b/components/ILIAS/UI/tests/Component/Link/BulkyLinkTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component\Link as C; diff --git a/components/ILIAS/UI/tests/Component/Link/LinkTest.php b/components/ILIAS/UI/tests/Component/Link/LinkTest.php index 4a19441e4679..00d9fbc5f1e8 100644 --- a/components/ILIAS/UI/tests/Component/Link/LinkTest.php +++ b/components/ILIAS/UI/tests/Component/Link/LinkTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation\Component as I; diff --git a/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueFactoryTest.php b/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueFactoryTest.php index b76736f05aff..37d086cec5a9 100644 --- a/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class CharacteristicValueFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueTest.php b/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueTest.php index 7e81d6a6e61c..9a1f46d9da52 100644 --- a/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/CharacteristicValue/CharacteristicValueTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once('components/ILIAS/UI/tests/Base.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/Base.php'); use ILIAS\UI\Implementation\Component\Listing\CharacteristicValue\Factory as CharacteristicValueFactory; diff --git a/components/ILIAS/UI/tests/Component/Listing/ListingFactoryTest.php b/components/ILIAS/UI/tests/Component/Listing/ListingFactoryTest.php index 57d1ed9f3f16..c8d8fa6bbdb5 100644 --- a/components/ILIAS/UI/tests/Component/Listing/ListingFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/ListingFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class ListingFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Listing/ListingTest.php b/components/ILIAS/UI/tests/Component/Listing/ListingTest.php index df34c352cda7..5c126207944a 100644 --- a/components/ILIAS/UI/tests/Component/Listing/ListingTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/ListingTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Listing/Workflow/LinearWorkflowTest.php b/components/ILIAS/UI/tests/Component/Listing/Workflow/LinearWorkflowTest.php index 5b313998c8c7..99c0f9b3272c 100644 --- a/components/ILIAS/UI/tests/Component/Listing/Workflow/LinearWorkflowTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/Workflow/LinearWorkflowTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Listing\Workflow; diff --git a/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowFactoryTest.php b/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowFactoryTest.php index 70b7d296507c..2ce4ac3fbd61 100644 --- a/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class WorkflowFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowStepTest.php b/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowStepTest.php index e6b756dc40f6..f184035b27e7 100644 --- a/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowStepTest.php +++ b/components/ILIAS/UI/tests/Component/Listing/Workflow/WorkflowStepTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Listing\Workflow; diff --git a/components/ILIAS/UI/tests/Component/MainControls/FooterTest.php b/components/ILIAS/UI/tests/Component/MainControls/FooterTest.php index f6d78c557995..fcc00bf0576e 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/FooterTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/FooterTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php b/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php index 52d8031b4dec..8738f017f773 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/MainBarTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/MainControlsFactoryTest.php b/components/ILIAS/UI/tests/Component/MainControls/MainControlsFactoryTest.php index e08260f33752..20f4ab4d8def 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/MainControlsFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/MainControlsFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; /** * Tests on factory implementation for main controls diff --git a/components/ILIAS/UI/tests/Component/MainControls/MetaBarTest.php b/components/ILIAS/UI/tests/Component/MainControls/MetaBarTest.php index f3b1f6f794b7..c059674836ce 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/MetaBarTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/MetaBarTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/ModeInfoTest.php b/components/ILIAS/UI/tests/Component/MainControls/ModeInfoTest.php index 801cf31ef923..a8019654e5de 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/ModeInfoTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/ModeInfoTest.php @@ -23,7 +23,7 @@ use ILIAS\UI\Implementation\Component\SignalGenerator; use ILIAS\UI\Implementation\Component\Symbol\Factory; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); /** diff --git a/components/ILIAS/UI/tests/Component/MainControls/Slate/CombinedSlateTest.php b/components/ILIAS/UI/tests/Component/MainControls/Slate/CombinedSlateTest.php index 4e6db6a75dba..27edc3f02c67 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/Slate/CombinedSlateTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/Slate/CombinedSlateTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/Slate/DrilldownSlateTest.php b/components/ILIAS/UI/tests/Component/MainControls/Slate/DrilldownSlateTest.php index 9fd68c0d7486..9f9dec96ea4d 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/Slate/DrilldownSlateTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/Slate/DrilldownSlateTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/Slate/NotificationSlateTest.php b/components/ILIAS/UI/tests/Component/MainControls/Slate/NotificationSlateTest.php index 3b0391a8d66f..900911671467 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/Slate/NotificationSlateTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/Slate/NotificationSlateTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateFactoryTest.php b/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateFactoryTest.php index b3c8932b24a5..f4c8029bcff7 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; /** * Tests on factory implementation for Slates diff --git a/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateTest.php b/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateTest.php index 836562c9f59c..6760039bcdbd 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/Slate/SlateTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/MainControls/SystemInfoTest.php b/components/ILIAS/UI/tests/Component/MainControls/SystemInfoTest.php index aa1c03a37d72..ac5df9c821ce 100644 --- a/components/ILIAS/UI/tests/Component/MainControls/SystemInfoTest.php +++ b/components/ILIAS/UI/tests/Component/MainControls/SystemInfoTest.php @@ -25,7 +25,7 @@ use ILIAS\UI\Implementation\Render\JavaScriptBinding; use ILIAS\UI\Component\MainControls\SystemInfo as SystemInfoAlias; -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); /** diff --git a/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php b/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php index ab3a8aec911d..401f639c1b8c 100644 --- a/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php +++ b/components/ILIAS/UI/tests/Component/Menu/Drilldown/DrilldownTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Menu; diff --git a/components/ILIAS/UI/tests/Component/MessageBox/MessageBoxTest.php b/components/ILIAS/UI/tests/Component/MessageBox/MessageBoxTest.php index 0b04e058cb48..9b0aa12c7da6 100644 --- a/components/ILIAS/UI/tests/Component/MessageBox/MessageBoxTest.php +++ b/components/ILIAS/UI/tests/Component/MessageBox/MessageBoxTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemFactoryTest.php b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemFactoryTest.php index 598c834630dc..a9ae60556644 100644 --- a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemTest.php b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemTest.php index cfb0e7791ccd..d54f3551c07a 100644 --- a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemTest.php +++ b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/InterruptiveItemTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/KeyValueInterruptiveItemTest.php b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/KeyValueInterruptiveItemTest.php index a52154fced56..a2be8f771980 100644 --- a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/KeyValueInterruptiveItemTest.php +++ b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/KeyValueInterruptiveItemTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/StandardInterruptiveItemTest.php b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/StandardInterruptiveItemTest.php index ebb5d426cb60..70d7aa7e5239 100644 --- a/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/StandardInterruptiveItemTest.php +++ b/components/ILIAS/UI/tests/Component/Modal/InterruptiveItem/StandardInterruptiveItemTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Modal/ModalBase.php b/components/ILIAS/UI/tests/Component/Modal/ModalBase.php index 6e4858e8d8f8..5c6c86c8fc86 100644 --- a/components/ILIAS/UI/tests/Component/Modal/ModalBase.php +++ b/components/ILIAS/UI/tests/Component/Modal/ModalBase.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelFactoryTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelFactoryTest.php index 7c809b176f45..9d6f0576115a 100644 --- a/components/ILIAS/UI/tests/Component/Panel/PanelFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class PanelFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelListingTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelListingTest.php index 9e3e4bb52b0c..74aedb27d51e 100644 --- a/components/ILIAS/UI/tests/Component/Panel/PanelListingTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelListingTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php index d2ab27f6c1bd..028277be737a 100644 --- a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryLegacyTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryListingTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryListingTest.php index f26c37893535..a9b601748d7f 100644 --- a/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryListingTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelSecondaryListingTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Panel/PanelTest.php b/components/ILIAS/UI/tests/Component/Panel/PanelTest.php index 9bcee9a930ce..bfc295aa1cc0 100644 --- a/components/ILIAS/UI/tests/Component/Panel/PanelTest.php +++ b/components/ILIAS/UI/tests/Component/Panel/PanelTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Player/PlayerAudioTest.php b/components/ILIAS/UI/tests/Component/Player/PlayerAudioTest.php index ff3947fb9b1f..1d8ad12bfcd9 100644 --- a/components/ILIAS/UI/tests/Component/Player/PlayerAudioTest.php +++ b/components/ILIAS/UI/tests/Component/Player/PlayerAudioTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Player/PlayerFactoryTest.php b/components/ILIAS/UI/tests/Component/Player/PlayerFactoryTest.php index f6c21fe75796..70450a62da1a 100644 --- a/components/ILIAS/UI/tests/Component/Player/PlayerFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Player/PlayerFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class PlayerFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Player/PlayerVideoTest.php b/components/ILIAS/UI/tests/Component/Player/PlayerVideoTest.php index 06ec84fd1032..1dd5f15d1699 100644 --- a/components/ILIAS/UI/tests/Component/Player/PlayerVideoTest.php +++ b/components/ILIAS/UI/tests/Component/Player/PlayerVideoTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php b/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php index e7c399096fa7..d8fa319bbda3 100644 --- a/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php +++ b/components/ILIAS/UI/tests/Component/Popover/PopoverTest.php @@ -21,7 +21,7 @@ use ILIAS\UI\Implementation as I; use ILIAS\UI\Component\Popover\Popover; -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); /** diff --git a/components/ILIAS/UI/tests/Component/Symbol/Avatar/AvatarTest.php b/components/ILIAS/UI/tests/Component/Symbol/Avatar/AvatarTest.php index 606a766919c1..38aa3c5a4a36 100644 --- a/components/ILIAS/UI/tests/Component/Symbol/Avatar/AvatarTest.php +++ b/components/ILIAS/UI/tests/Component/Symbol/Avatar/AvatarTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Symbol\Avatar\Factory; diff --git a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphFactoryTest.php b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphFactoryTest.php index 480244151ff2..ac7da7005988 100644 --- a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class GlyphFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php index 2f8c30a27f0a..4f7618965b59 100644 --- a/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php +++ b/components/ILIAS/UI/tests/Component/Symbol/Glyph/GlyphTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Symbol\Glyph as G; diff --git a/components/ILIAS/UI/tests/Component/Symbol/Icon/IconTest.php b/components/ILIAS/UI/tests/Component/Symbol/Icon/IconTest.php index f1da3d4e8eef..3998c8f06364 100644 --- a/components/ILIAS/UI/tests/Component/Symbol/Icon/IconTest.php +++ b/components/ILIAS/UI/tests/Component/Symbol/Icon/IconTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation as I; diff --git a/components/ILIAS/UI/tests/Component/Table/Action/ActionFactoryTest.php b/components/ILIAS/UI/tests/Component/Table/Action/ActionFactoryTest.php index df9f1b0f3638..75aacdbb6973 100644 --- a/components/ILIAS/UI/tests/Component/Table/Action/ActionFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Table/Action/ActionFactoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; use ILIAS\UI\Component\Table\Action; use ILIAS\Data; diff --git a/components/ILIAS/UI/tests/Component/Table/Action/ActionTest.php b/components/ILIAS/UI/tests/Component/Table/Action/ActionTest.php index 5b89716ba6c9..449a96577c26 100644 --- a/components/ILIAS/UI/tests/Component/Table/Action/ActionTest.php +++ b/components/ILIAS/UI/tests/Component/Table/Action/ActionTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Component\Table\Action as I; diff --git a/components/ILIAS/UI/tests/Component/Table/Column/ColumnFactoryTest.php b/components/ILIAS/UI/tests/Component/Table/Column/ColumnFactoryTest.php index 2719a5b7c7f5..9249dfb332c9 100644 --- a/components/ILIAS/UI/tests/Component/Table/Column/ColumnFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Table/Column/ColumnFactoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; use ILIAS\UI\Component\Table\Column; use ILIAS\Data; diff --git a/components/ILIAS/UI/tests/Component/Table/Column/ColumnTest.php b/components/ILIAS/UI/tests/Component/Table/Column/ColumnTest.php index 3ba9fd472e74..2709d4b3c546 100644 --- a/components/ILIAS/UI/tests/Component/Table/Column/ColumnTest.php +++ b/components/ILIAS/UI/tests/Component/Table/Column/ColumnTest.php @@ -19,7 +19,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../Base.php"); use ILIAS\UI\Implementation\Component\Table\Column; diff --git a/components/ILIAS/UI/tests/Component/Table/DataRendererTest.php b/components/ILIAS/UI/tests/Component/Table/DataRendererTest.php index b6a2c9de67f6..a39b8e94c380 100644 --- a/components/ILIAS/UI/tests/Component/Table/DataRendererTest.php +++ b/components/ILIAS/UI/tests/Component/Table/DataRendererTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component; diff --git a/components/ILIAS/UI/tests/Component/Table/DataTest.php b/components/ILIAS/UI/tests/Component/Table/DataTest.php index 15df48665a63..88dc6cf97cd9 100644 --- a/components/ILIAS/UI/tests/Component/Table/DataTest.php +++ b/components/ILIAS/UI/tests/Component/Table/DataTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component; diff --git a/components/ILIAS/UI/tests/Component/Table/PresentationTest.php b/components/ILIAS/UI/tests/Component/Table/PresentationTest.php index 7f2adf9897f4..e6a6e5e3c80c 100644 --- a/components/ILIAS/UI/tests/Component/Table/PresentationTest.php +++ b/components/ILIAS/UI/tests/Component/Table/PresentationTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation as I; diff --git a/components/ILIAS/UI/tests/Component/Table/TableFactoryTest.php b/components/ILIAS/UI/tests/Component/Table/TableFactoryTest.php index 7879ea9bbeab..a8dfc157301e 100644 --- a/components/ILIAS/UI/tests/Component/Table/TableFactoryTest.php +++ b/components/ILIAS/UI/tests/Component/Table/TableFactoryTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; class TableFactoryTest extends AbstractFactoryTest { diff --git a/components/ILIAS/UI/tests/Component/Table/TableTest.php b/components/ILIAS/UI/tests/Component/Table/TableTest.php index 39bd1ed36f2d..d53d60ed6f45 100644 --- a/components/ILIAS/UI/tests/Component/Table/TableTest.php +++ b/components/ILIAS/UI/tests/Component/Table/TableTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Toast/ToastClientHtmlTest.php b/components/ILIAS/UI/tests/Component/Toast/ToastClientHtmlTest.php index 5ee838142e96..bdc9a204b2e8 100644 --- a/components/ILIAS/UI/tests/Component/Toast/ToastClientHtmlTest.php +++ b/components/ILIAS/UI/tests/Component/Toast/ToastClientHtmlTest.php @@ -15,7 +15,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); diff --git a/components/ILIAS/UI/tests/Component/Toast/ToastTest.php b/components/ILIAS/UI/tests/Component/Toast/ToastTest.php index 453f3070f4ea..5f60fe96fc30 100644 --- a/components/ILIAS/UI/tests/Component/Toast/ToastTest.php +++ b/components/ILIAS/UI/tests/Component/Toast/ToastTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation\Component\Link\Link; diff --git a/components/ILIAS/UI/tests/Component/Tree/ExpandableTreeTest.php b/components/ILIAS/UI/tests/Component/Tree/ExpandableTreeTest.php index 311e5f6d1b08..28553d9487b9 100644 --- a/components/ILIAS/UI/tests/Component/Tree/ExpandableTreeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/ExpandableTreeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Tree/Node/BylineNodeTest.php b/components/ILIAS/UI/tests/Component/Tree/Node/BylineNodeTest.php index 66c166dff955..d8a87e89858e 100644 --- a/components/ILIAS/UI/tests/Component/Tree/Node/BylineNodeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/Node/BylineNodeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Tree/Node/KeyValueNodeTest.php b/components/ILIAS/UI/tests/Component/Tree/Node/KeyValueNodeTest.php index 1284269a78a6..d9a4ec449b88 100644 --- a/components/ILIAS/UI/tests/Component/Tree/Node/KeyValueNodeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/Node/KeyValueNodeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Tree/Node/NodeTest.php b/components/ILIAS/UI/tests/Component/Tree/Node/NodeTest.php index 0972b15dde3f..9fdb04620f38 100644 --- a/components/ILIAS/UI/tests/Component/Tree/Node/NodeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/Node/NodeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\Data\URI; diff --git a/components/ILIAS/UI/tests/Component/Tree/Node/SimpleNodeTest.php b/components/ILIAS/UI/tests/Component/Tree/Node/SimpleNodeTest.php index 6b2c02cc3724..b7fd926d8088 100644 --- a/components/ILIAS/UI/tests/Component/Tree/Node/SimpleNodeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/Node/SimpleNodeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "../../../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/Tree/TreeTest.php b/components/ILIAS/UI/tests/Component/Tree/TreeTest.php index e452bdfd0054..5001e226f264 100644 --- a/components/ILIAS/UI/tests/Component/Tree/TreeTest.php +++ b/components/ILIAS/UI/tests/Component/Tree/TreeTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Implementation\Component\Tree\Tree; diff --git a/components/ILIAS/UI/tests/Component/TriggererTest.php b/components/ILIAS/UI/tests/Component/TriggererTest.php index 09ccfbb25f0f..ede057e36a92 100644 --- a/components/ILIAS/UI/tests/Component/TriggererTest.php +++ b/components/ILIAS/UI/tests/Component/TriggererTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Component; use ILIAS\UI\Implementation\Component\TriggeredSignal; diff --git a/components/ILIAS/UI/tests/Component/ViewControl/PaginationTest.php b/components/ILIAS/UI/tests/Component/ViewControl/PaginationTest.php index a40464c93d36..cbc0a4e68442 100644 --- a/components/ILIAS/UI/tests/Component/ViewControl/PaginationTest.php +++ b/components/ILIAS/UI/tests/Component/ViewControl/PaginationTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/ViewControl/SortationTest.php b/components/ILIAS/UI/tests/Component/ViewControl/SortationTest.php index 43cc59bff776..edcb585a3bb6 100644 --- a/components/ILIAS/UI/tests/Component/ViewControl/SortationTest.php +++ b/components/ILIAS/UI/tests/Component/ViewControl/SortationTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Component/ViewControl/ViewControlTest.php b/components/ILIAS/UI/tests/Component/ViewControl/ViewControlTest.php index 33dd4eb29816..1058a50a0c2d 100644 --- a/components/ILIAS/UI/tests/Component/ViewControl/ViewControlTest.php +++ b/components/ILIAS/UI/tests/Component/ViewControl/ViewControlTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once( "./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../Base.php"); use ILIAS\UI\Component as C; diff --git a/components/ILIAS/UI/tests/Crawler/EntriesYamlParserTest.php b/components/ILIAS/UI/tests/Crawler/EntriesYamlParserTest.php index e08653e001bb..4a7ba967224f 100644 --- a/components/ILIAS/UI/tests/Crawler/EntriesYamlParserTest.php +++ b/components/ILIAS/UI/tests/Crawler/EntriesYamlParserTest.php @@ -18,8 +18,8 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); -include_once("components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); use ILIAS\UI\Implementation\Crawler as Crawler; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntriesTest.php b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntriesTest.php index 0fa0a1a4de9d..0ba21022e03d 100644 --- a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntriesTest.php +++ b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntriesTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Implementation\Crawler\Entry\ComponentEntry as Entry; use ILIAS\UI\Implementation\Crawler\Entry\ComponentEntries as Entries; diff --git a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryDescriptionTest.php b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryDescriptionTest.php index c7759318c322..2b7e74f8ab4d 100644 --- a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryDescriptionTest.php +++ b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryDescriptionTest.php @@ -18,8 +18,8 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); -include_once("components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); use ILIAS\UI\Implementation\Crawler as Crawler; use ILIAS\UI\Implementation\Crawler\Entry as Entry; diff --git a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryRulesTest.php b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryRulesTest.php index d6ddbd44352c..ad24edb2053d 100644 --- a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryRulesTest.php +++ b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryRulesTest.php @@ -18,8 +18,8 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); -include_once("components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); use ILIAS\UI\Implementation\Crawler as Crawler; use ILIAS\UI\Implementation\Crawler\Entry as Entry; diff --git a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryTest.php b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryTest.php index 3c90334f9ba1..0a6d0f8dbaa1 100644 --- a/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryTest.php +++ b/components/ILIAS/UI/tests/Crawler/Entry/ComponentEntryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Implementation\Crawler\Entry\ComponentEntry as Entry; use ILIAS\UI\Implementation\Crawler\Entry\ComponentEntryDescription as Description; diff --git a/components/ILIAS/UI/tests/Crawler/FactoriesCrawlerTest.php b/components/ILIAS/UI/tests/Crawler/FactoriesCrawlerTest.php index 938ff5a427b2..52b75e623e13 100644 --- a/components/ILIAS/UI/tests/Crawler/FactoriesCrawlerTest.php +++ b/components/ILIAS/UI/tests/Crawler/FactoriesCrawlerTest.php @@ -18,8 +18,8 @@ * *********************************************************************/ -require_once("./vendor/composer/vendor/autoload.php"); -include_once("./components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); use ILIAS\UI\Implementation\Crawler as Crawler; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/UI/tests/Crawler/UIComponentsTest.php b/components/ILIAS/UI/tests/Crawler/UIComponentsTest.php index a97d9b6f75bc..d328351eab1f 100644 --- a/components/ILIAS/UI/tests/Crawler/UIComponentsTest.php +++ b/components/ILIAS/UI/tests/Crawler/UIComponentsTest.php @@ -18,8 +18,8 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); -include_once("components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UI/tests/Crawler/Fixture/Fixture.php"); use ILIAS\UI\Implementation\Crawler as Crawler; use PHPUnit\Framework\TestCase; diff --git a/components/ILIAS/UI/tests/Examples/ExamplesTest.php b/components/ILIAS/UI/tests/Examples/ExamplesTest.php index aadec33581fe..1c3f23268751 100644 --- a/components/ILIAS/UI/tests/Examples/ExamplesTest.php +++ b/components/ILIAS/UI/tests/Examples/ExamplesTest.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once("./vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../Base.php"); use ILIAS\UI\Implementation\Crawler as Crawler; diff --git a/components/ILIAS/UI/tests/MainFactoryTest.php b/components/ILIAS/UI/tests/MainFactoryTest.php index 17574a447355..1772a7cdf77d 100644 --- a/components/ILIAS/UI/tests/MainFactoryTest.php +++ b/components/ILIAS/UI/tests/MainFactoryTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once 'components/ILIAS/UI/tests/AbstractFactoryTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/UI/tests/AbstractFactoryTest.php'; /** * Class MainFactoryTest diff --git a/components/ILIAS/UI/tests/Renderer/AbstractRendererTest.php b/components/ILIAS/UI/tests/Renderer/AbstractRendererTest.php index 8c61ea9ff473..ea76dd33ed95 100644 --- a/components/ILIAS/UI/tests/Renderer/AbstractRendererTest.php +++ b/components/ILIAS/UI/tests/Renderer/AbstractRendererTest.php @@ -19,7 +19,7 @@ declare(strict_types=1); namespace ILIAS\UI\Implementation\Component\Symbol\Glyph { - require_once("./vendor/composer/vendor/autoload.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); use ILIAS\UI\Component\Component; use ILIAS\UI\Renderer; diff --git a/components/ILIAS/UI/tests/Renderer/ilIndependentTemplate.php b/components/ILIAS/UI/tests/Renderer/ilIndependentTemplate.php index 1323ada0b316..a13d595400a9 100644 --- a/components/ILIAS/UI/tests/Renderer/ilIndependentTemplate.php +++ b/components/ILIAS/UI/tests/Renderer/ilIndependentTemplate.php @@ -18,12 +18,12 @@ declare(strict_types=1); -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); // Do the require-dance for ilTemplate. -require_once("./components/ILIAS/UICore_/lib/html-it/IT.php"); -require_once("./components/ILIAS/UICore_/lib/html-it/ITX.php"); -require_once("./components/ILIAS/UICore_/classes/class.ilTemplate.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UICore_/lib/html-it/IT.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UICore_/lib/html-it/ITX.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UICore_/classes/class.ilTemplate.php"); class ilIndependentGlobalTemplate extends ilGlobalTemplate implements \ILIAS\UI\Implementation\Render\Template { diff --git a/components/ILIAS/UI/tests/UITestHelper.php b/components/ILIAS/UI/tests/UITestHelper.php index 23c57ec8f786..cec0b6f15cbf 100644 --- a/components/ILIAS/UI/tests/UITestHelper.php +++ b/components/ILIAS/UI/tests/UITestHelper.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/Base.php"); diff --git a/components/ILIAS/UI/tests/UITestHelperTest.php b/components/ILIAS/UI/tests/UITestHelperTest.php index e92c6a5e18a8..31ce6f376c10 100644 --- a/components/ILIAS/UI/tests/UITestHelperTest.php +++ b/components/ILIAS/UI/tests/UITestHelperTest.php @@ -18,7 +18,7 @@ * *********************************************************************/ -require_once("vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/UITestHelper.php"); diff --git a/components/ILIAS/UIComponent_/SyntaxHighlighter/classes/class.ilSyntaxHighlighter.php b/components/ILIAS/UIComponent_/SyntaxHighlighter/classes/class.ilSyntaxHighlighter.php index 4e331f8c28fe..1a1465618272 100644 --- a/components/ILIAS/UIComponent_/SyntaxHighlighter/classes/class.ilSyntaxHighlighter.php +++ b/components/ILIAS/UIComponent_/SyntaxHighlighter/classes/class.ilSyntaxHighlighter.php @@ -114,7 +114,7 @@ public static function getSupportedLanguagesV51(): array public function highlight(string $a_code): string { - include_once("./vendor/composer/vendor/geshi/geshi/src/geshi.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/geshi/geshi/src/geshi.php"); $geshi = new Geshi(html_entity_decode($a_code), $this->lang); //var_dump($geshi->get_supported_languages()); exit; diff --git a/components/ILIAS/UIComponent_/test/ilComponentsUIComponentSuite.php b/components/ILIAS/UIComponent_/test/ilComponentsUIComponentSuite.php index 237467462e4a..9f491fb07a81 100644 --- a/components/ILIAS/UIComponent_/test/ilComponentsUIComponentSuite.php +++ b/components/ILIAS/UIComponent_/test/ilComponentsUIComponentSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/UIComponent_/test/UIHookPluginGUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/UIComponent_/test/UIHookPluginGUITest.php"); $suite->addTestSuite("UIHookPluginGUITest"); return $suite; diff --git a/components/ILIAS/UICore_/classes/Setup/Artifact/class.ilCtrlSecurityArtifactObjective.php b/components/ILIAS/UICore_/classes/Setup/Artifact/class.ilCtrlSecurityArtifactObjective.php index bf290df364ce..8ea461ad7723 100644 --- a/components/ILIAS/UICore_/classes/Setup/Artifact/class.ilCtrlSecurityArtifactObjective.php +++ b/components/ILIAS/UICore_/classes/Setup/Artifact/class.ilCtrlSecurityArtifactObjective.php @@ -4,7 +4,7 @@ /* Copyright (c) 2021 Thibeau Fuhrer Extended GPL, see docs/LICENSE */ -require_once __DIR__ . "/../../../../../../vendor/composer/vendor/autoload.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"; use ILIAS\Setup\Artifact\BuildArtifactObjective; use ILIAS\Setup\ImplementationOfInterfaceFinder; diff --git a/components/ILIAS/UICore_/classes/Structure/class.ilCtrlStructureReader.php b/components/ILIAS/UICore_/classes/Structure/class.ilCtrlStructureReader.php index e6386e7b642c..2f24083db666 100644 --- a/components/ILIAS/UICore_/classes/Structure/class.ilCtrlStructureReader.php +++ b/components/ILIAS/UICore_/classes/Structure/class.ilCtrlStructureReader.php @@ -4,7 +4,7 @@ /* Copyright (c) 2021 Thibeau Fuhrer Extended GPL, see docs/LICENSE */ -require_once __DIR__ . '/../../../../../vendor/composer/vendor/autoload.php'; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Class ilCtrlStructureReader is responsible for reading diff --git a/components/ILIAS/UI_/test/ilComponentsUISuite.php b/components/ILIAS/UI_/test/ilComponentsUISuite.php index b5a71ddc9ca3..f7b02ae4ae8d 100644 --- a/components/ILIAS/UI_/test/ilComponentsUISuite.php +++ b/components/ILIAS/UI_/test/ilComponentsUISuite.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * UI Service test suite diff --git a/components/ILIAS/User_/classes/class.ilCustomUserFieldsHelper.php b/components/ILIAS/User_/classes/class.ilCustomUserFieldsHelper.php index eea0abcc28f3..1c7221b28cac 100644 --- a/components/ILIAS/User_/classes/class.ilCustomUserFieldsHelper.php +++ b/components/ILIAS/User_/classes/class.ilCustomUserFieldsHelper.php @@ -17,7 +17,7 @@ *********************************************************************/ // still needed, since constants are defined in ilUserDefinedFields -include_once("./components/ILIAS/User_/classes/class.ilUserDefinedFields.php"); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/User_/classes/class.ilUserDefinedFields.php"); /** * @author Stefan Meyer diff --git a/components/ILIAS/User_/test/ilObjUserPasswordTest.php b/components/ILIAS/User_/test/ilObjUserPasswordTest.php index 59f856978508..1b1a02f74f2c 100644 --- a/components/ILIAS/User_/test/ilObjUserPasswordTest.php +++ b/components/ILIAS/User_/test/ilObjUserPasswordTest.php @@ -20,14 +20,14 @@ use org\bovigo\vfs; -require_once 'vendor/composer/vendor/autoload.php'; -require_once 'components/ILIAS/User_/classes/class.ilUserPasswordManager.php'; -require_once 'components/ILIAS/User_/classes/class.ilUserPasswordEncoderFactory.php'; -require_once 'components/ILIAS/Password_/classes/class.ilBasePasswordEncoder.php'; -require_once 'components/ILIAS/Utilities_/classes/class.ilUtil.php'; -require_once 'components/ILIAS/User_/classes/class.ilObjUser.php'; -require_once 'components/ILIAS/User_/exceptions/class.ilUserException.php'; -require_once 'components/ILIAS/User_/test/ilUserBaseTest.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserPasswordManager.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserPasswordEncoderFactory.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Password_/classes/class.ilBasePasswordEncoder.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Utilities_/classes/class.ilUtil.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilObjUser.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/exceptions/class.ilUserException.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/test/ilUserBaseTest.php'; class ilObjUserPasswordTest extends ilUserBaseTest { diff --git a/components/ILIAS/Utilities_/test/ilComponentsUtilitiesSuite.php b/components/ILIAS/Utilities_/test/ilComponentsUtilitiesSuite.php index aafa4fc57276..e774ddd1e70f 100644 --- a/components/ILIAS/Utilities_/test/ilComponentsUtilitiesSuite.php +++ b/components/ILIAS/Utilities_/test/ilComponentsUtilitiesSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsUtilitiesSuite extends TestSuite { diff --git a/components/ILIAS/Verification_/test/ilComponentsVerificationSuite.php b/components/ILIAS/Verification_/test/ilComponentsVerificationSuite.php index f9d9c610f6cb..3bb6798bec7a 100644 --- a/components/ILIAS/Verification_/test/ilComponentsVerificationSuite.php +++ b/components/ILIAS/Verification_/test/ilComponentsVerificationSuite.php @@ -17,7 +17,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -28,7 +28,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Verification_/test/CertificateVerificationClassMapTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Verification_/test/CertificateVerificationClassMapTest.php"); $suite->addTestSuite("CertificateVerificationClassMapTest"); return $suite; diff --git a/components/ILIAS/VirusScanner/tests/VirusScannerPreProcessorTest.php b/components/ILIAS/VirusScanner/tests/VirusScannerPreProcessorTest.php index 7466b50b8506..d07ddbdf41ff 100644 --- a/components/ILIAS/VirusScanner/tests/VirusScannerPreProcessorTest.php +++ b/components/ILIAS/VirusScanner/tests/VirusScannerPreProcessorTest.php @@ -1,6 +1,6 @@ addTestSuite('ilWACTokenTest'); - //require_once('./components/ILIAS/WebAccessChecker_/test/CheckingInstance/ilWACCheckingInstanceTest.php'); + //require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebAccessChecker_/test/CheckingInstance/ilWACCheckingInstanceTest.php'); //$suite->addTestSuite('ilWACCheckingInstanceTest'); - //require_once('./components/ILIAS/WebAccessChecker_/test/Path/ilWACPathTest.php'); + //require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebAccessChecker_/test/Path/ilWACPathTest.php'); //$suite->addTestSuite('ilWACPathTest'); return new self(); diff --git a/components/ILIAS/WebAccessChecker_/wac.php b/components/ILIAS/WebAccessChecker_/wac.php index a6531d166174..3782a5e895f8 100644 --- a/components/ILIAS/WebAccessChecker_/wac.php +++ b/components/ILIAS/WebAccessChecker_/wac.php @@ -9,7 +9,7 @@ chdir('../../../'); /** @noRector */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); $container = new \ILIAS\DI\Container(); diff --git a/components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php b/components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php index 7dcec3431a78..f3606d26dc0a 100644 --- a/components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php +++ b/components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php @@ -21,7 +21,7 @@ use PHPUnit\Framework\TestCase; use Sabre\DAV\Exception\Forbidden; -require_once "./components/ILIAS/WebDAV_/test/ilWebDAVTestHelper.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/ilWebDAVTestHelper.php"; class ilDAVClientNodeTest extends TestCase { diff --git a/components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php b/components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php index 2242cda5a33d..860ceced3037 100644 --- a/components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php +++ b/components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php @@ -23,7 +23,7 @@ use Sabre\DAV\Exception\NotFound; use Sabre\DAV\Exception\Forbidden; -require_once "./components/ILIAS/WebDAV_/test/webdav_overrides.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/webdav_overrides.php"; class ilDAVContainerTest extends TestCase { diff --git a/components/ILIAS/WebDAV_/test/ilComponentsWebDAVSuite.php b/components/ILIAS/WebDAV_/test/ilComponentsWebDAVSuite.php index f83d83e71b9d..d6888715ace6 100644 --- a/components/ILIAS/WebDAV_/test/ilComponentsWebDAVSuite.php +++ b/components/ILIAS/WebDAV_/test/ilComponentsWebDAVSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once __DIR__ . "/../../../../vendor/composer/vendor/autoload.php"; +require_once __DIR__ . substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"; /** * @author Stephan Winiker @@ -32,16 +32,16 @@ public static function suite(): ilComponentsWebDAVSuite { $suite = new ilComponentsWebDAVSuite(); - require_once "./components/ILIAS/WebDAV_/test/traits/ilWebDAVCheckValidTitleTraitTest.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/traits/ilWebDAVCheckValidTitleTraitTest.php"; $suite->addTestSuite("ilWebDAVCheckValidTitleTraitTest"); - require_once "./components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php"; $suite->addTestSuite("ilWebDAVLockUriPathResolverTest"); - require_once "./components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/dav/class.ilDAVContainerTest.php"; $suite->addTestSuite("ilDAVContainerTest"); - require_once "./components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/dav/class.ilDAVClientNodeTest.php"; $suite->addTestSuite("ilDAVClientNodeTest"); return $suite; diff --git a/components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php b/components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php index 0c0358d8bde9..132c9010a7b5 100644 --- a/components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php +++ b/components/ILIAS/WebDAV_/test/lock/ilWebDAVLockUriPathResolverTest.php @@ -22,7 +22,7 @@ * *********************************************************************/ -require_once "./components/ILIAS/WebDAV_/test/ilWebDAVTestHelper.php"; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebDAV_/test/ilWebDAVTestHelper.php"; /** * @runTestsInSeparateProcesses diff --git a/components/ILIAS/WebResource_/test/ilComponentsWebResourceSuite.php b/components/ILIAS/WebResource_/test/ilComponentsWebResourceSuite.php index b67a14f6af59..0406982ab707 100644 --- a/components/ILIAS/WebResource_/test/ilComponentsWebResourceSuite.php +++ b/components/ILIAS/WebResource_/test/ilComponentsWebResourceSuite.php @@ -24,12 +24,12 @@ class ilComponentsWebResourceSuite extends TestSuite { public static function suite(): self { - require_once("./components/ILIAS/WebResource_/test/ilWebResourceParameterTest.php"); - require_once("./components/ILIAS/WebResource_/test/ilWebResourceItemsContainerTest.php"); - require_once("./components/ILIAS/WebResource_/test/ilWebResourceDatabaseRepositoryTest.php"); - require_once("./components/ILIAS/WebResource_/test/ilWebResourceItemTest.php"); - require_once("./components/ILIAS/WebResource_/test/ilWebResourceItemInternalTest.php"); - require_once("./components/ILIAS/WebResource_/test/ilWebResourceItemExternalTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceParameterTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceItemsContainerTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceDatabaseRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceItemTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceItemInternalTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WebResource_/test/ilWebResourceItemExternalTest.php"); $suite = new self(); $suite->addTestSuite(ilWebResourceParameterTest::class); diff --git a/components/ILIAS/WebServices_/Curl/classes/class.ilCurlConnectionException.php b/components/ILIAS/WebServices_/Curl/classes/class.ilCurlConnectionException.php index f881f4b5c40f..a10917d2ccca 100644 --- a/components/ILIAS/WebServices_/Curl/classes/class.ilCurlConnectionException.php +++ b/components/ILIAS/WebServices_/Curl/classes/class.ilCurlConnectionException.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once('components/ILIAS/Exceptions_/classes/class.ilException.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exceptions_/classes/class.ilException.php'); /** * diff --git a/components/ILIAS/WebServices_/ECS/classes/Mapping/class.ilECSMappingUtils.php b/components/ILIAS/WebServices_/ECS/classes/Mapping/class.ilECSMappingUtils.php index 4be91c2924fa..fe554677b61b 100644 --- a/components/ILIAS/WebServices_/ECS/classes/Mapping/class.ilECSMappingUtils.php +++ b/components/ILIAS/WebServices_/ECS/classes/Mapping/class.ilECSMappingUtils.php @@ -165,7 +165,7 @@ public static function getCourseValueByMappingAttribute($course, $a_field): arra public static function getRoleMappingInfo($a_role_type_info = 0): array { //KEEP!!! until the defines are turned into proper constants - include_once './components/ILIAS/Membership_/classes/class.ilParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Membership_/classes/class.ilParticipants.php'; $roles = array( ilParticipants::IL_CRS_ADMIN => array( 'role' => ilParticipants::IL_CRS_ADMIN, diff --git a/components/ILIAS/WebServices_/RPC/classes/class.ilRpcClientException.php b/components/ILIAS/WebServices_/RPC/classes/class.ilRpcClientException.php index 06396a38d3a2..1f6ec17e679f 100644 --- a/components/ILIAS/WebServices_/RPC/classes/class.ilRpcClientException.php +++ b/components/ILIAS/WebServices_/RPC/classes/class.ilRpcClientException.php @@ -4,7 +4,7 @@ /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once('components/ILIAS/Exceptions_/classes/class.ilException.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exceptions_/classes/class.ilException.php'); /** * Class ilRpcClientException diff --git a/components/ILIAS/WebServices_/Rest/server.php b/components/ILIAS/WebServices_/Rest/server.php index cdda0b13539c..cce23afd6aae 100644 --- a/components/ILIAS/WebServices_/Rest/server.php +++ b/components/ILIAS/WebServices_/Rest/server.php @@ -4,15 +4,15 @@ chdir('../../../..'); -include_once 'components/ILIAS/Context_/classes/class.ilContext.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Context_/classes/class.ilContext.php'; ilContext::init(ilContext::CONTEXT_REST); $_COOKIE['client_id'] = $_GET['client_id'] = $_REQUEST['client_id']; -include_once './cli/inc.header.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.header.php'; -include_once './components/ILIAS/WebServices_/Rest/classes/class.ilRestServer.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebServices_/Rest/classes/class.ilRestServer.php'; $server = new ilRestServer( [ 'settings' => [ diff --git a/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHookPlugin.php b/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHookPlugin.php index 48f9d01a8e51..0d84d95bc2e5 100644 --- a/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHookPlugin.php +++ b/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHookPlugin.php @@ -1,6 +1,6 @@ @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Wiki_/test/WikiUtilTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Wiki_/test/WikiUtilTest.php"); $suite->addTestSuite("WikiUtilTest"); return $suite; diff --git a/components/ILIAS/WorkspaceFolder_/test/ilComponentsWorkspaceFolderSuite.php b/components/ILIAS/WorkspaceFolder_/test/ilComponentsWorkspaceFolderSuite.php index 8812d0306d0d..3e4b5e8089b2 100644 --- a/components/ILIAS/WorkspaceFolder_/test/ilComponentsWorkspaceFolderSuite.php +++ b/components/ILIAS/WorkspaceFolder_/test/ilComponentsWorkspaceFolderSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Personal workspace test suite @@ -32,7 +32,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/WorkspaceFolder_/test/WorkspaceSessionRepositoryTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WorkspaceFolder_/test/WorkspaceSessionRepositoryTest.php"); $suite->addTestSuite("WorkspaceSessionRepositoryTest"); return $suite; diff --git a/components/ILIAS/WorkspaceRootFolder_/test/ilComponentsWorkspaceRootFolderSuite.php b/components/ILIAS/WorkspaceRootFolder_/test/ilComponentsWorkspaceRootFolderSuite.php index f1bada4788a0..ac78a21d7081 100644 --- a/components/ILIAS/WorkspaceRootFolder_/test/ilComponentsWorkspaceRootFolderSuite.php +++ b/components/ILIAS/WorkspaceRootFolder_/test/ilComponentsWorkspaceRootFolderSuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * Personal workspace test suite @@ -32,7 +32,7 @@ public static function suite() { $suite = new self(); - require_once("./components/ILIAS/WorkspaceRootFolder_/test/WorkspaceRootFolderAccessTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/WorkspaceRootFolder_/test/WorkspaceRootFolderAccessTest.php"); $suite->addTestSuite("WorkspaceRootFolderAccessTest"); return $suite; diff --git a/components/ILIAS/Xml_/test/ilComponentsXmlSuite.php b/components/ILIAS/Xml_/test/ilComponentsXmlSuite.php index 3965813c3c10..b0b33b25010e 100644 --- a/components/ILIAS/Xml_/test/ilComponentsXmlSuite.php +++ b/components/ILIAS/Xml_/test/ilComponentsXmlSuite.php @@ -18,7 +18,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; class ilComponentsXmlSuite extends TestSuite { @@ -26,7 +26,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/Xml_/test/ilServicesXmlTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Xml_/test/ilServicesXmlTest.php"); $suite->addTestSuite("ilServicesXmlTest"); return $suite; diff --git a/components/ILIAS/YUI_/test/ilComponentsYUISuite.php b/components/ILIAS/YUI_/test/ilComponentsYUISuite.php index 6a0c41173d75..91e429d537af 100644 --- a/components/ILIAS/YUI_/test/ilComponentsYUISuite.php +++ b/components/ILIAS/YUI_/test/ilComponentsYUISuite.php @@ -30,7 +30,7 @@ public static function suite(): self { $suite = new self(); /** @noRector */ - require_once("./components/ILIAS/YUI_/test/YUITest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/YUI_/test/YUITest.php"); $suite->addTestSuite("YUITest"); return $suite; diff --git a/components/ILIAS/jQuery_/test/ilComponentsjQuerySuite.php b/components/ILIAS/jQuery_/test/ilComponentsjQuerySuite.php index eaba04f48ec4..98dc010a0d2c 100644 --- a/components/ILIAS/jQuery_/test/ilComponentsjQuerySuite.php +++ b/components/ILIAS/jQuery_/test/ilComponentsjQuerySuite.php @@ -20,7 +20,7 @@ use PHPUnit\Framework\TestSuite; -require_once 'vendor/composer/vendor/autoload.php'; +require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'; /** * @author Alexander Killing @@ -31,7 +31,7 @@ public static function suite(): self { $suite = new self(); - require_once("./components/ILIAS/jQuery_/test/PathTest.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/jQuery_/test/PathTest.php"); $suite->addTestSuite("PathTest"); return $suite; diff --git a/components/ILIAS/setup/cli.php b/components/ILIAS/setup/cli.php index 00593c81cfe9..748c77b3e7c0 100644 --- a/components/ILIAS/setup/cli.php +++ b/components/ILIAS/setup/cli.php @@ -7,7 +7,7 @@ $executed_in_directory = getcwd(); chdir(__DIR__ . "/.."); -require_once(__DIR__ . "/../../../vendor/composer/vendor/autoload.php"); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/vendor/composer/vendor/autoload.php"); require_once(__DIR__ . "/../../../cli/inc.ilias_version.php"); diff --git a/components/ILIAS/soap/classes/class.ilNusoapUserAdministrationAdapter.php b/components/ILIAS/soap/classes/class.ilNusoapUserAdministrationAdapter.php index d891b3bac19e..0a4ee2b79b7b 100644 --- a/components/ILIAS/soap/classes/class.ilNusoapUserAdministrationAdapter.php +++ b/components/ILIAS/soap/classes/class.ilNusoapUserAdministrationAdapter.php @@ -21,7 +21,7 @@ * @version $Id$ * @package ilias */ -require_once('./vendor/composer/vendor/autoload.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/vendor/composer/vendor/autoload.php'); use ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager; use ILIAS\OrgUnit\Webservices\SOAP\AddUserIdToPositionInOrgUnit; @@ -36,10 +36,10 @@ use ILIAS\OrgUnit\Webservices\SOAP\UserIdsOfPosition; use ILIAS\OrgUnit\Webservices\SOAP\UserIdsOfPositionAndOrgUnit; -include_once './components/ILIAS/soaplib/nusoap.php'; -include_once './components/ILIAS/soapinclude/inc.soap_functions.php'; -require_once('./components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHook.php'); -require_once('./components/ILIAS/Init_/classes/class.ilInitialisation.php'); +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapinclude/inc.soap_functions.php'; +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapHook.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'); class ilNusoapUserAdministrationAdapter { diff --git a/components/ILIAS/soap/classes/class.ilObjectXMLException.php b/components/ILIAS/soap/classes/class.ilObjectXMLException.php index a9fccfcedb28..68e1b3cb71b3 100644 --- a/components/ILIAS/soap/classes/class.ilObjectXMLException.php +++ b/components/ILIAS/soap/classes/class.ilObjectXMLException.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once('components/ILIAS/Exceptions_/classes/class.ilException.php'); +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exceptions_/classes/class.ilException.php'); /** * Exception class for ObjectXMLWriter and ObjectXMLParser diff --git a/components/ILIAS/soap/classes/class.ilObjectXMLWriter.php b/components/ILIAS/soap/classes/class.ilObjectXMLWriter.php index 437b46b90b96..56d1023305cb 100644 --- a/components/ILIAS/soap/classes/class.ilObjectXMLWriter.php +++ b/components/ILIAS/soap/classes/class.ilObjectXMLWriter.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once "./components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; /** * XML writer class @@ -218,7 +218,7 @@ private function appendTimeTargets(int $a_ref_id): void if (!$tree->checkForParentType($a_ref_id, 'crs')) { return; } - include_once('./components/ILIAS/Object_/classes/class.ilObjectActivation.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectActivation.php'); $time_targets = ilObjectActivation::getItem($a_ref_id); switch ($time_targets['timing_type']) { @@ -351,7 +351,7 @@ private function getAccessInfo(ilObject $object, int $ref_id): string $ilAccess = $DIC['ilAccess']; - include_once 'components/ILIAS/AccessControl_/classes/class.ilAccess.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilAccess.php'; $ilAccess->checkAccessOfUser($this->getUserId(), 'read', 'view', $ref_id, $object->getType(), $object->getId()); diff --git a/components/ILIAS/soap/classes/class.ilSoapAdministration.php b/components/ILIAS/soap/classes/class.ilSoapAdministration.php index 4e5651bdffba..77834e9d8e57 100644 --- a/components/ILIAS/soap/classes/class.ilSoapAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapAdministration.php @@ -29,8 +29,8 @@ * @author Stefan Meyer */ -include_once './components/ILIAS/soaplib/nusoap.php'; -include_once("./components/ILIAS/Authentication_/classes/class.ilAuthUtils.php"); // to get auth mode constants +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soaplib/nusoap.php'; +include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Authentication_/classes/class.ilAuthUtils.php"); // to get auth mode constants class ilSoapAdministration { @@ -153,7 +153,7 @@ protected function initIlias(): void { if (ilContext::getType() === ilContext::CONTEXT_SOAP) { try { - require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::reinitILIAS(); } catch (Exception $e) { } @@ -162,7 +162,7 @@ protected function initIlias(): void protected function initAuthenticationObject(): void { - include_once './components/ILIAS/Authentication_/classes/class.ilAuthFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthFactory.php'; ilAuthFactory::setContext(ilAuthFactory::CONTEXT_SOAP); } @@ -245,14 +245,14 @@ protected function checkObjectAccess( public function getInstallationInfoXML(): string { - include_once "components/ILIAS/Context_/classes/class.ilContext.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Context_/classes/class.ilContext.php"; ilContext::init(ilContext::CONTEXT_SOAP_WITHOUT_CLIENT); - require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::initILIAS(); $clientdirs = glob(ILIAS_WEB_DIR . "/*", GLOB_ONLYDIR); - require_once("components/ILIAS/soapclasses/class.ilSoapInstallationInfoXMLWriter.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapInstallationInfoXMLWriter.php"); $writer = new ilSoapInstallationInfoXMLWriter(); $writer->start(); if (is_array($clientdirs)) { @@ -269,14 +269,14 @@ public function getInstallationInfoXML(): string */ public function getClientInfoXML(string $clientid) { - include_once "components/ILIAS/Context_/classes/class.ilContext.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Context_/classes/class.ilContext.php"; ilContext::init(ilContext::CONTEXT_SOAP_WITHOUT_CLIENT); - require_once("components/ILIAS/Init_/classes/class.ilInitialisation.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilInitialisation.php"); ilInitialisation::initILIAS(); $clientdir = ILIAS_WEB_DIR . "/" . $clientid; - require_once("components/ILIAS/soapclasses/class.ilSoapInstallationInfoXMLWriter.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapInstallationInfoXMLWriter.php"); $writer = new ilSoapInstallationInfoXMLWriter(); $writer->start(); if (!$writer->addClient($clientdir)) { diff --git a/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php b/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php index b7e3e0fab3c5..53a1952a758e 100644 --- a/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapCourseAdministration.php @@ -27,7 +27,7 @@ * @version $Id$ * @package ilias */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapCourseAdministration extends ilSoapAdministration { @@ -64,7 +64,7 @@ public function addCourse(string $sid, int $target_id, string $crs_xml) return $this->raiseError('Check access failed. No permission to create courses', 'Server'); } - include_once("components/ILIAS/Course_/classes/class.ilObjCourse.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Course_/classes/class.ilObjCourse.php"); $newObj = new ilObjCourse(); $newObj->setType('crs'); @@ -75,7 +75,7 @@ public function addCourse(string $sid, int $target_id, string $crs_xml) $newObj->putInTree($target_id); $newObj->setPermissions($target_id); - include_once 'components/ILIAS/Course_/classes/class.ilCourseXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseXMLParser.php'; $xml_parser = new ilCourseXMLParser($newObj); $xml_parser->setXMLContent($crs_xml); @@ -95,7 +95,7 @@ public function deleteCourse(string $sid, int $course_id) return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once "./components/ILIAS/Utilities_/classes/class.ilUtil.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Utilities_/classes/class.ilUtil.php"; global $DIC; $rbacsystem = $DIC['rbacsystem']; @@ -188,13 +188,13 @@ public function assignCourseMember(string $sid, int $course_id, int $user_id, st return $this->raiseError('Cannot create user instance!', 'Server'); } - include_once 'components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; $course_members = ilCourseParticipants::_getInstanceByObjId($tmp_course->getId()); switch ($type) { case 'Admin': - require_once("components/ILIAS/Administration_/classes/class.ilSetting.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Administration_/classes/class.ilSetting.php"); $settings = new ilSetting(); $course_members->add($tmp_user->getId(), ilParticipants::IL_CRS_ADMIN); $course_members->updateNotification( @@ -253,7 +253,7 @@ public function excludeCourseMember(string $sid, int $course_id, int $user_id) return $this->raiseError('Check access failed. No permission to write to course', 'Server'); } - include_once 'components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; $course_members = ilCourseParticipants::_getInstanceByObjId($tmp_course->getId()); if (!$course_members->checkLastAdmin(array($user_id))) { @@ -303,7 +303,7 @@ public function isAssignedToCourse(string $sid, int $course_id, int $user_id) return $this->raiseError('Check access failed. No permission to write to course', 'Server'); } - include_once './components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; $crs_members = ilCourseParticipants::_getInstanceByObjId($tmp_course->getId()); if ($crs_members->isAdmin($user_id)) { @@ -340,7 +340,7 @@ public function getCourseXML(string $sid, int $course_id) return $tmp_course; } - include_once 'components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; $xml_writer = new ilCourseXMLWriter($tmp_course); $xml_writer->start(); return $xml_writer->getXML(); @@ -383,18 +383,18 @@ public function updateCourse(string $sid, int $course_id, string $xml) } // First delete old meta data - include_once 'components/ILIAS/MetaData_/classes/class.ilMD.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/MetaData_/classes/class.ilMD.php'; $md = new ilMD($tmp_course->getId(), 0, 'crs'); $md->deleteAll(); - include_once 'components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseParticipants.php'; ilCourseParticipants::_deleteAllEntries($tmp_course->getId()); - include_once 'components/ILIAS/Course_/classes/class.ilCourseWaitingList.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseWaitingList.php'; ilCourseWaitingList::_deleteAll($tmp_course->getId()); - include_once 'components/ILIAS/Course_/classes/class.ilCourseXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseXMLParser.php'; $xml_parser = new ilCourseXMLParser($tmp_course); $xml_parser->setXMLContent($xml); @@ -422,7 +422,7 @@ public function getCoursesForUser(string $sid, string $parameters) $ilObjDataCache = $DIC['ilObjDataCache']; $tree = $DIC['tree']; - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSetParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetParser.php'; $parser = new ilXMLResultSetParser($parameters); try { $parser->startParsing(); @@ -507,9 +507,9 @@ public function getCoursesForUser(string $sid, string $parameters) $ref_ids = array_unique($ref_ids); - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; - include_once 'components/ILIAS/Course_/classes/class.ilObjCourse.php'; - include_once 'components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilObjCourse.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("ref_id"); diff --git a/components/ILIAS/soap/classes/class.ilSoapDataCollectionAdministration.php b/components/ILIAS/soap/classes/class.ilSoapDataCollectionAdministration.php index f9d4358b8ed6..b1d8e62ca495 100644 --- a/components/ILIAS/soap/classes/class.ilSoapDataCollectionAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapDataCollectionAdministration.php @@ -20,7 +20,7 @@ | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | +-----------------------------------------------------------------------------+ */ -require_once('./components/ILIAS/soapclasses/class.ilSoapAdministration.php'); +require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'); /** * Soap data-collection administration methods @@ -45,7 +45,7 @@ public function exportDataCollectionContent( return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - require_once "components/ILIAS/DataCollection_/classes/class.ilObjDataCollection.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/DataCollection_/classes/class.ilObjDataCollection.php"; if (!$target_obj = new ilObjDataCollection($target_ref_id)) { return $this->raiseError('No valid target given.', 'CLIENT'); } @@ -65,7 +65,7 @@ public function exportDataCollectionContent( } try { - require_once "components/ILIAS/DataCollection_/classes/Content/class.ilDclContentExporter.php"; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/DataCollection_/classes/Content/class.ilDclContentExporter.php"; $exporter = new ilDclContentExporter($target_ref_id, $table_id); return $exporter->export($format, $filepath); } catch (ilException $exception) { diff --git a/components/ILIAS/soap/classes/class.ilSoapExerciseAdministration.php b/components/ILIAS/soap/classes/class.ilSoapExerciseAdministration.php index bcf140526fb0..700d1e7baf97 100644 --- a/components/ILIAS/soap/classes/class.ilSoapExerciseAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapExerciseAdministration.php @@ -27,7 +27,7 @@ * Soap exercise administration methods * @author Roland Küstermann */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapExerciseAdministration extends ilSoapAdministration { @@ -69,9 +69,9 @@ public function addExercise(string $sid, int $target_id, string $exercise_xml) } // create object, put it into the tree and use the parser to update the settings - include_once './components/ILIAS/Exercise_/classes/class.ilObjExercise.php'; - include_once './components/ILIAS/Exercise_/classes/class.ilExerciseXMLParser.php'; - include_once './components/ILIAS/Exercise_/exceptions/class.ilExerciseException.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/classes/class.ilObjExercise.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/classes/class.ilExerciseXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/exceptions/class.ilExerciseException.php'; $exercise = new ilObjExercise(); $exercise->create(); @@ -154,8 +154,8 @@ public function updateExercise(string $sid, int $requested_ref_id, string $exerc ); } - include_once './components/ILIAS/Exercise_/classes/class.ilExerciseXMLParser.php'; - include_once './components/ILIAS/Exercise_/exceptions/class.ilExerciseException.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/classes/class.ilExerciseXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/exceptions/class.ilExerciseException.php'; $exerciseXMLParser = new ilExerciseXMLParser($exercise, $exercise_xml, $obj_id); try { @@ -237,7 +237,7 @@ public function getExerciseXML(string $sid, int $requested_ref_id, int $attachFi ); } - include_once './components/ILIAS/Exercise_/classes/class.ilExerciseXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Exercise_/classes/class.ilExerciseXMLWriter.php'; $xmlWriter = new ilExerciseXMLWriter(); $xmlWriter->setExercise($exercise); diff --git a/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php b/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php index cb93c2127df9..c08ebc214545 100644 --- a/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapFileAdministration.php @@ -25,7 +25,7 @@ * Soap file administration methods * @author Roland Küstermann */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapFileAdministration extends ilSoapAdministration { @@ -65,9 +65,9 @@ public function addFile(string $sid, int $target_id, string $file_xml) } // create object, put it into the tree and use the parser to update the settings - include_once './components/ILIAS/File_/classes/class.ilFileXMLParser.php'; - include_once './components/ILIAS/File_/classes/class.ilFileException.php'; - include_once './components/ILIAS/File_/classes/class.ilObjFile.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilFileXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilFileException.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilObjFile.php'; $file = new ilObjFile(); try { @@ -155,8 +155,8 @@ public function updateFile(string $sid, int $requested_ref_id, string $file_xml) ); } - include_once './components/ILIAS/File_/classes/class.ilFileXMLParser.php'; - include_once './components/ILIAS/File_/classes/class.ilFileException.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilFileXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilFileException.php'; $fileXMLParser = new ilFileXMLParser($file, $file_xml, $obj_id); try { @@ -236,7 +236,7 @@ public function getFileXML(string $sid, int $requested_ref_id, int $attachFileCo ); } - include_once './components/ILIAS/File_/classes/class.ilFileXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/File_/classes/class.ilFileXMLWriter.php'; $xmlWriter = new ilFileXMLWriter(); $xmlWriter->setFile($file); diff --git a/components/ILIAS/soap/classes/class.ilSoapGLOStructureReader.php b/components/ILIAS/soap/classes/class.ilSoapGLOStructureReader.php index f414423542b7..1cd06b91ed1d 100644 --- a/components/ILIAS/soap/classes/class.ilSoapGLOStructureReader.php +++ b/components/ILIAS/soap/classes/class.ilSoapGLOStructureReader.php @@ -22,8 +22,8 @@ +-----------------------------------------------------------------------------+ */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureReader.php"; -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObjectFactory.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureReader.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObjectFactory.php"; /** * class reading a glossary to transform it into a structure object diff --git a/components/ILIAS/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php b/components/ILIAS/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php index 74c3ea267c30..8219335e8874 100644 --- a/components/ILIAS/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php +++ b/components/ILIAS/soap/classes/class.ilSoapGLOTermDefinitionStructureObject.php @@ -29,7 +29,7 @@ * @package ilias */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; class ilSoapGLOTermDefinitionStructureObject extends ilSoapStructureObject { diff --git a/components/ILIAS/soap/classes/class.ilSoapGLOTermStructureObject.php b/components/ILIAS/soap/classes/class.ilSoapGLOTermStructureObject.php index 60fbe0820211..2685ab26e0a9 100644 --- a/components/ILIAS/soap/classes/class.ilSoapGLOTermStructureObject.php +++ b/components/ILIAS/soap/classes/class.ilSoapGLOTermStructureObject.php @@ -29,7 +29,7 @@ * @package ilias */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; class ilSoapGLOTermStructureObject extends ilSoapStructureObject { diff --git a/components/ILIAS/soap/classes/class.ilSoapGroupAdministration.php b/components/ILIAS/soap/classes/class.ilSoapGroupAdministration.php index e755cb296e19..45376a905f3f 100644 --- a/components/ILIAS/soap/classes/class.ilSoapGroupAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapGroupAdministration.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; /** * Soap grp administration methods @@ -64,8 +64,8 @@ public function addGroup(string $sid, int $target_id, string $grp_xml) $newObj->setDescription(""); $newObj->create(); - include_once("./components/ILIAS/Group_/classes/class.ilObjGroup.php"); - include_once 'components/ILIAS/Group_/classes/class.ilGroupXMLParser.php'; + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/classes/class.ilObjGroup.php"); + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupXMLParser.php'; $xml_parser = new ilGroupXMLParser($newObj, $grp_xml, $target_id); $xml_parser->startParsing(); $new_ref_id = $xml_parser->getObjectRefId(); @@ -93,7 +93,7 @@ public function updateGroup(string $sid, int $ref_id, string $grp_xml) return $this->raiseError('Check access failed. No permission to edit groups', 'Server'); } - include_once("./components/ILIAS/Group_/classes/class.ilObjGroup.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Group_/classes/class.ilObjGroup.php"); /** @var ilObjGroup $grp */ if (!$grp = ilObjectFactory::getInstanceByRefId($ref_id, false)) { @@ -108,7 +108,7 @@ public function updateGroup(string $sid, int $ref_id, string $grp_xml) return $this->raiseError('Reference id does not point to a group!', 'CLIENT_WRONG_TYPE'); } - include_once 'components/ILIAS/Group_/classes/class.ilGroupXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupXMLParser.php'; $xml_parser = new ilGroupXMLParser($grp, $grp_xml, -1); $xml_parser->setMode(ilGroupXMLParser::$UPDATE); $xml_parser->startParsing(); @@ -163,7 +163,7 @@ public function getGroup(string $sid, int $ref_id) ); } - include_once 'components/ILIAS/Group_/classes/class.ilGroupXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupXMLWriter.php'; $xml_writer = new ilGroupXMLWriter($grp_obj); $xml_writer->start(); @@ -222,7 +222,7 @@ public function assignGroupMember(string $sid, int $group_id, int $user_id, stri return $this->raiseError('Cannot create user instance!', 'Server'); } - include_once 'components/ILIAS/Group_/classes/class.ilGroupParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupParticipants.php'; $group_members = ilGroupParticipants::_getInstanceByObjId($tmp_group->getId()); switch ($type) { @@ -321,7 +321,7 @@ public function isAssignedToGroup(string $sid, int $group_id, int $user_id) return $this->raiseError('Check access failed. No permission to read group data', 'Server'); } - include_once('./components/ILIAS/Group_/classes/class.ilGroupParticipants.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupParticipants.php'); $participants = ilGroupParticipants::_getInstanceByObjId(ilObject::_lookupObjId($group_id)); if ($participants->isAdmin($user_id)) { @@ -350,7 +350,7 @@ public function getGroupsForUser(string $sid, string $parameters) $ilObjDataCache = $DIC['ilObjDataCache']; $tree = $DIC['tree']; - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSetParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetParser.php'; $parser = new ilXMLResultSetParser($parameters); try { $parser->startParsing(); @@ -428,9 +428,9 @@ public function getGroupsForUser(string $sid, string $parameters) } $ref_ids = array_unique($ref_ids); - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; - include_once 'components/ILIAS/Group_/classes/class.ilObjGroup.php'; - include_once 'components/ILIAS/Group_/classes/class.ilGroupXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilObjGroup.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Group_/classes/class.ilGroupXMLWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("ref_id"); diff --git a/components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php b/components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php index 119de3edcd7f..9c8a14518664 100644 --- a/components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php +++ b/components/ILIAS/soap/classes/class.ilSoapInstallationInfoXMLWriter.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once "./components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; class ilSoapInstallationInfoXMLWriter extends ilXmlWriter { @@ -64,7 +64,7 @@ private function buildClient(string $client_directory): bool $ini_file = "./" . $client_directory . "/client.ini.php"; // get settings from ini file - require_once("./components/ILIAS/Init_/classes/class.ilIniFile.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Init_/classes/class.ilIniFile.php"); $ilClientIniFile = new ilIniFile($ini_file); $ilClientIniFile->read(); @@ -88,7 +88,7 @@ private function buildClient(string $client_directory): bool unset($DIC['ilDB']); $DIC['ilDB'] = $ilDB; - require_once("components/ILIAS/Administration_/classes/class.ilSetting.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Administration_/classes/class.ilSetting.php"); $settings = new ilSetting(); unset($DIC["ilSetting"]); diff --git a/components/ILIAS/soap/classes/class.ilSoapLMChapterStructureObject.php b/components/ILIAS/soap/classes/class.ilSoapLMChapterStructureObject.php index 4d06f1f35919..9052e4e40286 100644 --- a/components/ILIAS/soap/classes/class.ilSoapLMChapterStructureObject.php +++ b/components/ILIAS/soap/classes/class.ilSoapLMChapterStructureObject.php @@ -29,7 +29,7 @@ * @package ilias */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; class ilSoapLMChapterStructureObject extends ilSoapStructureObject { diff --git a/components/ILIAS/soap/classes/class.ilSoapLMPageStructureObject.php b/components/ILIAS/soap/classes/class.ilSoapLMPageStructureObject.php index 97e5c253c888..1c4833130048 100644 --- a/components/ILIAS/soap/classes/class.ilSoapLMPageStructureObject.php +++ b/components/ILIAS/soap/classes/class.ilSoapLMPageStructureObject.php @@ -29,7 +29,7 @@ * @package ilias */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; class ilSoapLMPageStructureObject extends ilSoapStructureObject { diff --git a/components/ILIAS/soap/classes/class.ilSoapLMStructureReader.php b/components/ILIAS/soap/classes/class.ilSoapLMStructureReader.php index 088418be4527..cb1385f05187 100644 --- a/components/ILIAS/soap/classes/class.ilSoapLMStructureReader.php +++ b/components/ILIAS/soap/classes/class.ilSoapLMStructureReader.php @@ -21,8 +21,8 @@ +-----------------------------------------------------------------------------+ */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureReader.php"; -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObjectFactory.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureReader.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObjectFactory.php"; /** * class for reading a learning module as structure object diff --git a/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php b/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php index 0e69bbc58059..327dc86d1058 100644 --- a/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapLearningProgressAdministration.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; /** * This class handles all DB changes necessary for fraunhofer @@ -61,7 +61,7 @@ public function deleteProgress(string $sid, array $ref_ids, array $usr_ids, arra return $this->raiseError('Invalid filter type given', 'Client'); } - include_once 'components/ILIAS/User_/classes/class.ilObjUser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilObjUser.php'; if (!in_array(self::USER_FILTER_ALL, $usr_ids) && !ilObjUser::userExists($usr_ids)) { return $this->raiseError('Invalid user ids given', 'Client'); } @@ -109,7 +109,7 @@ public function deleteProgress(string $sid, array $ref_ids, array $usr_ids, arra // Delete tracking data foreach ($valid_refs as $ref_id) { - include_once './components/ILIAS/Object_/classes/class.ilObjectFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectFactory.php'; $obj = ilObjectFactory::getInstanceByRefId($ref_id, false); if (!$obj instanceof ilObject) { @@ -121,7 +121,7 @@ public function deleteProgress(string $sid, array $ref_ids, array $usr_ids, arra switch ($obj->getType()) { case 'sahs': - include_once './components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/ScormAicc_/classes/class.ilObjSAHSLearningModule.php'; $subtype = ilObjSAHSLearningModule::_lookupSubType($obj->getId()); switch ($subtype) { @@ -143,7 +143,7 @@ public function deleteProgress(string $sid, array $ref_ids, array $usr_ids, arra } // Refresh status - include_once './components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; ilLPStatusWrapper::_resetInfoCaches($obj->getId()); ilLPStatusWrapper::_refreshStatus($obj->getId(), $valid_users); } @@ -179,7 +179,7 @@ public function getProgressInfo(string $sid, int $a_ref_id, array $a_progress_fi ); } // Check LP enabled - include_once("components/ILIAS/Tracking_/classes/class.ilObjUserTracking.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Tracking_/classes/class.ilObjUserTracking.php"); if (!ilObjUserTracking::_enabledLearningProgress()) { return $this->raiseError( 'Error ' . self::SOAP_LP_ERROR_LP_NOT_ENABLED . ': Learning progress not enabled in ILIAS', @@ -187,7 +187,7 @@ public function getProgressInfo(string $sid, int $a_ref_id, array $a_progress_fi ); } - include_once './components/ILIAS/Object_/classes/class.ilObjectFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectFactory.php'; $obj = ilObjectFactory::getInstanceByRefId($a_ref_id, false); if (!$obj instanceof ilObject) { return $this->raiseError( @@ -197,7 +197,7 @@ public function getProgressInfo(string $sid, int $a_ref_id, array $a_progress_fi } // check lp available - include_once './components/ILIAS/Tracking_/classes/class.ilLPObjSettings.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPObjSettings.php'; $mode = ilLPObjSettings::_lookupDBMode($obj->getId()); if ($mode === ilLPObjSettings::LP_MODE_UNDEFINED) { return $this->raiseError( @@ -222,7 +222,7 @@ public function getProgressInfo(string $sid, int $a_ref_id, array $a_progress_fi ); } - include_once './components/ILIAS/Xml_/classes/class.ilXmlWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Xml_/classes/class.ilXmlWriter.php'; $writer = new ilXmlWriter(); $writer->xmlStartTag( 'LearningProgressInfo', @@ -234,7 +234,7 @@ public function getProgressInfo(string $sid, int $a_ref_id, array $a_progress_fi $writer->xmlStartTag('LearningProgressSummary'); - include_once './components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; if (in_array(self::PROGRESS_FILTER_ALL, $a_progress_filter) || in_array( self::PROGRESS_FILTER_COMPLETED, $a_progress_filter @@ -409,7 +409,7 @@ protected function addUserProgress(ilXmlWriter $writer, array $users, int $a_typ */ protected function applyProgressFilter(int $obj_id, array $usr_ids, array $filter): array { - include_once './components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPStatusWrapper.php'; $all_users = array(); if (in_array(self::USER_FILTER_ALL, $usr_ids)) { @@ -514,7 +514,7 @@ public function getLearningProgressChanges(string $sid, string $timestamp, bool // output lp changes as xml try { - include_once './components/ILIAS/Tracking_/classes/class.ilLPXmlWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPXmlWriter.php'; $writer = new ilLPXmlWriter(true); $writer->setTimestamp($timestamp); $writer->setIncludeRefIds($include_ref_ids); diff --git a/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php b/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php index fa6fea59eb1b..a36950761313 100644 --- a/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapObjectAdministration.php @@ -28,7 +28,7 @@ * @version $Id$ * @package ilias */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapObjectAdministration extends ilSoapAdministration { @@ -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 './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->enablePermissionCheck(true); @@ -206,7 +206,7 @@ public function getObjectsByTitle(string $sid, string $a_title, int $user_id) 'Client' ); } - include_once './components/ILIAS/Search_/classes/class.ilQueryParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilQueryParser.php'; $query_parser = new ilQueryParser($a_title); $query_parser->setMinWordLength(0); $query_parser->setCombination(ilQueryParser::QP_COMBINATION_AND); @@ -218,8 +218,8 @@ public function getObjectsByTitle(string $sid, string $a_title, int $user_id) ); } - include_once './components/ILIAS/Search_/classes/class.ilObjectSearchFactory.php'; - include_once 'components/ILIAS/Search_/classes/Like/class.ilLikeObjectSearch.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilObjectSearchFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Like/class.ilLikeObjectSearch.php'; $object_search = new ilLikeObjectSearch($query_parser); $object_search->setFields(array('title')); $object_search->appendToFilter('role'); @@ -247,7 +247,7 @@ public function getObjectsByTitle(string $sid, string $a_title, int $user_id) return ''; } - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->enablePermissionCheck(true); @@ -282,7 +282,7 @@ public function searchObjects(string $sid, array $types, string $key, string $co } $highlighter = null; - include_once './components/ILIAS/Search_/classes/class.ilSearchSettings.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilSearchSettings.php'; if (ilSearchSettings::getInstance()->enabledLucene()) { ilSearchSettings::getInstance()->setMaxHits(25); @@ -299,16 +299,16 @@ public function searchObjects(string $sid, array $types, string $key, string $co $typeFilterQuery .= ') '; } - include_once './components/ILIAS/Search_/classes/Lucene/class.ilLuceneQueryParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Lucene/class.ilLuceneQueryParser.php'; $query_parser = new ilLuceneQueryParser($typeFilterQuery . $key); $query_parser->parse(); - include_once './components/ILIAS/Search_/classes/Lucene/class.ilLuceneSearcher.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Lucene/class.ilLuceneSearcher.php'; $searcher = ilLuceneSearcher::getInstance($query_parser); $searcher->search(); - include_once './components/ILIAS/Search_/classes/Lucene/class.ilLuceneSearchResultFilter.php'; - include_once './components/ILIAS/Search_/classes/Lucene/class.ilLucenePathFilter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Lucene/class.ilLuceneSearchResultFilter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Lucene/class.ilLucenePathFilter.php'; $filter = ilLuceneSearchResultFilter::getInstance($user_id); $filter->setCandidates($searcher->getResult()); $filter->filter(); @@ -322,13 +322,13 @@ public function searchObjects(string $sid, array $types, string $key, string $co $objs[] = $obj; } } - include_once './components/ILIAS/Search_/classes/Lucene/class.ilLuceneHighlighterResultParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Lucene/class.ilLuceneHighlighterResultParser.php'; $highlighter = new ilLuceneHighlighterResultParser(); if ($filter->getResultObjIds()) { $highlighter = $searcher->highlight($filter->getResultObjIds()); } } else { - include_once './components/ILIAS/Search_/classes/class.ilQueryParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilQueryParser.php'; $query_parser = new ilQueryParser($key); $query_parser->setCombination($combination === 'and' ? ilQueryParser::QP_COMBINATION_AND : ilQueryParser::QP_COMBINATION_OR); @@ -340,7 +340,7 @@ public function searchObjects(string $sid, array $types, string $key, string $co ); } - include_once './components/ILIAS/Search_/classes/Like/class.ilLikeObjectSearch.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/Like/class.ilLikeObjectSearch.php'; $object_search = new ilLikeObjectSearch($query_parser); $object_search->setFilter($types); $res = $object_search->performSearch(); @@ -363,7 +363,7 @@ public function searchObjects(string $sid, array $types, string $key, string $co return ''; } - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); if (ilSearchSettings::getInstance()->enabledLucene()) { $xml_writer->enableReferences(false); @@ -431,7 +431,7 @@ public function getTreeChilds(string $sid, int $ref_id, array $types, int $user_ } } - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->enablePermissionCheck(true); $xml_writer->setObjects($objs); @@ -483,7 +483,7 @@ public function getXMLTree(string $sid, int $ref_id, array $types, int $user_id) } } - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->enablePermissionCheck(true); $xml_writer->setObjects($nodes); @@ -553,7 +553,7 @@ public function addObject(string $sid, int $a_target_id, string $a_xml) } } - include_once './components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; $xml_parser = new ilObjectXMLParser($a_xml, true); try { @@ -756,16 +756,16 @@ public function addReference(string $sid, int $a_source_id, int $a_target_id) $new_ref = null; switch ($source_obj->getType()) { case 'cat': - include_once('./components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CategoryReference_/classes/class.ilObjCategoryReference.php'); $new_ref = new ilObjCategoryReference(); break; case 'crs': - include_once('./components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CourseReference_/classes/class.ilObjCourseReference.php'); $new_ref = new ilObjCourseReference(); break; case 'grp': - include_once('./components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/GroupReference_/classes/class.ilObjGroupReference.php'); $new_ref = new ilObjGroupReference(); break; } @@ -930,7 +930,7 @@ public function updateObjects(string $sid, string $a_xml) $ilAccess = $DIC['ilAccess']; $objDefinition = $DIC['objDefinition']; - include_once './components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; $xml_parser = new ilObjectXMLParser($a_xml, true); try { $xml_parser->startParsing(); @@ -1048,7 +1048,7 @@ public function moveObject(string $sid, int $ref_id, int $target_id) return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; global $DIC; $rbacreview = $DIC['rbacreview']; @@ -1116,7 +1116,7 @@ public function copyObject(string $sid, string $copy_settings_xml) return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; global $DIC; $rbacreview = $DIC['rbacreview']; @@ -1125,7 +1125,7 @@ public function copyObject(string $sid, string $copy_settings_xml) $lng = $DIC['lng']; $ilUser = $DIC['ilUser']; - include_once './components/ILIAS/soapclasses/class.ilCopyWizardSettingsXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilCopyWizardSettingsXMLParser.php'; $xml_parser = new ilCopyWizardSettingsXMLParser($copy_settings_xml); try { $xml_parser->startParsing(); @@ -1231,9 +1231,9 @@ public function getPathForRefId(string $sid, int $ref_id) $lng = $DIC['lng']; $items = $tree->getPathFull($ref_id); - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSet.php'; - include_once 'components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; - include_once 'components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSet.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Course_/classes/class.ilCourseXMLWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("ref_id"); @@ -1370,8 +1370,8 @@ private function updateReferences(array $a_object_data): void foreach ($a_object_data['references'] as $ref_data) { if (isset($ref_data['time_target'])) { - include_once('./components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'); - include_once('./components/ILIAS/Object_/classes/class.ilObjectActivation.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectActivation.php'); $old = ilObjectActivation::getItem($ref_data['ref_id']); $items = new ilObjectActivation(); @@ -1425,8 +1425,8 @@ 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('./components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'); - include_once('./components/ILIAS/Object_/classes/class.ilObjectActivation.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectActivation.php'); if (!isset($ref_data['time_target']['starting_time'])) { $ref_data['time_target']['starting_time'] = time(); diff --git a/components/ILIAS/soap/classes/class.ilSoapRBACAdministration.php b/components/ILIAS/soap/classes/class.ilSoapRBACAdministration.php index 3c29cb978061..d95d6044a9f2 100644 --- a/components/ILIAS/soap/classes/class.ilSoapRBACAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapRBACAdministration.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; /** * Soap rbac administration methods @@ -321,7 +321,7 @@ public function getLocalRoles(string $sid, int $ref_id) } } if (count($objs)) { - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->setObjects($objs); @@ -362,7 +362,7 @@ public function getUserRoles(string $sid, int $user_id) } } if (count($objs)) { - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; $xml_writer = new ilObjectXMLWriter(); $xml_writer->setObjects($objs); @@ -407,7 +407,7 @@ public function addRole(string $sid, int $target_id, string $role_xml) return $this->raiseError('Check access failed. No permission to create roles', 'Server'); } - include_once 'components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; $xml_parser = new ilObjectXMLParser($role_xml); $xml_parser->startParsing(); @@ -421,7 +421,7 @@ public function addRole(string $sid, int $target_id, string $role_xml) ); } - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; $role = new ilObjRole(); $role->setTitle($object_data['title']); $role->setDescription($object_data['description']); @@ -475,7 +475,7 @@ public function addRoleFromTemplate(string $sid, int $target_id, string $role_xm return $this->raiseError('Check access failed. No permission to create roles', 'Server'); } - include_once 'components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLParser.php'; $xml_parser = new ilObjectXMLParser($role_xml); $xml_parser->startParsing(); @@ -489,7 +489,7 @@ public function addRoleFromTemplate(string $sid, int $target_id, string $role_xm ); } - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; $role = new ilObjRole(); $role->setTitle($object_data['title']); $role->setDescription($object_data['description']); @@ -678,7 +678,7 @@ public function getRoles(string $sid, string $role_type, int $id) } } - include_once './components/ILIAS/soapclasses/class.ilSoapRoleObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRoleObjectXMLWriter.php'; $xml_writer = new ilSoapRoleObjectXMLWriter(); $xml_writer->setObjects($roles); @@ -727,7 +727,7 @@ public function searchRoles(string $sid, string $key, string $combination, strin ); } - include_once './components/ILIAS/Search_/classes/class.ilQueryParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilQueryParser.php'; $query_parser = new ilQueryParser($key); $query_parser->setMinWordLength(3); @@ -737,7 +737,7 @@ public function searchRoles(string $sid, string $key, string $combination, strin return $this->raiseError($query_parser->getMessage(), 'Client'); } - include_once './components/ILIAS/Search_/classes/class.ilObjectSearchFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Search_/classes/class.ilObjectSearchFactory.php'; $object_search = ilObjectSearchFactory::_getObjectSearchInstance($query_parser); $object_search->setFilter(array("role", "rolt")); @@ -755,7 +755,7 @@ public function searchRoles(string $sid, string $key, string $combination, strin $roles = $rbacreview->getRolesForIDs($obj_ids, $role_type === "template"); } - include_once './components/ILIAS/soapclasses/class.ilSoapRoleObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRoleObjectXMLWriter.php'; $xml_writer = new ilSoapRoleObjectXMLWriter(); $xml_writer->setObjects($roles); $xml_writer->setType($role_type); diff --git a/components/ILIAS/soap/classes/class.ilSoapRepositoryStructureObject.php b/components/ILIAS/soap/classes/class.ilSoapRepositoryStructureObject.php index 124830f601f4..6cb4757bed1b 100644 --- a/components/ILIAS/soap/classes/class.ilSoapRepositoryStructureObject.php +++ b/components/ILIAS/soap/classes/class.ilSoapRepositoryStructureObject.php @@ -29,7 +29,7 @@ * @package ilias */ -include_once "./components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapStructureObject.php"; class ilSoapRepositoryStructureObject extends ilSoapStructureObject { diff --git a/components/ILIAS/soap/classes/class.ilSoapRoleObjectXMLWriter.php b/components/ILIAS/soap/classes/class.ilSoapRoleObjectXMLWriter.php index dd0218e76eb4..831723ac7ba3 100644 --- a/components/ILIAS/soap/classes/class.ilSoapRoleObjectXMLWriter.php +++ b/components/ILIAS/soap/classes/class.ilSoapRoleObjectXMLWriter.php @@ -48,8 +48,8 @@ public function start(): bool $this->buildHeader(); - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; - include_once './components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilObjectXMLWriter.php'; foreach ($this->roles as $role) { // if role type is not empty and does not match, then continue; diff --git a/components/ILIAS/soap/classes/class.ilSoapSCORMAdministration.php b/components/ILIAS/soap/classes/class.ilSoapSCORMAdministration.php index f8a2e3b3c166..75698ddf8a73 100644 --- a/components/ILIAS/soap/classes/class.ilSoapSCORMAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapSCORMAdministration.php @@ -27,7 +27,7 @@ * @version $Id: class.ilSoapExerciseAdministration.php 12992 2007-01-25 10:04:26Z rkuester $ * @package ilias */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapSCORMAdministration extends ilSoapAdministration { @@ -88,8 +88,8 @@ public function getIMSManifestXML(string $sid, int $requested_ref_id) ); } - require_once("./components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMObject.php"); - require_once("./components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMResource.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMObject.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/ScormAicc_/classes/SCORM/class.ilSCORMResource.php"); $imsFilename = $lm_obj->getDataDirectory() . DIRECTORY_SEPARATOR . "imsmanifest.xml"; @@ -157,7 +157,7 @@ public function getSCORMCompletionStatus(string $sid, int $a_usr_id, int $a_ref_ return $this->raiseError('No ref_id given. Aborting!', 'Client'); } - include_once 'cli/inc.header.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/cli/inc.header.php'; if (!$obj_id = ilObject::_lookupObjectId($a_ref_id)) { return $this->raiseError( @@ -166,8 +166,8 @@ public function getSCORMCompletionStatus(string $sid, int $a_usr_id, int $a_ref_ ); } - include_once 'components/ILIAS/Tracking_/classes/class.ilLPStatus.php'; - include_once 'components/ILIAS/Tracking_/classes/class.ilObjUserTracking.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilLPStatus.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Tracking_/classes/class.ilObjUserTracking.php'; if (!ilObjUserTracking::_enabledLearningProgress()) { return $this->raiseError('Learning progress not enabled in this installation. Aborting!', 'Server'); diff --git a/components/ILIAS/soap/classes/class.ilSoapStructureObjectAdministration.php b/components/ILIAS/soap/classes/class.ilSoapStructureObjectAdministration.php index 5148f2e0153f..23b8bd288bb0 100644 --- a/components/ILIAS/soap/classes/class.ilSoapStructureObjectAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapStructureObjectAdministration.php @@ -21,7 +21,7 @@ +-----------------------------------------------------------------------------+ */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; /** * administration for structure objects @@ -54,7 +54,7 @@ public function getStructureObjects(string $sid, int $ref_id) include_once $filename; $structureReader = new $structureReaderClassname($target_obj); - include_once './components/ILIAS/soapclasses/class.ilSoapStructureObjectXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapStructureObjectXMLWriter.php'; $xml_writer = new ilSoapStructureObjectXMLWriter(); $structureObject = &$structureReader->getStructureObject(); $xml_writer->setStructureObject($structureObject); diff --git a/components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php b/components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php index 94d7a529403b..b69f4706a52e 100644 --- a/components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php +++ b/components/ILIAS/soap/classes/class.ilSoapStructureObjectFactory.php @@ -69,19 +69,19 @@ public function _getClassnameForType(string $type): ?string switch ($type) { case "glo": case "lm": - include_once "./components/ILIAS/soapclasses/class.ilSoapRepositoryStructureObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapRepositoryStructureObject.php"; return "ilSoapRepositoryStructureObject"; case "st": - include_once "./components/ILIAS/soapclasses/class.ilSoapLMChapterStructureObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapLMChapterStructureObject.php"; return "ilSoapLMChapterStructureObject"; case "pg": - include_once "./components/ILIAS/soapclasses/class.ilSoapLMPageStructureObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapLMPageStructureObject.php"; return "ilSoapLMPageStructureObject"; case "git": - include_once "./components/ILIAS/soapclasses/class.ilSoapGLOTermStructureObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapGLOTermStructureObject.php"; return "ilSoapGLOTermStructureObject"; case "term": - include_once "./components/ILIAS/soapclasses/class.ilSoapGLOTermDefinitionStructureObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/soapclasses/class.ilSoapGLOTermDefinitionStructureObject.php"; return "ilSoapGLOTermDefinitionStructureObject"; } diff --git a/components/ILIAS/soap/classes/class.ilSoapStructureObjectXMLWriter.php b/components/ILIAS/soap/classes/class.ilSoapStructureObjectXMLWriter.php index 81883fe40a08..76160d5c65e0 100644 --- a/components/ILIAS/soap/classes/class.ilSoapStructureObjectXMLWriter.php +++ b/components/ILIAS/soap/classes/class.ilSoapStructureObjectXMLWriter.php @@ -2,7 +2,7 @@ /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */ -include_once "./components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Xml_/classes/class.ilXmlWriter.php"; /** * XML writer class diff --git a/components/ILIAS/soap/classes/class.ilSoapStructureReader.php b/components/ILIAS/soap/classes/class.ilSoapStructureReader.php index 0c311fb1bf13..8ef9d58b084c 100644 --- a/components/ILIAS/soap/classes/class.ilSoapStructureReader.php +++ b/components/ILIAS/soap/classes/class.ilSoapStructureReader.php @@ -1,6 +1,6 @@ setQuestionId($question_id); $processLockerFactory->setUserId($ilUser->getId()); - include_once("./components/ILIAS/Test_/classes/class.ilObjAssessmentFolder.php"); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/class.ilObjAssessmentFolder.php"); $processLockerFactory->setAssessmentLogEnabled(ilObjAssessmentFolder::_enabledAssessmentLogging()); $processLocker = $processLockerFactory->getLocker(); @@ -178,7 +178,7 @@ public function saveQuestion(string $sid, int $active_id, int $question_id, int }); if ($totalrows !== 0) { - include_once "./components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php"; $question = assQuestion::instantiateQuestion($question_id); $question->setProcessLocker($processLocker); $question->calculateResultsFromSolution($active_id, $pass); @@ -264,7 +264,7 @@ public function saveQuestionSolution(string $sid, int $active_id, int $question_ return $this->raiseError("Wrong solution data. ILIAS did not execute any database queries", ''); } - include_once "./components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/TestQuestionPool_/classes/class.assQuestion.php"; $question = assQuestion::instantiateQuestion($question_id); $question->calculateResultsFromSolution($active_id, $pass); return "TRUE"; @@ -433,7 +433,7 @@ public function getPositionOfQuestion(string $sid, int $active_id, int $question $row = $ilDB->fetchAssoc($result); $is_random = $row["random_test"]; - include_once "./components/ILIAS/Test_/classes/class.ilTestSequence.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/class.ilTestSequence.php"; $sequence = new ilTestSequence($active_id, $pass, $is_random); return $sequence->getSequenceForQuestion($question_id); } @@ -469,7 +469,7 @@ public function getPreviousReachedPoints(string $sid, int $active_id, int $quest $row = $ilDB->fetchAssoc($result); $is_random = $row["random_test"]; - include_once "./components/ILIAS/Test_/classes/class.ilTestSequence.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/class.ilTestSequence.php"; $sequence = new ilTestSequence($active_id, $pass, $is_random); $result = $ilDB->queryF( "SELECT question_fi, points FROM tst_test_result WHERE active_fi = %s AND pass = %s", @@ -526,7 +526,7 @@ public function getNrOfQuestionsInPass(string $sid, int $active_id, int $pass) $row = $ilDB->fetchAssoc($result); $is_random = $row["random_test"]; - include_once "./components/ILIAS/Test_/classes/class.ilTestSequence.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/Test_/classes/class.ilTestSequence.php"; $sequence = new ilTestSequence($active_id, $pass, $is_random); return $sequence->getUserQuestionCount(); } @@ -580,9 +580,9 @@ public function removeTestResults(string $sid, int $test_ref_id, array $a_user_i $a_user_ids = $a_user_ids['item']; } - include_once './components/ILIAS/Test_/classes/class.ilObjTest.php'; - include_once './components/ILIAS/Test_/classes/class.ilTestParticipantData.php'; - require_once 'components/ILIAS/Test_/classes/class.ilTestParticipantAccessFilter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilObjTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilTestParticipantData.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilTestParticipantAccessFilter.php'; $part = new ilTestParticipantData($GLOBALS['DIC']['ilDB'], $GLOBALS['DIC']['lng']); $part->setParticipantAccessFilter( ilTestParticipantAccessFilter::getManageParticipantsUserFilter($test_ref_id) @@ -649,8 +649,8 @@ public function getTestResults(string $sid, int $test_ref_id, bool $sum_only) ); } - include_once './components/ILIAS/soapclasses/class.ilXMLResultSet.php'; - include_once './components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSet.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("user_id"); @@ -659,12 +659,12 @@ public function getTestResults(string $sid, int $test_ref_id, bool $sum_only) $xmlResultSet->addColumn("lastname"); $xmlResultSet->addColumn("matriculation"); - include_once './components/ILIAS/Test_/classes/class.ilObjTest.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilObjTest.php'; $test_obj = new ilObjTest($obj_id, false); $participants = $test_obj->getTestParticipants(); - require_once 'components/ILIAS/Test_/classes/class.ilTestParticipantAccessFilter.php'; - require_once 'components/ILIAS/Test_/classes/class.ilTestParticipantList.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilTestParticipantAccessFilter.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilTestParticipantList.php'; $accessFilter = ilTestParticipantAccessFilter::getAccessResultsUserFilter($test_ref_id); $participantList = new ilTestParticipantList($test_obj); $participantList->initializeFromDbRows($participants); @@ -740,7 +740,7 @@ protected function checkParticipantsResultsAccess(int $refId): bool protected function getTestAccess(int $refId): ilTestAccess { - require_once 'components/ILIAS/Test_/classes/class.ilTestAccess.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Test_/classes/class.ilTestAccess.php'; $testId = ilObjTestAccess::_getTestIDFromObjectID(ilObject::_lookupObjectId($refId)); return new ilTestAccess($refId, $testId); diff --git a/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php b/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php index aeeb4c679a7c..3beaa58355bd 100644 --- a/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapUserAdministration.php @@ -27,7 +27,7 @@ * @version $Id$ * @package ilias */ -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapUserAdministration extends ilSoapAdministration { @@ -48,19 +48,19 @@ public function login(string $client, string $username, string $password) } // now try authentication - include_once './components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendCredentials.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendCredentials.php'; $credentials = new ilAuthFrontendCredentials(); $credentials->setUsername($username); $credentials->setPassword($password); - include_once './components/ILIAS/Authentication_/classes/Provider/class.ilAuthProviderFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Provider/class.ilAuthProviderFactory.php'; $provider_factory = new ilAuthProviderFactory(); $providers = $provider_factory->getProviders($credentials); - include_once './components/ILIAS/Authentication_/classes/class.ilAuthStatus.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilAuthStatus.php'; $status = ilAuthStatus::getInstance(); - include_once './components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/Frontend/class.ilAuthFrontendFactory.php'; $frontend_factory = new ilAuthFrontendFactory(); $frontend_factory->setContext(ilAuthFrontendFactory::CONTEXT_CLI); $frontend = $frontend_factory->getFrontend( @@ -98,7 +98,7 @@ public function logout(string $sid) return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once './components/ILIAS/Authentication_/classes/class.ilSession.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Authentication_/classes/class.ilSession.php'; ilSession::setClosingContext(ilSession::SESSION_CLOSE_USER); $GLOBALS['DIC']['ilAuthSession']->logout(); return true; @@ -155,9 +155,9 @@ public function importUsers(string $sid, int $folder_id, string $usr_xml, int $c return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once './components/ILIAS/User_/classes/class.ilUserImportParser.php'; - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; - include_once './components/ILIAS/Object_/classes/class.ilObjectFactory.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserImportParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Object_/classes/class.ilObjectFactory.php'; global $DIC; $rbacreview = $DIC['rbacreview']; @@ -365,7 +365,7 @@ protected function isPermittedRole(int $a_folder, int $a_role) if ($a_folder !== self::USER_FOLDER_ID && $a_folder !== 0) { $ilLog->write(__METHOD__ . ': ' . $a_folder); - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; if (!ilObjRole::_getAssignUsersStatus($a_role)) { $ilLog->write(__METHOD__ . ': No assignment allowed'); $checked_roles[$a_role] = false; @@ -493,14 +493,14 @@ public function getUsersForContainer(string $sid, int $ref_id, bool $attachRoles } $event_obj_id = ilObject::_lookupObjId($ref_id); - include_once 'components/ILIAS/Session_/classes/class.ilEventParticipants.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Session_/classes/class.ilEventParticipants.php'; $event_part = new ilEventParticipants($event_obj_id); $member_ids = array_keys($event_part->getParticipants()); $data = ilObjUser::_getUsersForIds($member_ids, $active); break; } - include_once './components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; $xmlWriter = new ilUserXMLWriter(); $xmlWriter->setObjects($data); @@ -525,7 +525,7 @@ public function getUserForRole(string $sid, int $role_id, bool $attachRoles, int return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once './components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/AccessControl_/classes/class.ilObjRole.php'; global $DIC; $ilDB = $DIC['ilDB']; @@ -575,7 +575,7 @@ public function getUserForRole(string $sid, int $role_id, bool $attachRoles, int } $data = ilObjUser::_getUsersForRole($role_id, $active); - include_once './components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; $xmlWriter = new ilUserXMLWriter(); $xmlWriter->setAttachRoles($attachRoles); @@ -593,8 +593,8 @@ public function getUserForRole(string $sid, int $role_id, bool $attachRoles, int **/ private function getImportProtocolAsXML(array $a_array): string { - include_once './components/ILIAS/soapclasses/class.ilXMLResultSet.php'; - include_once './components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSet.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("userid"); @@ -629,8 +629,8 @@ private function getImportProtocolAsXML(array $a_array): string */ private function getUserMappingAsXML(array $a_array) { - include_once './components/ILIAS/soapclasses/class.ilXMLResultSet.php'; - include_once './components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSet.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetWriter.php'; $xmlResultSet = new ilXMLResultSet(); $xmlResultSet->addColumn("userid"); @@ -730,7 +730,7 @@ public function searchUser( $data[] = $row; } - include_once './components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; $xmlWriter = new ilUserXMLWriter(); $xmlWriter->setAttachRoles($attach_roles); @@ -819,7 +819,7 @@ public function getUserXML(string $sid, array $a_user_ids, bool $attach_roles) $data = ilObjUser::_getUserData($a_user_ids); - include_once './components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/User_/classes/class.ilUserXMLWriter.php'; $xmlWriter = new ilUserXMLWriter(); $xmlWriter->setAttachRoles($attach_roles); $xmlWriter->setObjects($data); diff --git a/components/ILIAS/soap/classes/class.ilSoapUserAdministrationAdapter.php b/components/ILIAS/soap/classes/class.ilSoapUserAdministrationAdapter.php index 66a808c4a79e..b45f5f972b5e 100644 --- a/components/ILIAS/soap/classes/class.ilSoapUserAdministrationAdapter.php +++ b/components/ILIAS/soap/classes/class.ilSoapUserAdministrationAdapter.php @@ -46,7 +46,7 @@ public function start(): void private function registerMethods(): void { - include_once './components/ILIAS/soapinclude/inc.soap_functions.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapinclude/inc.soap_functions.php'; $this->server->addFunction(SOAP_FUNCTIONS_ALL); } diff --git a/components/ILIAS/soap/classes/class.ilSoapUtils.php b/components/ILIAS/soap/classes/class.ilSoapUtils.php index 480ef37a717a..e81e99eaf4b3 100644 --- a/components/ILIAS/soap/classes/class.ilSoapUtils.php +++ b/components/ILIAS/soap/classes/class.ilSoapUtils.php @@ -25,7 +25,7 @@ use ilias\components\ILIAS\RemoteWiki_\Registration_\classes\ilRegistrationSettings; -include_once './components/ILIAS/soapclasses/class.ilSoapAdministration.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; class ilSoapUtils extends ilSoapAdministration { @@ -51,7 +51,7 @@ public function saveTempFileAsMediaObject(string $sid, string $name, string $tmp return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once "./components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"; return ilObjMediaObject::_saveTempFileAsMediaObject($name, $tmp_name); } @@ -67,7 +67,7 @@ public function getMobsOfObject(string $sid, string $a_type, int $a_id) return $this->raiseError($this->getMessage(), $this->getMessageCode()); } - include_once "./components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/MediaObjects_/classes/class.ilObjMediaObject.php"; return ilObjMediaObject::_getMobsOfObject($a_type, $a_id); } @@ -90,7 +90,7 @@ public function ilCloneDependencies(string $sid, int $copy_identifier, bool $is_ $ilLog = $DIC['ilLog']; $ilUser = $DIC['ilUser']; - include_once('components/ILIAS/CopyWizard_/classes/class.ilCopyWizardOptions.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CopyWizard_/classes/class.ilCopyWizardOptions.php'); $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier); // Check owner of copy procedure @@ -151,7 +151,7 @@ public function ilClone(string $sid, int $copy_identifier) $ilUser = $DIC->user(); - include_once('components/ILIAS/CopyWizard_/classes/class.ilCopyWizardOptions.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/CopyWizard_/classes/class.ilCopyWizardOptions.php'); $cp_options = ilCopyWizardOptions::_getInstance($copy_identifier); // Check owner of copy procedure @@ -263,7 +263,7 @@ private function callNextNode(string $sid, ilCopyWizardOptions $cp_options): voi $cp_options->dropFirstNode(); if ($cp_options->isSOAPEnabled()) { // Start next soap call - include_once 'components/ILIAS/WebServices_/SOAP/classes/class.ilSoapClient.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapClient.php'; $soap_client = new ilSoapClient(); $soap_client->setResponseTimeout(1); $soap_client->enableWSDL(true); @@ -272,7 +272,7 @@ private function callNextNode(string $sid, ilCopyWizardOptions $cp_options): voi } else { ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually'); $cp_options->read(); - include_once('./components/ILIAS/soapinclude/inc.soap_functions.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapinclude/inc.soap_functions.php'); $res = ilSoapFunctions::ilClone($sid, $cp_options->getCopyId()); } } @@ -283,7 +283,7 @@ private function callNextDependency(string $sid, ilCopyWizardOptions $cp_options if ($cp_options->isSOAPEnabled()) { // Start next soap call - include_once 'components/ILIAS/WebServices_/SOAP/classes/class.ilSoapClient.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebServices_/SOAP/classes/class.ilSoapClient.php'; $soap_client = new ilSoapClient(); $soap_client->setResponseTimeout(1); $soap_client->enableWSDL(true); @@ -292,7 +292,7 @@ private function callNextDependency(string $sid, ilCopyWizardOptions $cp_options } else { ilLoggerFactory::getLogger('obj')->warning('SOAP clone call failed. Calling clone method manually'); $cp_options->read(); - include_once('./components/ILIAS/soapinclude/inc.soap_functions.php'); + include_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapinclude/inc.soap_functions.php'); $res = ilSoapFunctions::ilCloneDependencies($sid, $cp_options->getCopyId()); } } @@ -334,7 +334,7 @@ private function cloneNode(array $node, ilCopyWizardOptions $cp_options): int } // rbac log - include_once "components/ILIAS/AccessControl_/classes/class.ilRbacLog.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/classes/class.ilRbacLog.php"; $rbac_log_roles = $rbacreview->getParentRoleIds($new_obj->getRefId(), false); $rbac_log = ilRbacLog::gatherFaPa($new_obj->getRefId(), array_keys($rbac_log_roles), true); ilRbacLog::add(ilRbacLog::COPY_OBJECT, $new_obj->getRefId(), $rbac_log, true); @@ -449,7 +449,7 @@ private function linkNode(array $node, ilCopyWizardOptions $cp_options): int } // rbac log - include_once "components/ILIAS/AccessControl_/classes/class.ilRbacLog.php"; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/AccessControl_/classes/class.ilRbacLog.php"; $rbac_log_roles = $rbacreview->getParentRoleIds($new_ref_id, false); $rbac_log = ilRbacLog::gatherFaPa($new_ref_id, array_keys($rbac_log_roles), true); ilRbacLog::add(ilRbacLog::LINK_OBJECT, $new_ref_id, $rbac_log, true); @@ -476,7 +476,7 @@ public function deleteExpiredDualOptInUserObjects(string $sid, int $usr_id): boo $ilLog = $DIC->logger()->user(); $ilLog->debug('Started deletion of inactive user objects with expired confirmation hash values (dual opt in) ...'); - require_once 'components/ILIAS/Registration_/classes/class.ilRegistrationSettings.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Registration_/classes/class.ilRegistrationSettings.php'; $oRegSettigs = new ilRegistrationSettings(); $query = ''; diff --git a/components/ILIAS/soap/classes/class.ilSoapWebLinkAdministration.php b/components/ILIAS/soap/classes/class.ilSoapWebLinkAdministration.php index 1628de295521..64b600174c10 100644 --- a/components/ILIAS/soap/classes/class.ilSoapWebLinkAdministration.php +++ b/components/ILIAS/soap/classes/class.ilSoapWebLinkAdministration.php @@ -72,7 +72,7 @@ public function readWebLink(string $sid, int $request_ref_id) } try { - include_once './components/ILIAS/WebResource_/classes/class.ilWebLinkXmlWriter.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebResource_/classes/class.ilWebLinkXmlWriter.php'; $writer = new ilWebLinkXmlWriter(true); $writer->setObjId($obj_id); $writer->write(); @@ -123,8 +123,8 @@ public function createWebLink(string $sid, int $target_id, string $weblink_xml) } // create object, put it into the tree and use the parser to update the settings - include_once './components/ILIAS/WebResource_/classes/class.ilObjLinkResource.php'; - include_once './components/ILIAS/WebResource_/classes/class.ilWebLinkXmlParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebResource_/classes/class.ilObjLinkResource.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebResource_/classes/class.ilWebLinkXmlParser.php'; $webl = new ilObjLinkResource(); $webl->setTitle('XML Import'); @@ -201,7 +201,7 @@ public function updateWebLink(string $sid, int $request_ref_id, string $weblink_ } try { - include_once './components/ILIAS/WebResource_/classes/class.ilWebLinkXmlParser.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/WebResource_/classes/class.ilWebLinkXmlParser.php'; /** @noinspection PhpParamsInspection */ $parser = new ilWebLinkXmlParser($webl, $weblink_xml); $parser->setMode(ilWebLinkXmlParser::MODE_UPDATE); diff --git a/components/ILIAS/soap/classes/class.ilXMLResultSet.php b/components/ILIAS/soap/classes/class.ilXMLResultSet.php index 2637d8c16a62..1440049123a0 100644 --- a/components/ILIAS/soap/classes/class.ilXMLResultSet.php +++ b/components/ILIAS/soap/classes/class.ilXMLResultSet.php @@ -24,8 +24,8 @@ +-----------------------------------------------------------------------------+ */ -include_once './components/ILIAS/soapclasses/class.ilXMLResultSetColumn.php'; -include_once './components/ILIAS/soapclasses/class.ilXMLResultSetRow.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetColumn.php'; +include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilXMLResultSetRow.php'; /** * Class to handle XML ResultSets diff --git a/components/ILIAS/soap/include/inc.soap_functions.php b/components/ILIAS/soap/include/inc.soap_functions.php index 2fa3c0f4929a..1a91f8794855 100644 --- a/components/ILIAS/soap/include/inc.soap_functions.php +++ b/components/ILIAS/soap/include/inc.soap_functions.php @@ -45,7 +45,7 @@ class ilSoapFunctions */ public static function login(string $client, string $username, string $password) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->login($client, $username, $password); } @@ -55,7 +55,7 @@ public static function login(string $client, string $username, string $password) */ public static function logout(string $sid) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->logout($sid); } @@ -65,7 +65,7 @@ public static function logout(string $sid) */ public static function lookupUser(string $sid, string $user_name) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->lookupUser($sid, $user_name); } @@ -75,7 +75,7 @@ public static function lookupUser(string $sid, string $user_name) */ public static function addCourse(string $sid, int $target_id, string $crs_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->addCourse($sid, $target_id, $crs_xml); } @@ -85,7 +85,7 @@ public static function addCourse(string $sid, int $target_id, string $crs_xml) */ public static function deleteCourse(string $sid, int $course_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->deleteCourse($sid, $course_id); } @@ -95,7 +95,7 @@ public static function deleteCourse(string $sid, int $course_id) */ public static function assignCourseMember(string $sid, int $course_id, int $user_id, string $type) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->assignCourseMember($sid, $course_id, $user_id, $type); } @@ -105,7 +105,7 @@ public static function assignCourseMember(string $sid, int $course_id, int $user */ public static function isAssignedToCourse(string $sid, int $course_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->isAssignedToCourse($sid, $course_id, $user_id); } @@ -115,7 +115,7 @@ public static function isAssignedToCourse(string $sid, int $course_id, int $user */ public static function excludeCourseMember(string $sid, int $course_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->excludeCourseMember($sid, $course_id, $user_id); } @@ -125,7 +125,7 @@ public static function excludeCourseMember(string $sid, int $course_id, int $use */ public static function getCourseXML(string $sid, int $course_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->getCourseXML($sid, $course_id); } @@ -135,7 +135,7 @@ public static function getCourseXML(string $sid, int $course_id) */ public static function updateCourse(string $sid, int $course_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $sca = new ilSoapCourseAdministration(); return $sca->updateCourse($sid, $course_id, $xml); } @@ -145,7 +145,7 @@ public static function updateCourse(string $sid, int $course_id, string $xml) */ public static function getObjIdByImportId(string $sid, string $import_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getObjIdByImportId($sid, $import_id); } @@ -155,7 +155,7 @@ public static function getObjIdByImportId(string $sid, string $import_id) */ public static function getRefIdsByImportId(string $sid, string $import_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getRefIdsByImportId($sid, $import_id); } @@ -165,7 +165,7 @@ public static function getRefIdsByImportId(string $sid, string $import_id) */ public static function getRefIdsByObjId(string $sid, int $object_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getRefIdsByObjId($sid, $object_id); } @@ -175,7 +175,7 @@ public static function getRefIdsByObjId(string $sid, int $object_id) */ public static function getObjectByReference(string $sid, int $a_ref_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getObjectByReference($sid, $a_ref_id, $user_id); } @@ -185,7 +185,7 @@ public static function getObjectByReference(string $sid, int $a_ref_id, int $use */ public static function getObjectsByTitle(string $sid, string $a_title, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getObjectsByTitle($sid, $a_title, $user_id); } @@ -195,7 +195,7 @@ public static function getObjectsByTitle(string $sid, string $a_title, int $user */ public static function addObject(string $sid, int $a_target_id, string $a_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->addObject($sid, $a_target_id, $a_xml); } @@ -205,7 +205,7 @@ public static function addObject(string $sid, int $a_target_id, string $a_xml) */ public static function addReference(string $sid, int $a_source_id, int $a_target_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->addReference($sid, $a_source_id, $a_target_id); } @@ -215,7 +215,7 @@ public static function addReference(string $sid, int $a_source_id, int $a_target */ public static function deleteObject(string $sid, int $reference_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->deleteObject($sid, $reference_id); } @@ -225,7 +225,7 @@ public static function deleteObject(string $sid, int $reference_id) */ public static function removeFromSystemByImportId(string $sid, string $import_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->removeFromSystemByImportId($sid, $import_id); } @@ -235,7 +235,7 @@ public static function removeFromSystemByImportId(string $sid, string $import_id */ public static function updateObjects(string $sid, string $obj_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->updateObjects($sid, $obj_xml); } @@ -245,7 +245,7 @@ public static function updateObjects(string $sid, string $obj_xml) */ public static function searchObjects(string $sid, array $types, string $key, string $combination, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->searchObjects($sid, $types, $key, $combination, $user_id); } @@ -255,7 +255,7 @@ public static function searchObjects(string $sid, array $types, string $key, str */ public static function getTreeChilds(string $sid, int $ref_id, array $types, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getTreeChilds($sid, $ref_id, $types, $user_id); } @@ -265,7 +265,7 @@ public static function getTreeChilds(string $sid, int $ref_id, array $types, int */ public static function getXMLTree(string $sid, int $ref_id, array $types, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getXMLTree($sid, $ref_id, $types, $user_id); } @@ -275,7 +275,7 @@ public static function getXMLTree(string $sid, int $ref_id, array $types, int $u */ public static function getOperations(string $sid) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->getOperations($sid); } @@ -285,7 +285,7 @@ public static function getOperations(string $sid) */ public static function addUserRoleEntry(string $sid, int $user_id, int $role_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->addUserRoleEntry($sid, $user_id, $role_id); } @@ -295,7 +295,7 @@ public static function addUserRoleEntry(string $sid, int $user_id, int $role_id) */ public static function deleteUserRoleEntry(string $sid, int $user_id, int $role_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->deleteUserRoleEntry($sid, $user_id, $role_id); } @@ -305,7 +305,7 @@ public static function deleteUserRoleEntry(string $sid, int $user_id, int $role_ */ public static function revokePermissions(string $sid, int $ref_id, int $role_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->revokePermissions($sid, $ref_id, $role_id); } @@ -315,7 +315,7 @@ public static function revokePermissions(string $sid, int $ref_id, int $role_id) */ public static function grantPermissions(string $sid, int $ref_id, int $role_id, array $permissions) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->grantPermissions($sid, $ref_id, $role_id, $permissions); } @@ -325,7 +325,7 @@ public static function grantPermissions(string $sid, int $ref_id, int $role_id, */ public static function getLocalRoles(string $sid, int $ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->getLocalRoles($sid, $ref_id); } @@ -335,7 +335,7 @@ public static function getLocalRoles(string $sid, int $ref_id) */ public static function getUserRoles(string $sid, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->getUserRoles($sid, $user_id); } @@ -345,7 +345,7 @@ public static function getUserRoles(string $sid, int $user_id) */ public static function deleteRole(string $sid, int $role_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->deleteRole($sid, $role_id); } @@ -355,7 +355,7 @@ public static function deleteRole(string $sid, int $role_id) */ public static function addRole(string $sid, int $target_id, string $obj_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->addRole($sid, $target_id, $obj_xml); } @@ -365,7 +365,7 @@ public static function addRole(string $sid, int $target_id, string $obj_xml) */ public static function addRoleFromTemplate(string $sid, int $target_id, string $obj_xml, int $template_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->addRoleFromTemplate($sid, $target_id, $obj_xml, $template_id); } @@ -375,7 +375,7 @@ public static function addRoleFromTemplate(string $sid, int $target_id, string $ */ public static function getObjectTreeOperations(string $sid, int $ref_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->getObjectTreeOperations($sid, $ref_id, $user_id); } @@ -385,7 +385,7 @@ public static function getObjectTreeOperations(string $sid, int $ref_id, int $us */ public static function addGroup(string $sid, int $target_id, int $group_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $soa = new ilSoapGroupAdministration(); return $soa->addGroup($sid, $target_id, $group_xml); } @@ -395,7 +395,7 @@ public static function addGroup(string $sid, int $target_id, int $group_xml) */ public static function groupExists(string $sid, string $title) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $soa = new ilSoapGroupAdministration(); return $soa->groupExists($sid, $title); } @@ -405,7 +405,7 @@ public static function groupExists(string $sid, string $title) */ public static function getGroup(string $sid, int $ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $soa = new ilSoapGroupAdministration(); return $soa->getGroup($sid, $ref_id); } @@ -415,7 +415,7 @@ public static function getGroup(string $sid, int $ref_id) */ public static function assignGroupMember(string $sid, int $group_id, int $user_id, string $type) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $sca = new ilSoapGroupAdministration(); return $sca->assignGroupMember($sid, $group_id, $user_id, $type); } @@ -425,7 +425,7 @@ public static function assignGroupMember(string $sid, int $group_id, int $user_i */ public static function isAssignedToGroup(string $sid, int $group_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $sca = new ilSoapGroupAdministration(); return $sca->isAssignedToGroup($sid, $group_id, $user_id); } @@ -435,7 +435,7 @@ public static function isAssignedToGroup(string $sid, int $group_id, int $user_i */ public static function excludeGroupMember(string $sid, int $group_id, int $user_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $sca = new ilSoapGroupAdministration(); return $sca->excludeGroupMember($sid, $group_id, $user_id); } @@ -445,7 +445,7 @@ public static function excludeGroupMember(string $sid, int $group_id, int $user_ */ public static function ilClone(string $sid, int $copy_identifier) { - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; $sou = new ilSoapUtils(); $sou->disableSOAPCheck(); @@ -458,7 +458,7 @@ public static function ilClone(string $sid, int $copy_identifier) */ public static function ilCloneDependencies(string $sid, int $copy_identifier) { - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; $sou = new ilSoapUtils(); $sou->disableSOAPCheck(); @@ -471,7 +471,7 @@ public static function ilCloneDependencies(string $sid, int $copy_identifier) */ public static function saveQuestion(string $sid, int $active_id, int $question_id, int $pass, array $solution) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->saveQuestion($sid, $active_id, $question_id, $pass, $solution); } @@ -481,7 +481,7 @@ public static function saveQuestion(string $sid, int $active_id, int $question_i */ public static function saveQuestionSolution(string $sid, int $active_id, int $question_id, int $pass, int $solution) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->saveQuestionSolution($sid, $active_id, $question_id, $pass, $solution); } @@ -491,7 +491,7 @@ public static function saveQuestionSolution(string $sid, int $active_id, int $qu */ public static function getQuestionSolution(string $sid, int $active_id, int $question_id, int $pass) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->getQuestionSolution($sid, $active_id, $question_id, $pass); } @@ -501,7 +501,7 @@ public static function getQuestionSolution(string $sid, int $active_id, int $que */ public static function getTestUserData(string $sid, int $active_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->getTestUserData($sid, $active_id); } @@ -511,7 +511,7 @@ public static function getTestUserData(string $sid, int $active_id) */ public static function getNrOfQuestionsInPass(string $sid, int $active_id, int $pass) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->getNrOfQuestionsInPass($sid, $active_id, $pass); } @@ -521,7 +521,7 @@ public static function getNrOfQuestionsInPass(string $sid, int $active_id, int $ */ public static function getPositionOfQuestion(string $sid, int $active_id, int $question_id, int $pass) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->getPositionOfQuestion($sid, $active_id, $question_id, $pass); } @@ -531,7 +531,7 @@ public static function getPositionOfQuestion(string $sid, int $active_id, int $q */ public static function getPreviousReachedPoints(string $sid, int $active_id, int $question_id, int $pass) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $sass = new ilSoapTestAdministration(); return $sass->getPreviousReachedPoints($sid, $active_id, $question_id, $pass); } @@ -541,7 +541,7 @@ public static function getPreviousReachedPoints(string $sid, int $active_id, int */ public static function saveTempFileAsMediaObject(string $sid, string $name, string $tmp_name) { - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; $sou = new ilSoapUtils(); $sou->disableSOAPCheck(); @@ -553,7 +553,7 @@ public static function saveTempFileAsMediaObject(string $sid, string $name, stri */ public static function getMobsOfObject(string $sid, string $a_type, int $a_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; $sou = new ilSoapUtils(); $sou->disableSOAPCheck(); return $sou->getMobsOfObject($sid, $a_type, $a_id); @@ -564,7 +564,7 @@ public static function getMobsOfObject(string $sid, string $a_type, int $a_id) */ public static function getStructureObjects(string $sid, int $ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapStructureObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapStructureObjectAdministration.php'; $sca = new ilSOAPStructureObjectAdministration(); return $sca->getStructureObjects($sid, $ref_id); } @@ -574,7 +574,7 @@ public static function getStructureObjects(string $sid, int $ref_id) */ public static function getRoles(string $sid, string $role_type, int $id) { - include_once './components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $soa = new ilSoapRBACAdministration(); return $soa->getRoles($sid, $role_type, $id); } @@ -584,7 +584,7 @@ public static function getRoles(string $sid, string $role_type, int $id) */ public static function importUsers(string $sid, int $folder_id, string $usr_xml, int $conflict_rule, bool $send_account_mail) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->importUsers($sid, $folder_id, $usr_xml, $conflict_rule, $send_account_mail); } @@ -594,7 +594,7 @@ public static function importUsers(string $sid, int $folder_id, string $usr_xml, */ public static function getUsersForContainer(string $sid, int $ref_id, bool $attach_roles, int $active) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->getUsersForContainer($sid, $ref_id, $attach_roles, $active); } @@ -604,7 +604,7 @@ public static function getUsersForContainer(string $sid, int $ref_id, bool $atta */ public static function getUsersForRole(string $sid, int $role_id, bool $attach_roles, int $active) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->getUserForRole($sid, $role_id, $attach_roles, $active); } @@ -614,7 +614,7 @@ public static function getUsersForRole(string $sid, int $role_id, bool $attach_r */ public static function searchUser(string $sid, array $a_keyfields, string $query_operator, array $a_keyvalues, bool $attach_roles, int $active) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->searchUser($sid, $a_keyfields, $query_operator, $a_keyvalues, $attach_roles, $active); } @@ -624,7 +624,7 @@ public static function searchUser(string $sid, array $a_keyfields, string $query */ public static function hasNewMail(string $sid) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->hasNewMail($sid); } @@ -634,7 +634,7 @@ public static function hasNewMail(string $sid) */ public static function getExerciseXML(string $sid, int $ref_id, int $attachFileContentsMode) { - include_once './components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; $sta = new ilSoapExerciseAdministration(); return $sta->getExerciseXML($sid, $ref_id, $attachFileContentsMode); } @@ -644,7 +644,7 @@ public static function getExerciseXML(string $sid, int $ref_id, int $attachFileC */ public static function updateExercise(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; $sta = new ilSoapExerciseAdministration(); return $sta->updateExercise($sid, $ref_id, $xml); } @@ -654,7 +654,7 @@ public static function updateExercise(string $sid, int $ref_id, string $xml) */ public static function addExercise(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapExerciseAdministration.php'; $sta = new ilSoapExerciseAdministration(); return $sta->addExercise($sid, $ref_id, $xml); } @@ -664,7 +664,7 @@ public static function addExercise(string $sid, int $ref_id, string $xml) */ public static function getFileXML(string $sid, int $ref_id, int $attachFileContentsMode) { - include_once './components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; $sta = new ilSoapFileAdministration(); return $sta->getFileXML($sid, $ref_id, $attachFileContentsMode); } @@ -674,7 +674,7 @@ public static function getFileXML(string $sid, int $ref_id, int $attachFileConte */ public static function updateFile(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; $sta = new ilSoapFileAdministration(); return $sta->updateFile($sid, $ref_id, $xml); } @@ -684,7 +684,7 @@ public static function updateFile(string $sid, int $ref_id, string $xml) */ public static function addFile(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapFileAdministration.php'; $sta = new ilSoapFileAdministration(); return $sta->addFile($sid, $ref_id, $xml); } @@ -694,7 +694,7 @@ public static function addFile(string $sid, int $ref_id, string $xml) */ public static function getObjIdsByRefIds(string $sid, array $ref_ids) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getObjIdsByRefIds($sid, $ref_ids); } @@ -704,7 +704,7 @@ public static function getObjIdsByRefIds(string $sid, array $ref_ids) */ public static function getUserXML(string $sid, array $user_ids, bool $attach_roles) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->getUserXML($sid, $user_ids, $attach_roles); } @@ -714,7 +714,7 @@ public static function getUserXML(string $sid, array $user_ids, bool $attach_rol */ public static function updateGroup(string $sid, int $ref_id, string $grp_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $sua = new ilSoapGroupAdministration(); return $sua->updateGroup($sid, $ref_id, $grp_xml); } @@ -724,14 +724,14 @@ public static function updateGroup(string $sid, int $ref_id, string $grp_xml) */ public static function getIMSManifestXML(string $sid, int $ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; $sua = new ilSoapSCORMAdministration(); return $sua->getIMSManifestXML($sid, $ref_id); } public static function hasSCORMCertificate(string $sid, int $ref_id, int $usr_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; $sua = new ilSoapSCORMAdministration(); return $sua->hasSCORMCertificate($sid, $ref_id, $usr_id); } @@ -741,7 +741,7 @@ public static function hasSCORMCertificate(string $sid, int $ref_id, int $usr_id */ public static function copyObject(string $sid, string $copy_settings_xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->copyObject($sid, $copy_settings_xml); } @@ -751,7 +751,7 @@ public static function copyObject(string $sid, string $copy_settings_xml) */ public static function startBackgroundTaskWorker(string $sid) { - require_once("./components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php"); + require_once(substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . "/components/ILIAS/BackgroundTasks_/classes/class.ilSoapBackgroundTasksAdministration.php"); $soa = new ilSoapBackgroundTasksAdministration(); return $soa->runAsync($sid); } @@ -761,7 +761,7 @@ public static function startBackgroundTaskWorker(string $sid) */ public static function moveObject(string $sid, int $ref_id, int $target_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->moveObject($sid, $ref_id, $target_id); } @@ -771,7 +771,7 @@ public static function moveObject(string $sid, int $ref_id, int $target_id) */ public static function getTestResults(string $sid, int $ref_id, bool $sum_only) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $soa = new ilSoapTestAdministration(); return $soa->getTestResults($sid, $ref_id, $sum_only); } @@ -781,7 +781,7 @@ public static function getTestResults(string $sid, int $ref_id, bool $sum_only) */ public static function removeTestResults(string $sid, int $ref_id, array $a_user_ids) { - include_once './components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapTestAdministration.php'; $soa = new ilSoapTestAdministration(); return $soa->removeTestResults($sid, $ref_id, $a_user_ids); } @@ -791,7 +791,7 @@ public static function removeTestResults(string $sid, int $ref_id, array $a_user */ public static function getCoursesForUser(string $sid, string $parameters) { - include_once 'components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapCourseAdministration.php'; $soc = new ilSoapCourseAdministration(); return $soc->getCoursesForUser($sid, $parameters); } @@ -801,7 +801,7 @@ public static function getCoursesForUser(string $sid, string $parameters) */ public static function getGroupsForUser(string $sid, string $parameters) { - include_once 'components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapGroupAdministration.php'; $soc = new ilSoapGroupAdministration(); return $soc->getGroupsForUser($sid, $parameters); } @@ -811,7 +811,7 @@ public static function getGroupsForUser(string $sid, string $parameters) */ public static function getPathForRefId(string $sid, int $ref_id) { - include_once 'components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapObjectAdministration.php'; $soa = new ilSoapObjectAdministration(); return $soa->getPathForRefId($sid, $ref_id); } @@ -821,14 +821,14 @@ public static function getPathForRefId(string $sid, int $ref_id) */ public static function searchRoles(string $sid, string $key, string $combination, string $role_type) { - include_once 'components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapRBACAdministration.php'; $roa = new ilSoapRBACAdministration(); return $roa->searchRoles($sid, $key, $combination, $role_type); } public static function getInstallationInfoXML(): string { - include_once 'components/ILIAS/soapclasses/class.ilSoapAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; $roa = new ilSoapAdministration(); return $roa->getInstallationInfoXML(); } @@ -838,7 +838,7 @@ public static function getInstallationInfoXML(): string */ public static function getClientInfoXML(string $clientid) { - include_once 'components/ILIAS/soapclasses/class.ilSoapAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapAdministration.php'; $roa = new ilSoapAdministration(); return $roa->getClientInfoXML($clientid); } @@ -858,7 +858,7 @@ public static function buildHTTPPath(): string $path = dirname($_SERVER['REQUEST_URI'] ?? ''); //dirname cuts the last directory from a directory path e.g content/classes return content - include_once 'components/ILIAS/FileServices_/classes/class.ilFileUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/FileServices_/classes/class.ilFileUtils.php'; $module = ilFileUtils::removeTrailingPathSeparators(ILIAS_MODULE); $dirs = explode('/', $module); @@ -874,7 +874,7 @@ public static function buildHTTPPath(): string */ public static function getSCORMCompletionStatus(string $sid, int $usr_id, int $a_ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapSCORMAdministration.php'; $sua = new ilSoapSCORMAdministration(); return $sua->getSCORMCompletionStatus($sid, $usr_id, $a_ref_id); } @@ -884,7 +884,7 @@ public static function getSCORMCompletionStatus(string $sid, int $usr_id, int $a */ public static function getUserIdBySid(string $sid) { - include_once './components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUserAdministration.php'; $sua = new ilSoapUserAdministration(); return $sua->getUserIdBySid($sid); } @@ -894,7 +894,7 @@ public static function getUserIdBySid(string $sid) */ public static function readWebLink(string $sid, int $ref_id) { - include_once './components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; $swa = new ilSoapWebLinkAdministration(); return $swa->readWebLink($sid, $ref_id); } @@ -904,7 +904,7 @@ public static function readWebLink(string $sid, int $ref_id) */ public static function createWebLink(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; $swa = new ilSoapWebLinkAdministration(); return $swa->createWebLink($sid, $ref_id, $xml); @@ -915,14 +915,14 @@ public static function createWebLink(string $sid, int $ref_id, string $xml) */ public static function updateWebLink(string $sid, int $ref_id, string $xml) { - include_once './components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapWebLinkAdministration.php'; $swa = new ilSoapWebLinkAdministration(); return $swa->updateWebLink($sid, $ref_id, $xml); } public static function deleteExpiredDualOptInUserObjects(string $sid, int $usr_id): bool { - include_once './components/ILIAS/soapclasses/class.ilSoapUtils.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapUtils.php'; $sou = new ilSoapUtils(); $sou->disableSOAPCheck(); @@ -935,7 +935,7 @@ public static function deleteExpiredDualOptInUserObjects(string $sid, int $usr_i */ public static function deleteProgress(string $sid, array $ref_ids, array $usr_ids, array $type_filter, array $progress_filter) { - include_once './components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; $sla = new ilSoapLearningProgressAdministration(); return $sla->deleteProgress($sid, $ref_ids, $usr_ids, $type_filter, $progress_filter); } @@ -945,7 +945,7 @@ public static function deleteProgress(string $sid, array $ref_ids, array $usr_id */ public static function getLearningProgressChanges(string $sid, string $timestamp, bool $include_ref_ids, array $type_filter) { - include_once './components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; $s = new ilSoapLearningProgressAdministration(); return $s->getLearningProgressChanges($sid, $timestamp, $include_ref_ids, $type_filter); } @@ -955,7 +955,7 @@ public static function getLearningProgressChanges(string $sid, string $timestamp */ public static function getProgressInfo(string $sid, int $ref_id, array $progress_filter) { - include_once './components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapLearningProgressAdministration.php'; $sla = new ilSoapLearningProgressAdministration(); return $sla->getProgressInfo($sid, $ref_id, $progress_filter); } @@ -965,7 +965,7 @@ public static function getProgressInfo(string $sid, int $ref_id, array $progress */ public static function exportDataCollectionContent(string $sid, int $data_collection_id, ?int $table_id = null, string $format = "xls", ?string $filepath = null) { - include_once './components/ILIAS/soapclasses/class.ilSoapDataCollectionAdministration.php'; + include_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/soapclasses/class.ilSoapDataCollectionAdministration.php'; $dcl = new ilSoapDataCollectionAdministration(); return $dcl->exportDataCollectionContent($sid, $data_collection_id, $table_id, $format, $filepath); } @@ -1086,7 +1086,7 @@ public function __call($name, $arguments) // Note: We need to bootstrap ILIAS in order to get $ilPluginAdmin and load the soap plugins. // We MUST use a context that does not handle authentication at this point (session is checked by SOAP). ilContext::init(ilContext::CONTEXT_SOAP_NO_AUTH); - require_once 'components/ILIAS/Init_/classes/class.ilInitialisation.php'; + require_once substr(__FILE__, 0, strpos(__FILE__, "components/ILIAS")) . '/components/ILIAS/Init_/classes/class.ilInitialisation.php'; ilInitialisation::initILIAS(); ilContext::init(ilContext::CONTEXT_SOAP); global $DIC;