@@ -81,6 +81,7 @@ public function __construct()
81
81
// Register the event dispatcher
82
82
$ this ->loadDispatcher ();
83
83
84
+ /* Disable sessions for the moment
84
85
// Enable sessions by default.
85
86
if (is_null($this->get('session')))
86
87
{
@@ -100,7 +101,7 @@ public function __construct()
100
101
101
102
// Register the session with Factory
102
103
Factory::$session = $this->getSession();
103
- }
104
+ }*/
104
105
105
106
// Register the application to Factory
106
107
Factory::$ application = $ this ;
@@ -229,35 +230,30 @@ protected function doExecute()
229
230
{
230
231
try
231
232
{
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
-
241
233
// Register the template to the config
242
234
$ template = $ this ->getTemplate (true );
243
235
$ this ->set ('theme ' , $ template ->template );
244
236
$ this ->set ('themeParams ' , $ template ->params );
245
237
$ this ->set ('themeFile ' , $ this ->input ->get ('tmpl ' , 'index ' ) . '.php ' );
246
238
247
239
// Set metadata
248
- $ document ->setTitle ('Joomla! CMS Issue Tracker ' );
240
+ // $document->setTitle('Joomla! CMS Issue Tracker');
249
241
250
242
// Instantiate the router
251
243
$ router = new TrackerRouter ($ this ->input , $ this );
252
- $ router ->setControllerPrefix ('\\Joomla \\Tracker \\Components ' );
244
+ $ router ->setControllerPrefix ('Joomla \\Tracker \\Components ' );
245
+ $ router ->setDefaultController ('\\Tracker \\Controller \\DefaultController ' );
253
246
254
247
// Fetch the controller
255
248
$ controller = $ router ->getController ($ this ->get ('uri.route ' ));
256
249
250
+ // Define the component path
251
+ define ('JPATH_COMPONENT ' , dirname (__DIR__ ) . '/Components/ ' . ucfirst ($ controller ->getComponent ()));
252
+
257
253
// Execute the component
258
- $ contents = $ this ->executeComponent ($ controller , $ component );
254
+ $ contents = $ this ->executeComponent ($ controller , strtolower ( $ controller -> getComponent ()) );
259
255
260
- $ document ->setBuffer ($ contents , 'component ' );
256
+ // $document->setBuffer($contents, 'component');
261
257
}
262
258
263
259
// Mop up any uncaught exceptions.
@@ -323,9 +319,7 @@ public function executeComponent($controller, $component)
323
319
324
320
// Load common and local language files.
325
321
$ 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 );
329
323
330
324
// Start an output buffer.
331
325
ob_start ();
@@ -494,7 +488,7 @@ public function getParams($component = '')
494
488
public function getTemplate ($ params = false )
495
489
{
496
490
// Build the object
497
- $ template = new stdClass ;
491
+ $ template = new \ stdClass ;
498
492
$ template ->template = 'joomla ' ;
499
493
$ template ->params = new Registry ;
500
494
0 commit comments