Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Sep 15, 2017
1 parent 7a94090 commit 4069a03
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 474 deletions.
3 changes: 0 additions & 3 deletions installation/application/web.php
Expand Up @@ -175,9 +175,6 @@ public function dispatch()
// Register the document object with JFactory.
JFactory::$document = $document;

// Register our JHtml service
JHtml::getServiceRegistry()->register('installation', new InstallationHtmlHelper($this));

// Define component path.
define('JPATH_COMPONENT', JPATH_BASE);
define('JPATH_COMPONENT_SITE', JPATH_SITE);
Expand Down
2 changes: 1 addition & 1 deletion installation/controller/database.php
Expand Up @@ -30,7 +30,7 @@ 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));

(new InstallationModelSetup)->checkForm('setup');
// Get the options from the session
Expand Down
7 changes: 6 additions & 1 deletion installation/controller/default.php
Expand Up @@ -66,6 +66,11 @@ public function execute()
$app->redirect('index.php?view=setup');
}

if ($vName === 'remove' && !file_exists(JPATH_CONFIGURATION . '/configuration.php'))
{
$app->redirect('index.php?view=setup');
}

$options = (new InstallationModelChecks)->getOptions();
$model = new InstallationModelSetup;
$checkOptions = true;
Expand All @@ -84,7 +89,7 @@ public function execute()

if (!class_exists($vClass))
{
$vClass = 'InstallationViewError';
$vClass = 'InstallationViewErrorHtml';
}

/** @var JViewHtml $view */
Expand Down
56 changes: 0 additions & 56 deletions installation/controller/detectftproot.php

This file was deleted.

3 changes: 0 additions & 3 deletions installation/controller/install/database.php
Expand Up @@ -40,9 +40,6 @@ public function execute()

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

// ->installCmsData($options))
{
$r->view = 'database';
}
Expand Down
162 changes: 0 additions & 162 deletions installation/controller/install/email.php

This file was deleted.

4 changes: 2 additions & 2 deletions installation/controller/install/languages.php
Expand Up @@ -48,7 +48,7 @@ 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 array of selected languages
$lids = $this->getInput()->get('cid', [], 'array');
Expand All @@ -75,7 +75,7 @@ public function execute()

// Redirect to the page.
$r = new stdClass;
$r->view = 'defaultlanguage';
$r->view = 'remove';
$app->sendJsonResponse($r);
}
}
13 changes: 10 additions & 3 deletions installation/controller/install/sample.php
Expand Up @@ -30,18 +30,25 @@ 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));

$file = JFactory::getApplication()->input->post->get('sample_file', '', 'string');

// Get the options from the session
$options = (new InstallationModelSetup)->getOptions();

if ('' !== $file)
{
$options = array_merge(['‌‌sampleData' => $file], $options);
}

$r = new stdClass;
$r->view = 'install';
$r->view = 'remove';

// Check if the database was initialised
if (!(new InstallationModelDatabase)->installSampleData($options))
{
$r->view = 'database';
$r->view = '';
}

$app->sendJsonResponse($r);
Expand Down
Expand Up @@ -10,11 +10,11 @@
defined('_JEXEC') or die;

/**
* Controller class to set the FTP data for the Joomla Installer.
* Controller class to set the site data for the Joomla Installer.
*
* @since 3.1
* @since __DEPLOY_VERSION__
*/
class InstallationControllerFtp extends JControllerBase
class InstallationControllerRemove extends JControllerBase
{
/**
* Execute the controller.
Expand All @@ -32,12 +32,10 @@ public function execute()
// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Check the form
(new InstallationModelSetup)->checkForm('ftp');

// Redirect to the page.
$r = new stdClass;
$r->view = 'preinstall';
$r->view = 'remove';

$app->sendJsonResponse($r);
}
}
2 changes: 1 addition & 1 deletion installation/controller/setup.php
Expand Up @@ -30,7 +30,7 @@ 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));

// Redirect to the page.
$r = new stdClass;
Expand Down
43 changes: 0 additions & 43 deletions installation/controller/summary.php

This file was deleted.

0 comments on commit 4069a03

Please sign in to comment.