-
-
get('Bludit Installer') ?>
-
get('Welcome to the Bludit installer') ?>
+
+
- get('Bludit Installer') ?>
+
get('Welcome to the Bludit installer') ?>
- if(empty($system))
- {
- ?>
+ get('Complete the form, choose a password for the username « admin »') ?>
+ $system = checkSystem();
-
+ // Missing requirements
+ if(!empty($system))
+ {
+ echo '
';
+ echo '
';
+
+ foreach($system as $value) {
+ echo ''.$value.' |
';
+ }
+
+ echo '
';
+ echo '
';
+ }
+ // Second step
+ elseif(isset($_GET['language']))
+ {
+
+ ?>
+
get('Complete the form choose a password for the username admin') ?>
+
+
+
+
get('Choose your language') ?>
+
+
+
- ';
- echo '
';
+
+
- foreach ($system as $value)
- {
- echo ''.$value.' |
';
- }
-
- echo '
';
- echo '
-
-
-
-
+
diff --git a/kernel/boot/init.php b/kernel/boot/init.php
index 08f30f4b..09814485 100644
--- a/kernel/boot/init.php
+++ b/kernel/boot/init.php
@@ -1,14 +1,16 @@
');
-// Bludit version
-define('BLUDIT_VERSION', 'githubVersion');
-define('BLUDIT_CODENAME', '');
-define('BLUDIT_RELEASE_DATE', '');
-
-//
+// No parent character
define('NO_PARENT_CHAR', '—');
// Post per page on Manage->Posts
define('POSTS_PER_PAGE_ADMIN', 10);
-// Multibyte string / UTF-8
-define('MB_STRING', extension_loaded('mbstring'));
-
// Check if JSON encode and decode are enabled.
define('JSON', function_exists('json_encode'));
// TRUE if new posts hand-made set published, or FALSE for draft.
define('HANDMADE_PUBLISHED', true);
+// Charset, default UTF-8.
define('CHARSET', 'UTF-8');
+// Multibyte string extension loaded.
+define('MB_STRING', extension_loaded('mbstring'));
+
if(MB_STRING)
{
- // Tell PHP that we're using UTF-8 strings until the end of the script.
+ // Set internal character encoding.
mb_internal_encoding(CHARSET);
- // Tell PHP that we'll be outputting UTF-8 to the browser.
+ // Set HTTP output character encoding.
mb_http_output(CHARSET);
}
-// Abstract Classes
+// Inclde Abstract Classes
include(PATH_ABSTRACT.'dbjson.class.php');
include(PATH_ABSTRACT.'filecontent.class.php');
include(PATH_ABSTRACT.'plugin.class.php');
+// Inclde Classes
include(PATH_KERNEL.'dbposts.class.php');
include(PATH_KERNEL.'dbpages.class.php');
include(PATH_KERNEL.'dbusers.class.php');
include(PATH_KERNEL.'dblanguage.class.php');
include(PATH_KERNEL.'dbsite.class.php');
-
include(PATH_KERNEL.'post.class.php');
include(PATH_KERNEL.'page.class.php');
-
include(PATH_KERNEL.'url.class.php');
include(PATH_KERNEL.'login.class.php');
include(PATH_KERNEL.'parsedown.class.php');
-// Helpers Classes
+// Include Helpers Classes
include(PATH_HELPERS.'text.class.php');
include(PATH_HELPERS.'log.class.php');
include(PATH_HELPERS.'date.class.php');
@@ -146,7 +139,7 @@ define('HTML_PATH_ADMIN_ROOT', HTML_PATH_ROOT.'admin/');
define('HTML_PATH_UPLOADS', HTML_PATH_ROOT.'content/uploads/');
define('HTML_PATH_PLUGINS', HTML_PATH_ROOT.'plugins/');
-// PHP PATHs with dependency
+// PHP paths with dependency
define('PATH_THEME', PATH_ROOT.'themes/'.$Site->theme().'/');
// Objects with dependency
diff --git a/kernel/boot/rules/99.header.php b/kernel/boot/rules/99.header.php
index d67de305..27df4585 100644
--- a/kernel/boot/rules/99.header.php
+++ b/kernel/boot/rules/99.header.php
@@ -5,5 +5,3 @@ if($Url->notFound())
{
header('HTTP/1.0 404 Not Found');
}
-
-?>
diff --git a/kernel/dblanguage.class.php b/kernel/dblanguage.class.php
index 4ec34ee2..7da6c0fa 100644
--- a/kernel/dblanguage.class.php
+++ b/kernel/dblanguage.class.php
@@ -4,24 +4,27 @@ class dbLanguage extends dbJSON
{
public $data;
public $db;
+ public $currentLocale;
- function __construct($language)
+ function __construct($locale)
{
$this->data = array();
$this->db = array();
+ $this->currentLocale = 'en_US';
// Default language en_US
$filename = PATH_LANGUAGES.'en_US.json';
- if(file_exists($filename))
+ if( Sanitize::pathFile($filename) )
{
$Tmp = new dbJSON($filename, false);
$this->db = array_merge($this->db, $Tmp->db);
}
// User language
- $filename = PATH_LANGUAGES.$language.'.json';
- if( file_exists($filename) && ($language!=="en_US") )
+ $filename = PATH_LANGUAGES.$locale.'.json';
+ if( Sanitize::pathFile($filename) && ($locale!=="en_US") )
{
+ $this->currentLocale = $locale;
$Tmp = new dbJSON($filename, false);
$this->db = array_merge($this->db, $Tmp->db);
}
@@ -30,6 +33,11 @@ class dbLanguage extends dbJSON
unset($this->db['language-data']);
}
+ public function getCurrentLocale()
+ {
+ return $this->currentLocale;
+ }
+
// Return the translation, if the translation does'n exist then return the English translation.
public function get($string)
{
@@ -73,7 +81,7 @@ class dbLanguage extends dbJSON
return $this->data[$key];
}
- return '';
+ return '';
}
// Returns an array with all dictionaries.
diff --git a/kernel/dbpages.class.php b/kernel/dbpages.class.php
index 1f47d0e4..70bd7f74 100644
--- a/kernel/dbpages.class.php
+++ b/kernel/dbpages.class.php
@@ -5,14 +5,14 @@ class dbPages extends dbJSON
private $parentKeyList = array();
private $dbFields = array(
- 'title'=> array('inFile'=>true, 'value'=>''),
- 'content'=> array('inFile'=>true, 'value'=>''),
+ 'title'=> array('inFile'=>true, 'value'=>''),
+ 'content'=> array('inFile'=>true, 'value'=>''),
'description'=> array('inFile'=>false, 'value'=>''),
'username'=> array('inFile'=>false, 'value'=>''),
- 'tags'=> array('inFile'=>false, 'value'=>''),
- 'status'=> array('inFile'=>false, 'value'=>'draft'),
+ 'tags'=> array('inFile'=>false, 'value'=>''),
+ 'status'=> array('inFile'=>false, 'value'=>'draft'),
'unixTimeCreated'=> array('inFile'=>false, 'value'=>0),
- 'unixTimeModified'=>array('inFile'=>false, 'value'=>0),
+ 'unixTimeModified'=> array('inFile'=>false, 'value'=>0),
'position'=> array('inFile'=>false, 'value'=>0)
);
diff --git a/languages/en_US.json b/languages/en_US.json
index 2e7e3dad..4b703101 100755
--- a/languages/en_US.json
+++ b/languages/en_US.json
@@ -8,12 +8,7 @@
"email": "",
"website": ""
},
-
- "bludit-installer": "Bludit Installer",
- "welcome-to-the-bludit-installer": "Welcome to the Bludit installer",
- "complete-the-form,-choose-a-password-for-the-username-«-admin-»": "Complete the form, choose a password for the username « admin »",
- "password,-visible-field!": "Password, visible field!",
- "install": "Install",
+
"username": "Username",
"password": "Password",
"confirm-password": "Confirm Password",
@@ -149,6 +144,13 @@
"read-the-documentation-for-more-information": "Read the [documentation](http://docs.bludit.com) for more information",
"share-with-your-friends-and-enjoy": "Share with your friends and enjoy",
"the-page-has-not-been-found": "The page has not been found.",
- "error": "Error"
-
+ "error": "Error",
+ "bludit-installer": "Bludit Installer",
+ "welcome-to-the-bludit-installer": "Welcome to the Bludit installer",
+ "complete-the-form-choose-a-password-for-the-username-admin": "Complete the form, choose a password for the username « admin »",
+ "password-visible-field": "Password, visible field!",
+ "install": "Install",
+ "choose-your-language": "Choose your language",
+ "next": "Next",
+ "the-password-field-is-empty": "The password field is empty"
}
\ No newline at end of file
diff --git a/languages/es_AR.json b/languages/es_AR.json
index 8fa3d00f..58fe0dba 100755
--- a/languages/es_AR.json
+++ b/languages/es_AR.json
@@ -144,5 +144,11 @@
"read-the-documentation-for-more-information": "Lea la [documentacion](http://docs.bludit.com) para mas informacion",
"share-with-your-friends-and-enjoy": "Comparti con tus amigos y a disfrutar",
"the-page-has-not-been-found": "La pagina no fue encontrada.",
- "error": "Error"
+ "error": "Error",
+ "bludit-installer": "Bludit Instalador",
+ "welcome-to-the-bludit-installer": "Bienvenido al asistente para la instalación de Bludit.",
+ "complete-the-form-choose-a-password-for-the-username-admin": "Complete el formulario y elija una contraseña para el usuario « admin »",
+ "password-visible-field": "Contraseña, este campo es visible!",
+ "install": "Instalar",
+ "the-password-field-is-empty": "Debe completar el campo contraseña"
}
\ No newline at end of file
diff --git a/languages/fr_FR.json b/languages/fr_FR.json
index a4faffd0..7ccc65ce 100755
--- a/languages/fr_FR.json
+++ b/languages/fr_FR.json
@@ -8,12 +8,7 @@
"email": "",
"website": ""
},
-
- "bludit-installer": "Installation de Bludit",
- "welcome-to-the-bludit-installer": "Bienvenue dans l’assistant d’installation de Bludit",
- "complete-the-form,-choose-a-password-for-the-username-«-admin-»": "Complétez le formulaire et choisissez un mot de passe pour l’utilisateur « admin »",
- "password,-visible-field!": "Mot de passe, champ visible !",
- "install": "Installer",
+
"username": "Nom d’utilisateur",
"password": "Mot de passe",
"confirm-password": "Confirmation du mot de passe",
@@ -40,7 +35,7 @@
"position": "Position",
"save": "Sauvegarder",
"draft": "Brouillon",
- "delete": "Supprimer",
+ "delete": "Supprimer",
"registered": "Inscrit",
"Notifications": "Notifications",
"profile": "Profil",
@@ -149,6 +144,10 @@
"read-the-documentation-for-more-information": "Lisez la [documentation](http://docs.bludit.com) pour plus d’information",
"share-with-your-friends-and-enjoy": "Partagez avec vos amis et apprécier !",
"the-page-has-not-been-found": "La page n’a pas été trouvée.",
- "error": "Erreur"
-
+ "error": "Erreur",
+ "bludit-installer": "Installation de Bludit",
+ "welcome-to-the-bludit-installer": "Bienvenue dans l’assistant d’installation de Bludit",
+ "complete-the-form-choose-a-password-for-the-username-admin": "Complétez le formulaire et choisissez un mot de passe pour l’utilisateur « admin »",
+ "password-visible-field": "Mot de passe, champ visible !",
+ "install": "Installer"
}
\ No newline at end of file