Skip to content

Commit c2743fb

Browse files
committed
Start structuring things some more
1 parent 2c2f1ea commit c2743fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+164
-124
lines changed
File renamed without changes.
File renamed without changes.

platformApp/language/index.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Joomla/Tracker/Application/TrackerApplication.php

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public function __construct()
8181
// Register the event dispatcher
8282
$this->loadDispatcher();
8383

84+
/* Disable sessions for the moment
8485
// Enable sessions by default.
8586
if (is_null($this->get('session')))
8687
{
@@ -100,7 +101,7 @@ public function __construct()
100101
101102
// Register the session with Factory
102103
Factory::$session = $this->getSession();
103-
}
104+
}*/
104105

105106
// Register the application to Factory
106107
Factory::$application = $this;
@@ -229,35 +230,30 @@ protected function doExecute()
229230
{
230231
try
231232
{
232-
// Load the document to the API
233-
$this->loadDocument();
234-
235-
// Set up the params
236-
$document = $this->getDocument();
237-
238-
// Register the document object with JFactory
239-
Factory::$document = $document;
240-
241233
// Register the template to the config
242234
$template = $this->getTemplate(true);
243235
$this->set('theme', $template->template);
244236
$this->set('themeParams', $template->params);
245237
$this->set('themeFile', $this->input->get('tmpl', 'index') . '.php');
246238

247239
// Set metadata
248-
$document->setTitle('Joomla! CMS Issue Tracker');
240+
//$document->setTitle('Joomla! CMS Issue Tracker');
249241

250242
// Instantiate the router
251243
$router = new TrackerRouter($this->input, $this);
252-
$router->setControllerPrefix('\\Joomla\\Tracker\\Components');
244+
$router->setControllerPrefix('Joomla\\Tracker\\Components');
245+
$router->setDefaultController('\\Tracker\\Controller\\DefaultController');
253246

254247
// Fetch the controller
255248
$controller = $router->getController($this->get('uri.route'));
256249

250+
// Define the component path
251+
define('JPATH_COMPONENT', dirname(__DIR__) . '/Components/' . ucfirst($controller->getComponent()));
252+
257253
// Execute the component
258-
$contents = $this->executeComponent($controller, $component);
254+
$contents = $this->executeComponent($controller, strtolower($controller->getComponent()));
259255

260-
$document->setBuffer($contents, 'component');
256+
//$document->setBuffer($contents, 'component');
261257
}
262258

263259
// Mop up any uncaught exceptions.
@@ -323,9 +319,7 @@ public function executeComponent($controller, $component)
323319

324320
// Load common and local language files.
325321
$lang->load($component, JPATH_BASE, null, false, false)
326-
|| $lang->load($component, JPATH_COMPONENT, null, false, false)
327-
|| $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false)
328-
|| $lang->load($component, JPATH_COMPONENT, $lang->getDefault(), false, false);
322+
|| $lang->load($component, JPATH_BASE, $lang->getDefault(), false, false);
329323

330324
// Start an output buffer.
331325
ob_start();
@@ -494,7 +488,7 @@ public function getParams($component = '')
494488
public function getTemplate($params = false)
495489
{
496490
// Build the object
497-
$template = new stdClass;
491+
$template = new \stdClass;
498492
$template->template = 'joomla';
499493
$template->params = new Registry;
500494

0 commit comments

Comments
 (0)