Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,20 @@
if (file_exists(__DIR__ . '/config.php')) {
$config = array_merge($config, require __DIR__ . '/config.php');
}
if (!defined('IN_INSTALL_MODE') && !file_exists($config['core'] . '/.install')) {
if (!defined('IN_INSTALL_MODE') && !file_exists($config['core'] . '/.install')) {

if (is_dir(__DIR__ . '/install')) {
header('Location: install/index.php?action=not_installed');
exit;
}

header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');

$path = __DIR__ . '/install/src/template/not_installed.tpl';
if (file_exists($path)) {
readfile($path);
} else {
echo '<h3>Unable to load configuration settings</h3>';
echo 'Please run the Evolution CMS install utility';
}
echo '<h3>Unable to load configuration settings</h3>';
echo 'Please run the Evolution CMS install utility';


exit;
}
Expand All @@ -78,7 +80,7 @@
define('IN_INSTALL_MODE', false);
}
if (IN_INSTALL_MODE) {
// set some settings, and address some IE issues
// set some settings, and address some IE issues
@ini_set('url_rewriter.tags', '');
@ini_set('session.use_trans_sid', 0);
@ini_set('session.use_only_cookies', 1);
Expand Down
18 changes: 15 additions & 3 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
die('MGR_DIR is not defined');
}
}


if (!defined('MODX_MANAGER_PATH')) {
define('MODX_MANAGER_PATH', $base_path . MGR_DIR . '/');
}
Expand All @@ -28,8 +30,10 @@
require_once 'src/lang.php';
require_once 'src/functions.php';



if (empty($_GET['s'])) {
require_once '../' . MGR_DIR . '/includes/version.inc.php';
require_once '../' . MGR_DIR . '/includes/version.inc.php';

// start session
session_start();
Expand Down Expand Up @@ -74,11 +78,19 @@
$ph = array_merge($ph, $_lang);
$ph['install_language'] = $install_language;

ob_start();
ob_start();
$action = isset($_GET['action']) ? trim(strip_tags($_GET['action'])) : 'language';
str_replace('.', '', $action);
$action = str_replace('.', '', $action);


$controller = 'src/controllers/' . $action . '.php';

if ($action === 'not_installed') {
require_once 'src/controllers/not_installed.php';
exit;
}


if (! file_exists($controller)) {
die("Invalid install action attempted. [action={$action}]");
}
Expand Down
39 changes: 39 additions & 0 deletions install/src/controllers/not_installed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);




// load version
if (!isset($moduleVersion) && file_exists('../' . MGR_DIR . '/includes/version.inc.php')) {
require_once '../' . MGR_DIR . '/includes/version.inc.php';
$moduleName = 'Evolution CMS';
$moduleVersion = $modx_branch . ' ' . $modx_version;
}

// create placeholders
$ph = array_merge(ph(), $_lang);


$ph['link_install_now'] = $ph['install_now'];
$ph['module_name'] = $moduleName;
$ph['module_version'] = $moduleVersion;
$ph['language_code'] = $install_language || 'en';



header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('Content-Type: text/html; charset=utf-8');


$tplPath = __DIR__ . '/../template/not_installed.tpl';
if (file_exists($tplPath)) {
$tpl = file_get_contents($tplPath);
echo parse($tpl, $ph);
} else {
// fallback
echo '<h3>System not installed</h3><p><a href="install/">Run installer</a></p>';
}
exit;
7 changes: 6 additions & 1 deletion install/src/lang/be.inc.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php

/**
* EVO Installer language file
*
* @author davaeron
* @author Belarusian
* @version 1.5.0
* @date 2018/02/23
*
Expand All @@ -12,6 +13,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Усталёўка Evolution CMS';
$_lang['not_installed_header'] = 'Evolution CMS: патрабуецца ўсталёўка';
$_lang['not_installed_message'] = 'Запусціце майстар усталёўкі для разгортвання базавых кампанентаў і ініцыялізацыі базы даных.';
$_lang['install_now'] = 'Усталяваць';
$_lang["agree_to_terms"] = 'Пагадзіцеся з умовамі ліцэнзіі і ўсталюйце';
$_lang["alert_database_test_connection"] = 'Вам трэба стварыць сваю базу дадзеных або праверыць выбар вашай базы дадзеных!';
$_lang["alert_database_test_connection_failed"] = 'Тэст выбару вашай базы дадзеных не прайшоў!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/bg.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'Трябва да създадете ваша БД или да проверите избирането на БД!';
$_lang["alert_database_test_connection_failed"] = 'Проверката за избиране на вашата БД е неуспешна!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/cs.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Souhlasím s licenčními podmínkami a chci pokračovat v instalaci';
$_lang["alert_database_test_connection"] = 'Musíte vytvořit nebo zadat již existující databázi!';
$_lang["alert_database_test_connection_failed"] = 'Otestování vybrané databáze se nezdařilo!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/da.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Accept af licens regler, og installer';
$_lang["alert_database_test_connection"] = 'Du er nødt til at oprette din database eller kontrollere den valgte database!';
$_lang["alert_database_test_connection_failed"] = 'Der opstod en fejl under kontrollen af den valgte database!';
Expand Down
7 changes: 6 additions & 1 deletion install/src/lang/de.inc.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
<?php

/**
* EVO Installer language file
*
* @author davaeron
* @version 1.5.0
* @date 2018/02/23
*
* @language English
* @language German
* @package evo
* @subpackage installer
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation erforderlich';
$_lang['not_installed_message'] = 'Starten Sie den Installationsassistenten, um die Basiskomponenten bereitzustellen und die Datenbank zu initialisieren.';
$_lang['install_now'] = 'Jetzt installieren';
$_lang["agree_to_terms"] = 'Lizenzbedingungen akzeptieren und installieren';
$_lang["alert_database_test_connection"] = 'Sie müssen eine Datenbank erstellen oder die Datenbank-Verbindung testen!';
$_lang["alert_database_test_connection_failed"] = 'Der Test der Datenbank-Auswahl ist fehlgeschlagen!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/en.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'You need to create your database or test the selection of your database!';
$_lang["alert_database_test_connection_failed"] = 'The test of your database selection has failed!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/es.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Acordar con los términos de licencia e instalar';
$_lang["alert_database_test_connection"] = '!Necesita crear su base de datos o probar la selección de su base de datos!';
$_lang["alert_database_test_connection_failed"] = '¡La prueba de su selección de la base de datos ha fallado!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/fa.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'شما می بایست پایگاه داده را ایجاد کنید و یا انتخاب شده های پایگاه داده را بررسی کنید!';
$_lang["alert_database_test_connection_failed"] = 'بررسی انتخاب شده های پایگاه داده موفقیت آمیز نبود!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/fi.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Hyväksy lisenssi ehdot ja asenna';
$_lang["alert_database_test_connection"] = 'Sinun täytyy luoda tietokanta tai testata tietokantasi valintaa!';
$_lang["alert_database_test_connection_failed"] = 'Tietokannan valinnan testi epäonnistui!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/fr.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Acceptation des termes d\'utilisation et installation';
$_lang["alert_database_test_connection"] = 'Vous devez créer votre base de données ou tester la sélection de votre base de données!';
$_lang["alert_database_test_connection_failed"] = 'Le test de sélection de votre base de données a échoué!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/he.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'You need to create your database or test the selection of your database!';
$_lang["alert_database_test_connection_failed"] = 'The test of your database selection has failed!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/it.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Vi preghiamo di accettare le Condizioni di Licenza per procedere con l\'Installazione';
$_lang["alert_database_test_connection"] = 'Occorre creare il database o verificare la connessione ad un database esistente!';
$_lang["alert_database_test_connection_failed"] = 'La verifica della connessione al database ha avuto esito negativo!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/ja.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'ライセンスが規定する諸条件を確認しインストールを実行してください';
$_lang["alert_database_test_connection"] = 'データベースを作成、またはデータベースの接続テストを行う必要があります';
$_lang["alert_database_test_connection_failed"] = 'データベースに接続できません。';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/nl.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Ik ga akkoord met de voorwaarden';
$_lang["alert_database_test_connection"] = 'U moet een database aanmaken of test de selectie van uw database!';
$_lang["alert_database_test_connection_failed"] = 'De test van uw database selectie is mislukt!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/nn.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'Du m&aring; opprette din database eller teste valget av database!';
$_lang["alert_database_test_connection_failed"] = 'Testen p&aring; valg av database mislyktes!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/pl.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Akceptuję warunki umowy licencyjnej';
$_lang["alert_database_test_connection"] = 'Musisz utworzyć nową bazę danych lub sprawdzić czy wybrana przez Ciebie nazwa bazy jest poprawna!';
$_lang["alert_database_test_connection_failed"] = 'Test połączenia z wybraną bazą danych nie powiódł się!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/pt.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Agree to the License Terms and Install';
$_lang["alert_database_test_connection"] = 'Você prescisa criar uma base de dados ou testar a seleção de sua base de dados!';
$_lang["alert_database_test_connection_failed"] = 'O teste de seleção/conexão da Base de Dados falhou!';
Expand Down
7 changes: 6 additions & 1 deletion install/src/lang/ru.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
* @version 1.5.0
* @date 2018/02/23
*
* @language English
* @language Russian
* @package evo
* @subpackage installer
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Установка Evolution CMS';
$_lang['not_installed_header'] = 'Evolution CMS: требуется инсталляция';
$_lang['not_installed_message'] = 'Запустите мастер установки для развёртывания базовых компонентов и инициализации базы данных. ';
$_lang['install_now'] = 'Установить';

$_lang["agree_to_terms"] = 'Согласиться с условиями лицензии и приступить к установке';
$_lang["alert_database_test_connection"] = 'Вы должны создать базу данных или выбрать базу данных для проверки!';
$_lang["alert_database_test_connection_failed"] = 'Неудачная проверка выбранной базы данных!';
Expand Down
4 changes: 4 additions & 0 deletions install/src/lang/sv.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
*
* Please commit your language changes on Transifex (https://www.transifex.com/projects/p/modx-evolution/) or on GitHub (https://github.com/modxcms/evolution).
*/
$_lang['not_installed_title'] = 'Evolution CMS Installation';
$_lang['not_installed_header'] = 'Evolution CMS: Installation Required';
$_lang['not_installed_message'] = 'Launch the installation wizard to deploy basic components and initialize the database.';
$_lang['install_now'] = 'Install Now';
$_lang["agree_to_terms"] = 'Godkänn licensvillkoren och installera';
$_lang["alert_database_test_connection"] = 'Du behöver skapa din databas eller testa det databasval du gjort!';
$_lang["alert_database_test_connection_failed"] = 'Testet av ditt databasval har misslyckats!';
Expand Down
Loading