mark('afterLoad') : null; // Instantiate the application. $app = JFactory::getApplication('administrator'); // Initialise the application. $app->initialise( array('language' => $app->getUserState('application.lang')) ); // Test for magic quotes if (get_magic_quotes_gpc()) { $lang = JFactory::getLanguage(); if ($lang->hasKey('JERROR_MAGIC_QUOTES')) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_MAGIC_QUOTES'), 'Error'); } else { JFactory::getApplication()->enqueueMessage('Your host needs to disable magic_quotes_gpc to run this version of Joomla!', 'Error'); } } // Mark afterIntialise in the profiler. JDEBUG ? $_PROFILER->mark('afterInitialise') : null; // Route the application. $app->route(); // Mark afterRoute in the profiler. JDEBUG ? $_PROFILER->mark('afterRoute') : null; // Dispatch the application. $app->dispatch(); // Mark afterDispatch in the profiler. JDEBUG ? $_PROFILER->mark('afterDispatch') : null; // Render the application. $app->render(); // Mark afterRender in the profiler. JDEBUG ? $_PROFILER->mark('afterRender') : null; // Return the response. echo $app;