Advertisement
Guest User

index.php

a guest
Dec 2nd, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package Joomla.Site
  4. * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  5. * @license GNU General Public License version 2 or later; see LICENSE.txt
  6. */
  7.  
  8. // Set flag that this is a parent file.
  9. define('_JEXEC', 1);
  10. define('DS', DIRECTORY_SEPARATOR);
  11.  
  12. if (file_exists(dirname(__FILE__) . '/defines.php')) {
  13. include_once dirname(__FILE__) . '/defines.php';
  14. }
  15.  
  16. if (!defined('_JDEFINES')) {
  17. define('JPATH_BASE', dirname(__FILE__));
  18. require_once JPATH_BASE.'/includes/defines.php';
  19. }
  20.  
  21. require_once JPATH_BASE.'/includes/framework.php';
  22.  
  23. // Mark afterLoad in the profiler.
  24. JDEBUG ? $_PROFILER->mark('afterLoad') : null;
  25.  
  26. // Instantiate the application.
  27. $app = JFactory::getApplication('site');
  28.  
  29. // Initialise the application.
  30. $app->initialise();
  31.  
  32. // Mark afterIntialise in the profiler.
  33. JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
  34.  
  35. // Route the application.
  36. $app->route();
  37.  
  38. // Mark afterRoute in the profiler.
  39. JDEBUG ? $_PROFILER->mark('afterRoute') : null;
  40.  
  41. // Dispatch the application.
  42. $app->dispatch();
  43.  
  44. // Mark afterDispatch in the profiler.
  45. JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
  46.  
  47. // Render the application.
  48. $app->render();
  49.  
  50. // Mark afterRender in the profiler.
  51. JDEBUG ? $_PROFILER->mark('afterRender') : null;
  52.  
  53. // edit head JS
  54. if (isset($this->_script['text/javascript'])){
  55. $this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',\s*function\(\)\s*{\s*new\s*JCaption\(\'img.caption\'\);\s*}\);\s*%', '', $this->_script['text/javascript']);
  56. if (empty($this->_script['text/javascript']))
  57. unset($this->_script['text/javascript']);
  58. }
  59.  
  60.  
  61. // Return the response.
  62. echo $app;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement