Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Jul 19, 2017
1 parent 45a8af0 commit 2a41250
Show file tree
Hide file tree
Showing 180 changed files with 494 additions and 29,221 deletions.
9 changes: 5 additions & 4 deletions installation/controller/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ public function execute()
// Check for request forgeries.
// JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Check the form
$vars = (new InstallationModelSetup)->checkForm('setup');
(new InstallationModelSetup)->checkForm('setup');
// Get the options from the session
$options = (new InstallationModelSetup)->getOptions();

// Determine if the configuration file path is writable.
$path = JPATH_CONFIGURATION . '/configuration.php';
Expand All @@ -43,8 +44,8 @@ public function execute()
$r->view = $useftp ? 'ftp' : 'install';

// Attempt to initialise the database.
if (!(new InstallationModelDatabase)->initialise($vars)){
if (!(new InstallationModelDatabase)->createDatabase($vars))
if (!(new InstallationModelDatabase)->initialise($options)){
if (!(new InstallationModelDatabase)->createDatabase($options))
{
$r->view = 'setup';
}
Expand Down
15 changes: 2 additions & 13 deletions installation/controller/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,16 @@ public function execute()
$checkOptions = false;
$options = [];

break;
case 'install':
$model = new InstallationModelSetup;
// InstallationModelConfiguration;
$checkOptions = true;
$options = $model->getOptions();

break;
case 'remove':
$options = (new InstallationModelChecks)->getOptions();
$model = new InstallationModelSetup;
// InstallationModelConfiguration;
$checkOptions = true;
$options = $model->getOptions();

break;
default:

$options = (new InstallationModelChecks)->getOptions();
$model = new InstallationModelSetup;
$checkOptions = true;
$options = $model->getOptions();

break;
}

Expand Down
9 changes: 5 additions & 4 deletions installation/controller/install/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ public function execute()
$app = $this->getApplication();

// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
//JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Get the options from the input
$options = $this->getInput()->get('jform');
(new InstallationModelSetup)->checkForm('setup');
// Get the options from the session
$options = (new InstallationModelSetup)->getOptions();

$r = new stdClass;

// Attempt to create the database tables.
if (!(new InstallationModelDatabase)->installCmsData($options))
if (!(new InstallationModelDatabase)->initialise($options) || !(new InstallationModelDatabase)->installCmsData($options))
// ->initialise($options))

// ->installCmsData($options))
Expand Down
48 changes: 48 additions & 0 deletions installation/controller/install/dbcheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Installation
* @subpackage Controller
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('_JEXEC') or die;

/**
* Controller class to set the site data for the Joomla Installer.
*
* @since 3.1
*/
class InstallationControllerInstallDbcheck extends JControllerBase
{
/**
* Execute the controller.
*
* @return void
*
* @since 3.1
*/
public function execute()
{
// Get the application
/* @var InstallationApplicationWeb $app */
$app = $this->getApplication();

// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Redirect to the page.
$r = new stdClass;
$r->crap = 'setup';

// Check the form
if ((new InstallationModelSetup)->checkForm('setup') === false || (new InstallationModelSetup)->initialise('setup') === false)
{
$r->messages = 'Check your DB credentials, db type, db name or hostname';
$r->crap = 'setup';
}

$app->sendJsonResponse($r);
}
}
2 changes: 1 addition & 1 deletion installation/controller/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function execute()
$r->view = 'remove';

// Check the form
if ((new InstallationModelSetup)->checkForm('setup') === false)
if ((new InstallationModelSetup)->checkForm('setup') === false || (new InstallationModelSetup)->initialise('setup') === false)
{
$r->view = 'setup';
}
Expand Down
314 changes: 0 additions & 314 deletions installation/language/af-ZA/af-ZA.ini

This file was deleted.

19 changes: 0 additions & 19 deletions installation/language/af-ZA/af-ZA.xml

This file was deleted.

Loading

0 comments on commit 2a41250

Please sign in to comment.