Skip to content

Commit 229d7e7

Browse files
authored
[6.0] Removing defs of JPATH_COMPONENT* from installation app (joomla#45250)
* Removing definitions of JPATH_COMPONENT* from installation app * Set basepath in installer application
1 parent 61539c5 commit 229d7e7

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

installation/src/Application/CliInstallationApplication.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,6 @@ public function __construct(
121121
// Store the debug value to config based on the JDEBUG flag.
122122
$this->config->set('debug', JDEBUG);
123123

124-
\define('JPATH_COMPONENT', JPATH_BASE);
125-
\define('JPATH_COMPONENT_SITE', JPATH_SITE);
126-
\define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR);
127-
128124
// Register the config to Factory.
129125
Factory::$config = $this->config;
130126
Factory::$language = $language;

installation/src/Application/InstallationApplication.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ public function dispatch()
187187
// Register the document object with Factory.
188188
Factory::$document = $document;
189189

190-
// Define component path.
191-
\define('JPATH_COMPONENT', JPATH_BASE);
192-
\define('JPATH_COMPONENT_SITE', JPATH_SITE);
193-
\define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR);
194-
195190
// Execute the task.
196191
ob_start();
197192
$this->executeController();
@@ -301,7 +296,7 @@ private function executeController()
301296
$factory->setDatabase($this->getContainer()->get(DatabaseInterface::class));
302297

303298
// Create the instance
304-
$controller = $factory->createController($controllerName, 'Installation', [], $this, $this->input);
299+
$controller = $factory->createController($controllerName, 'Installation', ['base_path' => JPATH_INSTALLATION], $this, $this->input);
305300

306301
// Execute the task
307302
$controller->execute($task);

0 commit comments

Comments
 (0)