Skip to content

Commit

Permalink
Merge branch 'staging' into improveReinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 14, 2016
2 parents 7c1513b + 563e700 commit 53bcd26
Show file tree
Hide file tree
Showing 34 changed files with 442 additions and 334 deletions.
8 changes: 4 additions & 4 deletions administrator/language/en-GB/en-GB.ini
Expand Up @@ -393,7 +393,7 @@ JGLOBAL_KEEP_TYPING="Keep typing ..."
JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM="Language pack does not match this Joomla! version. Some strings may be missing."
JGLOBAL_LEAST_HITS="Least Hits"
JGLOBAL_LEFT="Left"
JGLOBAL_LINK_AUTHOR_DESC="If set to Yes, the Name of the article's Author will be linked to its contact page. You must create a contact linked to the author's user record, <strong>and the &quot;Content - Contact&quot; plugin must be enabled</strong>, for this to be in effect. This is a global setting but can be changed at the Category, Menu and Article levels."
JGLOBAL_LINK_AUTHOR_DESC="If set to Yes, the Name of the article's Author will be linked to its contact page. You must create a contact linked to the author's user record, <strong>and the &quot;Content - Contact&quot; plugin must be enabled</strong>, for this to be in effect."
JGLOBAL_LINK_AUTHOR_LABEL="Link Author"
JGLOBAL_LINK_CATEGORY_DESC="If set to Yes, and if Show Category is set to 'Show', the Category Title will link to a layout showing articles in that Category."
JGLOBAL_LINK_CATEGORY_LABEL="Link Category"
Expand Down Expand Up @@ -481,7 +481,7 @@ JGLOBAL_SELECTION_ALL="Select All"
JGLOBAL_SELECTION_INVERT="Toggle Selection"
JGLOBAL_SELECTION_INVERT_ALL="Toggle All Selections"
JGLOBAL_SELECTION_NONE="Clear Selection"
JGLOBAL_SHOW_AUTHOR_DESC="If set to Show, the Name of the article's Author will be displayed. This is a global setting but can be changed at the Category, Menu and Article levels."
JGLOBAL_SHOW_AUTHOR_DESC="If set to Show, the Name of the article's Author will be displayed."
JGLOBAL_SHOW_AUTHOR_LABEL="Show Author"
JGLOBAL_SHOW_CATEGORY_DESC="If set to Show, the title of the article&rsquo;s category will show."
JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC="Show or hide the description of the selected Category."
Expand All @@ -508,13 +508,13 @@ JGLOBAL_SHOW_FEED_LINK_LABEL="Show Feed Link"
JGLOBAL_SHOW_FULL_DESCRIPTION="Show full description ..."
JGLOBAL_SHOW_HEADINGS_DESC="Show or hide the headings in list layouts."
JGLOBAL_SHOW_HEADINGS_LABEL="Table Headings"
JGLOBAL_SHOW_HITS_DESC="If set to Show, the number of Hits on a particular Article will be displayed. This is a global setting but can be changed at the Category, Menu and Article levels."
JGLOBAL_SHOW_HITS_DESC="If set to Show, the number of Hits on a particular Article will be displayed."
JGLOBAL_SHOW_HITS_LABEL="Show Hits"
JGLOBAL_SHOW_ICONS_DESC="Print and email will utilise icons or text."
JGLOBAL_SHOW_ICONS_LABEL="Show Icons"
JGLOBAL_SHOW_INTRO_DESC="If set to Show, the Intro Text of the article will show when you drill down to the article. If set to Hide, only the part of the article after the &quot;Read More&quot; break will show."
JGLOBAL_SHOW_INTRO_LABEL="Show Intro Text"
JGLOBAL_SHOW_MODIFY_DATE_DESC="If set to Show, the date and time an Article was last modified will be displayed. This is a global setting but can be changed at the Category, Menu and Article levels."
JGLOBAL_SHOW_MODIFY_DATE_DESC="If set to Show, the date and time an Article was last modified will be displayed."
JGLOBAL_SHOW_MODIFY_DATE_LABEL="Show Modify Date"
JGLOBAL_SHOW_NAVIGATION_DESC="If set to Show, shows a navigation link (Next, Previous) between articles."
JGLOBAL_SHOW_NAVIGATION_LABEL="Show Navigation"
Expand Down
27 changes: 12 additions & 15 deletions installation/model/configuration.php
Expand Up @@ -10,6 +10,7 @@
defined('_JEXEC') or die;

use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

/**
* Configuration setup model for the Joomla Core Installer.
Expand All @@ -30,16 +31,16 @@ class InstallationModelConfiguration extends JModelBase
public function setup($options)
{
// Get the options as an object for easier handling.
$options = JArrayHelper::toObject($options);
$options = ArrayHelper::toObject($options);

// Attempt to create the root user.
if (!$this->_createConfiguration($options))
if (!$this->createConfiguration($options))
{
return false;
}

// Attempt to create the root user.
if (!$this->_createRootUser($options))
if (!$this->createRootUser($options))
{
return false;
}
Expand All @@ -56,7 +57,7 @@ public function setup($options)
*
* @since 3.1
*/
public function _createConfiguration($options)
public function createConfiguration($options)
{
// Create a new registry to build the configuration options.
$registry = new Registry;
Expand Down Expand Up @@ -183,6 +184,9 @@ public function _createConfiguration($options)
$useFTP = false;
}

// Get the session
$session = JFactory::getSession();

if ($useFTP == true)
{
// Connect the FTP client.
Expand All @@ -196,7 +200,6 @@ public function _createConfiguration($options)
if (!$ftp->write($file, $buffer))
{
// Set the config string to the session.
$session = JFactory::getSession();
$session->set('setup.config', $buffer);
}

Expand All @@ -207,13 +210,11 @@ public function _createConfiguration($options)
if ($canWrite)
{
file_put_contents($path, $buffer);
$session = JFactory::getSession();
$session->set('setup.config', null);
}
else
{
// Set the config string to the session.
$session = JFactory::getSession();
$session->set('setup.config', $buffer);
}
}
Expand All @@ -230,12 +231,8 @@ public function _createConfiguration($options)
*
* @since 3.1
*/
private function _createRootUser($options)
private function createRootUser($options)
{
// Get the application
/* @var InstallationApplicationWeb $app */
$app = JFactory::getApplication();

// Get a database object.
try
{
Expand All @@ -250,7 +247,7 @@ private function _createRootUser($options)
}
catch (RuntimeException $e)
{
$app->enqueueMessage(JText::sprintf('INSTL_ERROR_CONNECT_DB', $e->getMessage()), 'notice');
JFactory::getApplication()->enqueueMessage(JText::sprintf('INSTL_ERROR_CONNECT_DB', $e->getMessage()), 'notice');

return false;
}
Expand Down Expand Up @@ -325,7 +322,7 @@ private function _createRootUser($options)
}
catch (RuntimeException $e)
{
$app->enqueueMessage($e->getMessage(), 'notice');
JFactory::getApplication()->enqueueMessage($e->getMessage(), 'notice');

return false;
}
Expand Down Expand Up @@ -361,7 +358,7 @@ private function _createRootUser($options)
}
catch (RuntimeException $e)
{
$app->enqueueMessage($e->getMessage(), 'notice');
JFactory::getApplication()->enqueueMessage($e->getMessage(), 'notice');

return false;
}
Expand Down

0 comments on commit 53bcd26

Please sign in to comment.