Skip to content

Commit

Permalink
^ [joomla#30085] Refactor installation to use new application and MVC
Browse files Browse the repository at this point in the history
classes. Thanks Michael
  • Loading branch information
mbabker authored and infograf768 committed Mar 5, 2013
1 parent ee5d639 commit a321bba
Show file tree
Hide file tree
Showing 115 changed files with 3,749 additions and 3,261 deletions.
3 changes: 3 additions & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ $ -> Language fix or change
- -> Removed
! -> Note

05-Mar-2013 Jean-Marie Simonet
^ [#30085] Refactor installation to use new application and MVC classes. Thanks Michael

02-Mar-2013 Jean-Marie Simonet
# [#30189] * [#30157] did not take into account apostrophies in lang strings values
# [#30186] Weblinks module fails
Expand Down
23 changes: 23 additions & 0 deletions installation/application/bootstrap.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* @package Joomla.Installation
* @subpackage Application
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

// Define the base path and require the other defines
define('JPATH_BASE', dirname(__DIR__));
require_once __DIR__ . '/defines.php';

// Launch the application
require_once __DIR__ . '/framework.php';

// Register the Installation application
JLoader::registerPrefix('Installation', JPATH_INSTALLATION);

// Register the application's router due to non-standard include
JLoader::register('JRouterInstallation', __DIR__ . '/router.php');
30 changes: 30 additions & 0 deletions installation/application/defines.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* @package Joomla.Installation
* @subpackage Application
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/*
* Joomla! Installation Application Defines
*/

// Global definitions
$parts = explode(DIRECTORY_SEPARATOR, JPATH_BASE);
array_pop($parts);

// Defines
define('JPATH_ROOT', implode(DIRECTORY_SEPARATOR, $parts));
define('JPATH_SITE', JPATH_ROOT);
define('JPATH_CONFIGURATION', JPATH_ROOT);
define('JPATH_ADMINISTRATOR', JPATH_ROOT . '/administrator');
define('JPATH_LIBRARIES', JPATH_ROOT . '/libraries');
define('JPATH_PLUGINS', JPATH_ROOT . '/plugins' );
define('JPATH_INSTALLATION', JPATH_ROOT . '/installation');
define('JPATH_THEMES', JPATH_BASE);
define('JPATH_CACHE', JPATH_BASE . '/cache');
define('JPATH_MANIFESTS', JPATH_ADMINISTRATOR . '/manifests');
39 changes: 39 additions & 0 deletions installation/application/framework.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
/**
* @package Joomla.Installation
* @subpackage Application
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/*
* Joomla system checks.
*/

error_reporting(E_ALL);
ini_set('display_errors', true);
const JDEBUG = false;
@ini_set('magic_quotes_runtime', 0);

/*
* Check if a configuration file already exists.
*/

if (file_exists(JPATH_CONFIGURATION . '/configuration.php') && (filesize(JPATH_CONFIGURATION . '/configuration.php') > 10) && !file_exists(JPATH_INSTALLATION . '/index.php'))
{
header('Location: ../index.php');
exit();
}

/*
* Joomla system startup.
*/

// Import the Joomla Platform.
require_once JPATH_LIBRARIES . '/import.php';

// Bootstrap the CMS libraries.
require_once JPATH_LIBRARIES . '/cms.php';
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
* @package Joomla.Installation
* @since 1.5
*/
class JRouterInstallation extends JObject
class JRouterInstallation extends JRouter
{
/**
* Function to convert a route to an internal URI
*
* @return boolean $url
* @param JURI $url The uri.
*
* @return boolean
*
* @since 1.5
*/
Expand All @@ -43,6 +45,6 @@ public function build($url)
{
$url = str_replace('&amp;', '&', $url);

return new JURI($url);
return new JUri($url);
}
}
Loading

0 comments on commit a321bba

Please sign in to comment.