Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Jul 18, 2017
1 parent 405f799 commit 45a8af0
Show file tree
Hide file tree
Showing 37 changed files with 1,079 additions and 254 deletions.
97 changes: 97 additions & 0 deletions _configuration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php
class JConfig {
public $offline = 0;
public $offline_message = 'This site is down for maintenance.<br />Please check back again soon.';
public $display_offline_message = 1;
public $offline_image = '';
public $sitename = 'sdgsd';
public $editor = 'tinymce';
public $captcha = '0';
public $list_limit = 20;
public $access = 1;
public $debug = 0;
public $debug_lang = 0;
public $dbtype = 'mysqli';
public $host = 'localhost';
public $user = 'root';
public $password = 'root';
public $db = 'demo_j';
public $dbprefix = 'cum28_';
public $live_site = '';
public $secret = '9ERblI3el6F8sCxc';
public $gzip = 0;
public $error_reporting = 'default';
public $helpurl = 'https://help.joomla.org/proxy?keyref=Help{major}{minor}:{keyref}&lang={langcode}';
public $ftp_host = '';
public $ftp_port = '';
public $ftp_user = '';
public $ftp_pass = '';
public $ftp_root = '';
public $ftp_enable = 0;
public $offset = 'UTC';
public $mailonline = 1;
public $mailer = 'mail';
public $mailfrom = '[email protected]';
public $fromname = 'sdgsd';
public $sendmail = '/usr/sbin/sendmail';
public $smtpauth = 0;
public $smtpuser = '';
public $smtppass = '';
public $smtphost = 'localhost';
public $smtpsecure = 'none';
public $smtpport = 25;
public $caching = 0;
public $cache_handler = 'file';
public $cachetime = 15;
public $cache_platformprefix = 0;
public $MetaDesc = 'dgsdfg';
public $MetaKeys = '';
public $MetaTitle = 1;
public $MetaAuthor = 0;
public $MetaVersion = 0;
public $robots = '';
public $sef = 1;
public $sef_rewrite = 0;
public $sef_suffix = 0;
public $unicodeslugs = 0;
public $feed_limit = 10;
public $feed_email = 'none';
public $log_path = '/Users/dimitris/Documents/github_projects/joomla1/administrator/logs';
public $tmp_path = '/Users/dimitris/Documents/github_projects/joomla1/tmp';
public $lifetime = 15;
public $session_handler = 'database';
public $shared_session = 0;
public $memcache_persist = 1;
public $memcache_compress = 0;
public $memcache_server_host = 'localhost';
public $memcache_server_port = 11211;
public $memcached_persist = 1;
public $memcached_compress = 0;
public $memcached_server_host = 'localhost';
public $memcached_server_port = 11211;
public $redis_persist = 1;
public $redis_server_host = 'localhost';
public $redis_server_port = 6379;
public $redis_server_auth = '';
public $redis_server_db = 0;
public $proxy_enable = 0;
public $proxy_host = '';
public $proxy_port = '';
public $proxy_user = '';
public $proxy_pass = '';
public $massmailoff = 0;
public $replyto = '';
public $replytoname = '';
public $MetaRights = '';
public $sitename_pagetitles = 0;
public $force_ssl = 0;
public $session_filesystem_path = '';
public $session_memcache_server_host = 'localhost';
public $session_memcache_server_port = 11211;
public $session_memcached_server_host = 'localhost';
public $session_memcached_server_port = 11211;
public $frontediting = 1;
public $cookie_domain = '';
public $cookie_path = '';
public $asset_id = 1;
}
11 changes: 7 additions & 4 deletions installation/controller/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function execute()
// JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

// Check the form
$vars = (new InstallationModelSetup)->checkForm('site');
$vars = (new InstallationModelSetup)->checkForm('setup');

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

// Attempt to initialise the database.
if (!(new InstallationModelDatabase)->createDatabase($vars))
{
$r->view = 'install';
if (!(new InstallationModelDatabase)->initialise($vars)){
if (!(new InstallationModelDatabase)->createDatabase($vars))
{
$r->view = 'setup';
}
}

// $app->redirect('index.php?view=remove');
$app->sendJsonResponse($r);
}
}
15 changes: 7 additions & 8 deletions installation/controller/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function execute()
/** @var InstallationApplicationWeb $app */
$app = $this->getApplication();

$defaultView = 'site';
$defaultView = 'setup';

// If the app has already been installed, default to the remove view
if (file_exists(JPATH_CONFIGURATION . '/configuration.php') && (filesize(JPATH_CONFIGURATION . '/configuration.php') > 10)
Expand All @@ -39,13 +39,13 @@ public function execute()
}

// Are we allowed to proceed?
$model = new InstallationModelSetup;
$model = new InstallationModelChecks;

$vName = $this->getInput()->getWord('view', $defaultView);
$vFormat = $app->getDocument()->getType();
$lName = $this->getInput()->getWord('layout', 'default');

if (strcmp($vName, $defaultView) == 0)
if (strcmp($vName, $defaultView) === 0)
{
$this->getInput()->set('view', $defaultView);
}
Expand All @@ -63,7 +63,7 @@ public function execute()
{
if ($vName === 'preinstall')
{
$app->redirect('index.php?view=site');
$app->redirect('index.php?view=setup');
}

switch ($vName)
Expand All @@ -75,7 +75,6 @@ public function execute()
$options = [];

break;
case 'summary':
case 'install':
$model = new InstallationModelSetup;
// InstallationModelConfiguration;
Expand All @@ -92,14 +91,14 @@ public function execute()
break;
default:

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

break;
}

if ($vName != $defaultView && ($checkOptions && empty($options)))
if ($vName !== $defaultView && ($checkOptions && empty($options)))
{
$app->redirect('index.php');
}
Expand All @@ -113,7 +112,7 @@ public function execute()

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

/** @var JViewHtml $view */
Expand Down
4 changes: 2 additions & 2 deletions installation/controller/detectftproot.php
Original file line number Diff line number Diff line change
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));

// Get the data
$data = $app->input->post->get('jform', array(), 'array');
Expand All @@ -43,7 +43,7 @@ public function execute()

// Build the response object
$r = new stdClass;
$r->view = 'ftp';
$r->view = 'preinstall';

// If we got a FTP root, add it to the response object
if ($return)
Expand Down
2 changes: 1 addition & 1 deletion installation/controller/ftp.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function execute()

// Redirect to the page.
$r = new stdClass;
$r->view = 'summary';
$r->view = 'preinstall';
$app->sendJsonResponse($r);
}
}
4 changes: 2 additions & 2 deletions installation/controller/install/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public function execute()
$options = (new InstallationModelSetup)->getOptions();

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

// Attempt to setup the configuration.
if (!(new InstallationModelConfiguration)->setup($options))
{
$r->view = 'site';
$r->view = 'setup';
}

$app->sendJsonResponse($r);
Expand Down
8 changes: 5 additions & 3 deletions installation/controller/install/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ public function execute()
// Check for request forgeries.
JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));

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

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

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

// ->installCmsData($options))
{
$r->view = 'database';
}
Expand Down
2 changes: 1 addition & 1 deletion installation/controller/removefolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class InstallationResponseJson
public function __construct($data)
{
// The old token is invalid so send a new one.
$this->token = JSession::getFormToken(true);
// $this->token = JSession::getFormToken(true);

// Get the language and send it's tag along
$this->lang = JFactory::getLanguage()->getTag();
Expand Down
4 changes: 2 additions & 2 deletions installation/controller/setlanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function execute()
* The validate method enqueued all messages for us, so we just need to
* redirect back to the site setup screen.
*/
$r->view = $this->getInput()->getWord('view', 'site');
$r->view = $this->getInput()->getWord('view', 'setup');
$app->sendJsonResponse($r);
}

Expand All @@ -78,7 +78,7 @@ public function execute()
JFactory::$language = JLanguage::getInstance($return['language']);

// Redirect to the page.
$r->view = $this->getInput()->getWord('view', 'site');
$r->view = $this->getInput()->getWord('view', 'setup');
$app->sendJsonResponse($r);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @since 3.1
*/
class InstallationControllerSite extends JControllerBase
class InstallationControllerSetup extends JControllerBase
{
/**
* Execute the controller.
Expand All @@ -30,16 +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));

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

// Check the form
if ((new InstallationModelSetup)->checkForm('site') === false)
if ((new InstallationModelSetup)->checkForm('setup') === false)
{
$r->view = 'site';
$r->view = 'setup';
}

$app->sendJsonResponse($r);
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation only if you repair the permissions or you provide an FTP connection"
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
INSTL_PHP_VERSION="PHP Version"
INSTL_PHP_VERSION_NEWER="PHP Version >= %s"
INSTL_REGISTER_GLOBALS="Register Globals Off"
INSTL_SAFE_MODE="Safe Mode"
INSTL_SESSION_AUTO_START="Session Auto Start"
INSTL_WRITABLE="%s Writeable"
INSTL_WRITABLE="No sufficient permissions to create %s"
INSTL_XML_SUPPORT="XML Support"
INSTL_ZIP_SUPPORT_AVAILABLE="Native ZIP support"
INSTL_ZLIB_COMPRESSION_SUPPORT="Zlib Compression Support"
Expand Down
4 changes: 2 additions & 2 deletions installation/language/en-US/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,15 @@ INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder. <br><a class=\"btn btn-primary btn-sm mt-2\" href="#" id=showFtp>Connect with FTP</a>"
INSTL_NOTICEYOUCANSTILLINSTALL="You can still continue the installation process if you either repair the permissions or you provide an FTP connection (not recommended solution!). <br><a class=\"btn btn-primary btn-sm mt-2\" href="#" id=showFtp>Connect with FTP</a>"
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
INSTL_PHP_VERSION="PHP Version"
INSTL_PHP_VERSION_NEWER="PHP Version >= %s"
INSTL_REGISTER_GLOBALS="Register Globals Off"
INSTL_SAFE_MODE="Safe Mode"
INSTL_SESSION_AUTO_START="Session Auto Start"
INSTL_WRITABLE="%s Writeable"
INSTL_WRITABLE="No sufficient permissions to create %s"
INSTL_XML_SUPPORT="XML Support"
INSTL_ZIP_SUPPORT_AVAILABLE="Native ZIP support"
INSTL_ZLIB_COMPRESSION_SUPPORT="Zlib Compression Support"
Expand Down
Loading

0 comments on commit 45a8af0

Please sign in to comment.