Permalink
Browse files

^ [#30085] Refactor installation to use new application and MVC

classes. Thanks Michael
  • Loading branch information...
mbabker authored and infograf768 committed Mar 5, 2013
1 parent ee5d639 commit a321bba98317c486bd6d653057d3b1678004bd1a
Showing with 3,749 additions and 3,261 deletions.
  1. +3 −0 installation/CHANGELOG
  2. +23 −0 installation/application/bootstrap.php
  3. +30 −0 installation/application/defines.php
  4. +39 −0 installation/application/framework.php
  5. 0 installation/{controllers → application}/index.html
  6. +5 −3 installation/{includes → application}/router.php
  7. +618 −0 installation/application/web.php
  8. +0 −114 installation/controller.php
  9. +64 −0 installation/controller/database.php
  10. +119 −0 installation/controller/default.php
  11. +64 −0 installation/controller/detectftproot.php
  12. +48 −0 installation/controller/ftp.php
  13. 0 installation/{helpers/html → controller}/index.html
  14. +60 −0 installation/controller/install/config.php
  15. +60 −0 installation/controller/install/database.php
  16. +60 −0 installation/controller/install/database_backup.php
  17. +21 −0 installation/controller/install/database_remove.php
  18. +147 −0 installation/controller/install/email.php
  19. 0 installation/{helpers → controller/install}/index.html
  20. +77 −0 installation/controller/install/languages.php
  21. +60 −0 installation/controller/install/sample.php
  22. +42 −0 installation/controller/preinstall.php
  23. +207 −0 installation/controller/removefolder.php
  24. +103 −0 installation/controller/setdefaultlanguage.php
  25. +86 −0 installation/controller/setlanguage.php
  26. +48 −0 installation/controller/site.php
  27. +48 −0 installation/controller/summary.php
  28. +64 −0 installation/controller/verifyftpsettings.php
  29. +0 −169 installation/controllers/languages.json.php
  30. +0 −764 installation/controllers/setup.json.php
  31. +1 −2 installation/{helpers → helper}/database.php
  32. 0 installation/{includes → helper/html}/index.html
  33. +3 −3 installation/{helpers → helper}/html/installation.php
  34. 0 installation/{models/fields → helper}/index.html
  35. +0 −396 installation/includes/application.php
  36. +6 −56 installation/index.php
  37. +6 −1 installation/language/en-AU/en-AU.ini
  38. +6 −1 installation/language/en-GB/en-GB.ini
  39. +6 −1 installation/language/en-US/en-US.ini
  40. +2 −2 installation/language/sv-SE/sv-SE.ini
  41. +29 −17 installation/{models → model}/configuration.php
  42. +117 −62 installation/{models → model}/database.php
  43. 0 installation/{models/forms → model/fields}/index.html
  44. +6 −3 installation/{models → model}/fields/language.php
  45. 0 installation/{models → model}/fields/prefix.php
  46. 0 installation/{models → model}/fields/sample.php
  47. 0 installation/{models → model}/forms/database.xml
  48. 0 installation/{models → model}/forms/ftp.xml
  49. 0 installation/{models → model/forms}/index.html
  50. 0 installation/{models → model}/forms/preinstall.xml
  51. 0 installation/{models → model}/forms/site.xml
  52. 0 installation/{models → model}/forms/summary.xml
  53. +270 −0 installation/model/ftp.php
  54. 0 installation/{models/rules → model}/index.html
  55. +42 −48 installation/{models → model}/languages.php
  56. 0 installation/{views/complete → model/rules}/index.html
  57. 0 installation/{models → model}/rules/prefix.php
  58. +74 −59 installation/{models → model}/setup.php
  59. +0 −565 installation/models/filesystem.php
  60. 0 installation/{views/complete/tmpl → response}/index.html
  61. +72 −0 installation/response/json.php
  62. +1 −1 installation/template/body.php
  63. +1 −1 installation/template/index.php
  64. +108 −62 installation/template/js/installation.js
  65. +62 −0 installation/view/complete/html.php
  66. 0 installation/{views/database → view/complete}/index.html
  67. +22 −20 installation/{views → view}/complete/tmpl/default.php
  68. 0 installation/{views/database → view/complete}/tmpl/index.html
  69. 0 installation/{views/defaultlanguage → view/database}/index.html
  70. +5 −2 installation/{views → view}/database/tmpl/default.php
  71. 0 installation/{views/defaultlanguage → view/database}/tmpl/index.html
  72. +50 −0 installation/view/default.php
  73. +52 −0 installation/view/defaultlanguage/html.php
  74. 0 installation/{views/ftp → view/defaultlanguage}/index.html
  75. +3 −1 installation/{views → view}/defaultlanguage/tmpl/default.php
  76. 0 installation/{views/ftp → view/defaultlanguage}/tmpl/index.html
  77. 0 installation/{views → view/ftp}/index.html
  78. +4 −2 installation/{views → view}/ftp/tmpl/default.php
  79. 0 installation/{views/install → view/ftp/tmpl}/index.html
  80. +77 −0 installation/view/install/html.php
  81. 0 installation/{views/install/tmpl → view/install}/index.html
  82. +59 −0 installation/view/install/tmpl/default.php
  83. 0 installation/{views/languages → view/install/tmpl}/index.html
  84. +50 −0 installation/view/languages/html.php
  85. 0 installation/{views/languages/tmpl → view/languages}/index.html
  86. +3 −1 installation/{views → view}/languages/tmpl/default.php
  87. 0 installation/{views/preinstall → view/languages/tmpl}/index.html
  88. +51 −0 installation/view/preinstall/html.php
  89. 0 installation/{views/preinstall/tmpl → view/preinstall}/index.html
  90. +4 −2 installation/{views → view}/preinstall/tmpl/default.php
  91. 0 installation/{views/remove → view/preinstall/tmpl}/index.html
  92. +21 −0 installation/view/remove/html.php
  93. 0 installation/{views/remove/tmpl → view/remove}/index.html
  94. +2 −0 installation/{views → view}/remove/tmpl/default.php
  95. 0 installation/{views/site → view/remove/tmpl}/index.html
  96. 0 installation/{views/site/tmpl → view/site}/index.html
  97. +6 −3 installation/{views → view}/site/tmpl/default.php
  98. 0 installation/{views/summary → view/site/tmpl}/index.html
  99. +60 −0 installation/view/summary/html.php
  100. 0 installation/{views/summary/tmpl → view/summary}/index.html
  101. +369 −0 installation/view/summary/tmpl/default.php
  102. +1 −0 installation/view/summary/tmpl/index.html
  103. +0 −51 installation/views/complete/view.html.php
  104. +0 −46 installation/views/database/view.html.php
  105. +0 −49 installation/views/defaultlanguage/view.html.php
  106. +0 −46 installation/views/ftp/view.html.php
  107. +0 −76 installation/views/install/tmpl/default.php
  108. +0 −51 installation/views/install/view.html.php
  109. +0 −42 installation/views/languages/view.html.php
  110. +0 −45 installation/views/preinstall/view.html.php
  111. +0 −19 installation/views/remove/view.html.php
  112. +0 −46 installation/views/site/view.html.php
  113. +0 −376 installation/views/summary/tmpl/default.php
  114. +0 −51 installation/views/summary/view.html.php
  115. +2 −2 libraries/joomla/mail/mail.php
View
@@ -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
@@ -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');
@@ -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');
@@ -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';
@@ -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
*/
@@ -43,6 +45,6 @@ public function build($url)
{
$url = str_replace('&amp;', '&', $url);
- return new JURI($url);
+ return new JUri($url);
}
}
Oops, something went wrong.

0 comments on commit a321bba

Please sign in to comment.